fix(vale): drop the 128 KB file-size guard - #356
Conversation
|
@claude /review |
|
Claude finished @thecodedrift's task in 2m 57s —— View job Review completeReview mode: incremental — read 0 prior review thread(s) before reviewing.
AssessmentThis is a clean, tightly-scoped deletion PR that removes the 128 KB Vale file-size guard (
One point worth a second look but not raised as a hard finding (I don't have an exact CLAUDE.md rule to quote against it, since the bump-choice guidance in the repo's CLAUDE.md is written in terms of added surface, not a removed safety guard): the changeset is No inline comments posted — nothing met the bar for a concrete, confirmable bug. |
|
I want to build on Claude's comment. I think what needs to happen is #356 will need upgrade guidance. We already know how to write this. It's designed to help the agent migrate to a new version which means checking if there are large files that are now being checked which should be excluded. |
Read, nothing to change. On the one observation: the — AI Coding Agent |
VALE_MAX_FILE_BYTES was written against Vale 3.20.0, whose lint time was superlinear in the size of one Markdown block. The CLI vendors 3.21.0, whose perf commits made that cost linear: the 3 MB single-block reproduction from #325 measures ~230 ms on the vendored binary where 3.20.0 took ~81 s, and 128 KB of one block ~26 ms. The cap no longer separates a cheap file from an expensive one, so the preemptive exclusion, its notice, the per-run override seam, and the section-glob threading that scoped its scan are removed with their tests. The per-file retry for an unparseable front matter is unchanged. The update ledger gains a 0.11.3 line, since a file 0.11.2 reported as skipped now produces findings, and both touched agent topics bump.
26d55a8 to
3b3666f
Compare
What
Removes the 128 KB oversized-file guard from the Vale engine:
VALE_MAX_FILE_BYTESand themaxFileBytesper-run override inpackages/cli/src/rules/vale/run.ts, thefindOversizedFilesscan andoversizedFilesNoticeinpackages/cli/src/rules/vale/formats.ts, thesectionGlobs/valeSectionsthreading that existed only to scope that scan, and their tests.AssembledValeConfig.sectionsstays (it is a fact the generator states; its docblock now says its consumer is gone).The
updateledger gains aMigrating to 0.11.3line (topic v6 → v7), andcreate-vale-ruledrops the paragraph that told authors large files are skipped (topic v8 → v9). A changeset (patch, pre-1.0) carries the release note with the numbers below.Why
The guard was added in 0.11.2 (#323) against Vale 3.20.0, where lint time was superlinear in the size of a single Markdown block (#325). The same release moved the vendored Vale to 3.21.0, whose perf commits (
ed711769,252d0963) made that cost linear at roughly 2.8 µs per sentence regardless of block structure. At that rate a file would need to reach several hundred megabytes before it threatened the 60 s run budget, so the cap no longer separates a cheap file from an expensive one and only costs users findings in files it skips. No replacement bound is kept;VALE_TIMEOUT_MSremains the ceiling on damage.Measured
Re-ran https://github.com/thecodedrift/reproduction_vale_blocks (
npm run fixture:create && npm run bug:reproduce, three passes) with its@taskless/vale-darwin-arm64resolved to the exact binary this worktree vendors (3.21.0-20260915061224,vale --version→3.21.0), plus two extra single-block sizes with the same sentence and rule. darwin/arm64, warm, median of three. The 3.20.0 column is the reproduction's own recorded run and the removed docblock's measurement.huge.md)wrapped)Raw passes:
huge.md247 / 228 / 231 ms;wrapped.md287 / 287 / 314 ms; 128 KB 77 / 21 / 26 ms (first pass paid the page-in); 25 MB 3,099 / 2,071 / 2,216 ms. Alert counts were 42,500 on both large fixtures, matching the reproduction's invariant.What stays
escapeGlobLiteral's docblock now cites that retry as the reason it escapes rather than drops a literal path.vale-run.test.tsis kept; its fixture no longer needs themaxFileBytesseam to reach the binary.[section]-vs---globdepth-matching contract test invale-vendor-contract.test.tsis kept as a pinned Vale fact; its docblock no longer names the guard as the consumer.Spec
No OpenSpec change: nothing under
openspec/specs/mentions128,VALE_MAX_FILE_BYTES, or an oversized-file exclusion.Checks
pnpm build,pnpm typecheck,pnpm lint(No issues found.),pnpm --filter @taskless/cli test(94 files, 1518 tests) all pass.Fixes #351
Refs #350
Refs #325
Refs #323