Repository navigation
chore(vale): upgrade to Vale 3.24.0 - #546
Conversation
77dce30 to
e9d5cb9
Compare
…'s tests: key Vale 3.24.0 warns W101 about every key it does not recognise inside a matcher, including the `tskl) rule` breadcrumb. That printed one notice per matcher on every check, and the warning ahead of a fatal error's JSON broke the per-file narrowing from #300. Assembly now comments the breadcrumb out of the config Vale reads, and runVale peels Vale's warning lines off before parsing its error, one notice each. The converter E100 dropped its `[lintAdoc]` checker tag, so the contract asserts the format Vale now names instead. New 3.24.0 pins cover the W101, warning-then-error order, C# tool directives, a non-breaking space after a link, and files no rule runs on. `validate` and `verify` now reject a Vale rule's `tests:` key: Taskless verifies Vale rules by their .tests/pass and .tests/fail documents and never runs `vale test`.
`validate` refuses a Vale rule's `tests:` key from 3.24.0 on, and 0.12.0 had accepted it. A rule migration keyed on Vale 3.24.0 now writes each case's input as a fixture under .tests/fail when it expects an alert and .tests/pass when it expects none, named for the case with its format as the extension, then deletes the block by its byte range. It never overwrites a fixture, reruns as a no-op, and leaves a rule whose cases read through a view or name another rule file untouched. No issued rule carries the key.
|
@claude /review |
|
Claude finished @theCodeDrift's task in 4m 20s —— View job Review complete
Review mode: incremental — read 0 prior review thread(s) before reviewing. The only prior content was the SummaryThis is a well-scoped, carefully-reasoned upgrade PR (the branch already carries the two stacked fix/feature commits from #549 and #551, so the diff reviewed here is the full combined change). I read all 22 changed files plus the surrounding source ( Specific things I verified rather than assumed:
Nothing here needs a fix before merge. Nice use of |
Acknowledged: no findings on the combined diff (#549 and #551 merged down), and Validate is green on — AI Coding Agent |
Stack (root → tip):
The
@taskless/vale-*packages are published ahead of what@taskless/clipins.This moves all six pins from
3.23.0-20260930045834to3.24.0-20261005234241— Vale 3.24.0 — and regeneratespnpm-lock.yaml. The pins move together on purpose: the platformpackages are selected by optional dependency, so a straggler left at
the old version is a different Vale on one platform than on the others.
It also moves
VALE_VERSIONincapabilities.tsto3.24.0and regeneratessrc/generated/vale-vocabulary.tsfrom the new binary, and the workflow ran
engine-version-consistencyagainst the result before pushing. Whatthis does not carry is judgment: if the contract suites below
report a failure, Vale 3.24.0 changed a measured behaviour,
and that edit, the
updateledger, any migration, and the releasenote's prose belong in a child pull request. So does a row for each
format reader listed below.
This is the half that reaches a user. Republishing the platform
packages changes nobody's install, because the CLI pins each one
exactly; merging this is what ships the new Vale.
This pull request rolls: if another set is published before it merges,
the branch, title, and body are rewritten to the newer version rather
than a second pull request being opened. Push a commit to the branch
and that stops — the workflow will not force-push over a commit it did
not write.
Measured against Vale 3.24.0
Compared with 3.23.0, which is what
mainpins. Validate on a pull request this workflow opens waits for a maintainer to approve it, so this section is the check that ran.Contract suites
8 of 211 failed. The new Vale changed a recorded behaviour. The measured edit, the
updateledger, and any migration belong in a child pull request that merges down into this branch.Format readers upstream added
internal/lint/code/cs.goEach can route an extension that
VALE_FORMAT_TIERSincapabilities.tshas no row for, and an unlisted extension is never probed. Find whereinternal/core/format.gosends it, probe the extension against the new binary, and add a row. A reader that needs an external converter is the dangerous case: the missing row becomes a crash that aborts every Vale rule in the run. (diff)Upstream release notes — 3.24.0
https://github.com/vale-cli/vale/releases/tag/v3.24.0
Contains #549
#546 moves the six
@taskless/vale-*pins to Vale 3.24.0. Run locally it has 10 failures, not the 8 its report lists: the report runs only the contract suites, and the two it missed were a real break for users. This PR makes the upgrade correct and pins what 3.24.0 changed. It merges down intovendor/vale/upgrade, so the pin, the fixes and the guidance reachmaintogether.The break the report missed
Vale 3.24.0 warns about every key it does not recognise inside a matcher (upstream
validateLevel). That includes thetskl) rule = <id>breadcrumb every rule's.vale.inicarries:Two effects:
checkprinted one notice per matcher.Pathand with it the One unparseable file zeroes findings for the whole check run #300 narrowing. One file with bad front matter took every other file's Vale findings down again (mixed-engine-checkcaught it).Fix, at assembly, with no migration.
valeRuleBlockputs#in front of each breadcrumb line, at the lines the config schema already located (breadcrumbLineson the verdict). Nothing searches the text. Line counts are kept, so a line Vale reports is still the author's. Rule files on disk and recipes are unchanged.And in
runVale. Vale's leadingW\d{3}lines are peeled off before its error is parsed, so a user's own warning (3.24.0 also warns on<id>.<id> = maybe) cannot block the narrowing either. Each warning is now its own notice.The 8 reported failures
The converter E100 dropped its checker tag.
[lintAdoc] Runtime erroris nowasciidoctor not found; it's needed to read AsciiDoc. The run still dies the same way (exit 2,--no-exitdoes not help), and only the test read the tag.VALE_CONVERTER_CHECKERSbecomesVALE_CONVERTER_READERS, keyed to the format Vale names..xmlkeeps its host split: wherexsltprocis present it reports the missing stylesheet instead.What changed that no test caught
A new
Vale 3.24.0block invale-vendor-contract.test.ts, each case run against 3.22.0 and 3.24.0 on the same fixture:W101# tskl) rulecomment in a matcherW101lines, then the JSON// ReSharper disable,// NOSONAR.adocwhere every rule isNOThe new C# reader the report flagged (
code/cs.go) moves no tier..csand.csxwere alreadycommentrows, read with the C grammar. Conditional sections ([*.md if .Meta.draft]) passvalidateand work incheckas-is.tests:is refusedVale 3.24.0 ships
vale test, which runs cases written in a rule'stests:list. Taskless never runs it:verifyjudges a Vale rule by its.tests/passand.tests/faildocuments.validateandverifynow reject the key rather than let a rule read as tested by cases nothing runs.checkstill runs such a rule. The vocabulary keepstests, since Vale reads it, and the corpus row moves toDIVERGENCESso the disagreement is counted.A deterministic rule migration that turns each case into a fixture follows as its own PR on #548's
update --rulesmechanism, now onmain. Until then the ledger gives the steps by hand.Guidance
update(topic v18): the Vale entries are folded into the### Migrating to 0.13.3section the ast-grep stack (chore(ast-grep): upgrade to ast-grep 0.51.0 #545/test(ast-grep): make the ast-grep 0.51.0 upgrade land green #548) put onmain, after its paragraphs, and the opener names both engines. The header stays v18, since both ship in one release. The opener says the one thing needing work by hand is a Vale rule carryingtests:, until the migrator lands.patch.Checks
pnpm typecheck,pnpm lintandpnpm test(2497 passed) are green locally on this branch, rebased ontomainwith ast-grep 0.51.0 and built.Not in this PR
vale-runandmixed-engine-check, which would have caught the two failures it missed.Refs #546
Contains #551
#549 makes
validateandverifyrefuse a Vale rule'stests:key. 0.12.0 had accepted it, so a rule written since then would stop validating on upgrade. This adds a rule migration on #548's mechanism, soupdate --rulesmoves those cases into fixtures instead of leaving the author a by-hand list. It merges down intovendor/vale/3-24-0-contract.What it does
src/rules/rule-migrations/vale-3-24-0-tests-to-fixtures.ts, registered inRULE_MIGRATIONS, keyed on Vale 3.24.0. It runs when the recorded Vale engine is below 3.24.0.A case is a document and whether the rule fires on it, which is exactly a fixture. An in-rule case loads only its own rule, so any alert it expects is that rule's:
wantwith any text.tests/fail/wantthat is empty.tests/pass/want, butcontains.tests/fail/absent.tests/pass/input, byte for byte. It is named for the case (flags a hedge→flags-a-hedge.md), withformatas the extension (mdby default, as Vale reads it). Whatwantpins beyond that (line, column, message) is not something verification needs, and it is not carried.tests:block is removed by its byte range from the YAML parser. Nothing is re-serialized, so comments and every other line stay as written.-2. A rerun, or a run that died between the two steps, changes nothing it already did.view(this layout defines none) or names another rule file inrule:. Moving half its cases would be harder to finish than none.validatekeeps naming that rule.Issued rules
Per the rule-migration contract, the rewrite only applies to shapes the service never issued. Nothing in the Cloud corpus carries
tests:(confirmed 2026-10-20), so no signed rule is touched. Rules users wrote themselves are what this is for.Guidance
update(topic v18): the 0.13.3 opener is back to "Nothing here needs work by hand." Thetests:paragraph now reads like the Haskell one:update --rulesmoves them for you, so don't do it by hand. It names the view andrule:cases as the exception.Tests
rule-migrate.test.ts: block removal for an indented list, a list at the key's column, a blank line inside, and a block ending the file with no newline. The bucket for each kind of case, naming and extensions, the rules it leaves alone, idempotence, finishing an interrupted run, never overwriting, failing on an unreadable rules tree, and keying on 3.24.0. A migrated rule passesvalidateValeRule.reconcile-marker.test.ts:update --rulesthrough the built CLI moves the cases, reports the files, and stamps the engines.sg, so the Vale migration also read as pending in them.pnpm typecheck,pnpm lintandpnpm test(2526 passed) are green locally, built.Refs #549