Repository navigation
fix(vale): ship Vale 3.27.0 with its grammars - #705
Conversation
Pin @taskless/vale-grammars at the platform packages' exact version and resolve its grammars directory beside findValeBinary. Every Vale child gets VALE_GRAMMARS_PATH set to it, always replacing a value inherited from the user's shell, which would name grammars nobody pinned. The vendor contract spawns Vale in the same environment, and the six cases #703 failed pass again. The resolver and its spec are exported from @taskless/cli/node/runtimes, so a verifier runs Vale rules with the same grammars check does.
A config/grammars directory in .taskless/rules/vale would hand Vale grammars ahead of the pinned ones, since that tree is every assembled config's StylesPath. A new vale-tree-no-grammars constraint refuses it: validate reports it against every Vale rule, and assembly refuses the check run through one shared check. Presence is refused, not contents. The vendor contract now asks the binary whether every comment-tier extension has a pinned grammar, naming the one that is missing. engine-version-consistency reads dependencies, where the grammar pin lives, and holds it to the platform pins' exact version. Regenerate the reference corpus for the new constraint.
The 0.13.8 ledger entry says no rule reports anything different, and that a config/grammars directory in .taskless/rules/vale is now refused. The changeset grows to say the grammars ship as their own package and what is refused. Reconcile this repository's own rules to Vale 3.27.0 with update --rules.
Every task is done and every prior scenario in the three standing specs survives: vale-binary-packages 18 -> 27, cli-vale-rule-engine 41 -> 48, cli-runtime-binary-export 8 -> 10.
|
@claude /review |
|
Claude finished @theCodeDrift's task in 4m 7s —— View job Review completeReview mode: incremental — read 0 prior review thread(s) before reviewing.
SummaryThe change is well-scoped and consistent with the repo's existing patterns. Two [New] findings posted inline, both on
Everything else — the grammar/binary env wiring, the shared tree-check between |
…ectory exists Review on #705 asked whether validate and check disagree on a project with no Vale rules and a stale config/grammars directory. Measured: both fail, because config/ itself is listed as a rule directory and validate judges it. That held by accident, so a test now pins it. The message said the directory "holds Vale grammars" even when empty, which is also refused. It now says the directory exists.
Both inline findings are answered in 88d3f4b. The zero-rule case was measured to fail in both — AI Coding Agent |
Stack (root → tip):
Ships Vale 3.27.0 with no change in what any rule reports. This is the second landing of
vale-grammars-package, stacked on #704, which publishes the grammar package. It carries #703's pin bump (re-signed) and the fix that makes it green, and it supersedes #703.The problem #703 hit
Vale 3.27.0 no longer bundles the tree-sitter grammars it uses to read comments in source code. Without them it falls back to finding comments by their delimiters. Six vendor-contract cases failed on #703 as a result: directive comments (
//nolint,# noqa,// NOSONAR, …) and docstring:param:lines were linted as prose, one-line CSS/* */comments were skipped, and every run printed oneW101 grammar … is not installedper language.What this does
@taskless/vale-grammars@3.27.0-20261117230017, the same exact version as the six platform packages, as a regular dependency. The lockfile integrity matches the tarball that was verified before the manual publish.VALE_GRAMMARS_PATHset to the resolved package directory (src/rules/vale/grammars.ts,valeEnvironmentinrun.ts). The value is always replaced, never inherited, because a value from the user's shell would name grammars nobody pinned. If the package doesn't resolve, the variable is dropped, and Vale's own W101 warnings reach the user as notices.vale-tree-no-grammarsconstraint. A.taskless/rules/vale/config/grammars/directory, which Vale would read ahead of ours, is refused.validatereports it against every Vale rule, and assembly refuses thecheckrun, through one shared check. The directory's presence is what's refused, not its contents.resolveValeGrammars/VALE_GRAMMARSfrom@taskless/cli/node/runtimes, so a verifier runs Vale rules with the same grammars.go.wasmwithheld, only the.gocase fails, naming thegogrammar.engine-version-consistencynow readsdependencies, where the grammar pin lives. Before, it silently skipped that pin.updateledger entry, the grownvale-3-27-0changeset (patch),.taskless/reconciled to Vale 3.27.0, and the reference corpus regenerated for the new constraint.Checks
Full CLI suite: 3413 passed.
typecheck,lintand the 523 script tests pass. The vendor contract passes 243 of 243 with noVALE_GRAMMARS_PATHin the shell.Landing
Merge #704 first; the gate already reports all seven packages published, so that merge publishes nothing. Then rebase this onto
main. #703 closes when this merges.Closes #703