• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

umputun / revdiff / 32328749387
92%

Build:
DEFAULT BRANCH: master
Ran 20 Aug 2026 03:36AM UTC
Jobs 1
Files 79
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Aug 2026 03:34AM UTC coverage: 90.115% (+0.002%) from 90.113%
32328749387

push

github

web-flow
fix(worddiff): guard intra-line diff cost by LCS table size, not line length (#328)

* fix(worddiff): guard intra-line diff cost by LCS table size, not line length

The 500-byte per-line cap skipped word-diff on any pair where either side was longer, so a
markdown paragraph living on one physical line silently got no highlighting while the status
bar still showed the mode as on. Byte length is a poor proxy for the cost it was guarding:
500 repeated letters tokenize to a single token, 500 bytes of minified JSON to nearly 300.

Gate on the LCS table size instead — minus tokens times plus tokens, budget 4M cells, about
32MB and 17ms for one pair, paid once per file load or word-diff toggle. The byte cap stays
only as a cheap pre-filter at 20000 bytes so minified input never reaches the tokenizer.

Related to #323

* test(worddiff): pin each cost guard in isolation, correct the budget's godoc

The byte pre-filter subtest used two identical prose lines, which the cell budget and the
identical-lines branch both reject on their own — it passed with the pre-filter deleted. It now
uses a single-token pair that clears every other gate, with a control pair sized to fit the
pre-filter, so the assertion can only be answered by the byte gate.

The maxDiffCells godoc said the budget was paid once per file load. It bounds one pair;
recomputeIntraRanges calls ComputeIntraRanges once per paired remove/add line, so a diff holding
many long pairs pays it for each.

Related to #323

* docs(worddiff): correct the test comment on what the byte cap guards

TestChangedRanges_SkipsVeryLongLines still carried the pre-change rationale, a near-copy of the
godoc this branch replaced, so the package held two contradictory reasons for one constant. The
byte cap is a tokenizer pre-filter; maxDiffCells guards the LCS cost. The fixture below the
comment is its own counter-example: 20001 repeated letters is a single token.

Also correct prose's godoc, which returns exactly nbytes rather... (continued)

3 of 3 new or added lines in 1 file covered. (100.0%)

11532 of 12797 relevant lines covered (90.11%)

3438.2 hits per line

Jobs
ID Job ID Ran Files Coverage
1 32328749387.1 20 Aug 2026 03:36AM UTC 79
90.11
GitHub Action Run
Source Files on build 32328749387
  • Tree
  • List 79
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 09e5b073 on github
  • Prev Build on master (#32318205228)
  • Next Build on master (#32339058433)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc