This release fixes issues for SREs watching stability and regressions.
✓ No known CVEs patched in this version
Topics
Summary
AI summaryFixed incorrect paragraph alignment on legal boilerplate documents reducing phantom insertions from 949 to 332.
Full changelog
Fixed
-
Paragraph similarity alignment on legal boilerplate documents (#62, fixes #61) — The hierarchical paragraph matching used a greedy first-match algorithm that allowed low-similarity matches to consume revised paragraphs intended for higher-similarity matches later in the document. On documents with extensive shared legal vocabulary (e.g., NVCA Certificate of Incorporation), this caused incorrect paragraph alignment, garbled reject-all output, and fallback to the rebuild reconstruction path with ~950 phantom insertions.
Fix: Two-part improvement:
- Order-constrained gap matching — Pass 1 exact-hash anchors divide documents into gaps. Pass 2 similarity matching is scoped to each gap via mini-LCS, guaranteeing document order preservation.
- TF-IDF cosine similarity — Replaces Jaccard word similarity, which over-weights common boilerplate. IDF down-weights high-frequency terms like "holders", "Preferred Stock", "Corporation"; cosine similarity on TF-IDF vectors produces more discriminating scores.
Before: 949 phantom insertions (rebuild fallback) → After: 332 insertions (inplace, correct)
What's Changed
Bug Fixes
- fix(docx-core): order-constrained TF-IDF paragraph matching prevents phantom redlines by @stevenobiajulu in https://github.com/UseJunior/safe-docx/pull/62
Other Changes
- Add translated READMEs (zh, es, pt-br, de) by @stevenobiajulu in https://github.com/UseJunior/safe-docx/pull/60
- chore(release): bump to 0.7.1 — fix paragraph similarity alignment (#61) by @stevenobiajulu in https://github.com/UseJunior/safe-docx/pull/63
Full Changelog: https://github.com/UseJunior/safe-docx/compare/v0.7.0...v0.7.1
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About UseJunior/safe-docx
Surgical editing of existing Word .docx files with formatting preservation, tracked changes, comments, footnotes, and document comparison.
Related context
Beta — feedback welcome: [email protected]