Skip to content

Commit 4e753aa

Browse files
committed
fix(cli): say "validates" where a sentence means the renamed check
The passes matched the command's name, not its inflections, so prose saying a rule "verifies clean" kept meaning the old `verify`, which is now `validate`, while the word `verify` now names the fixture-running command. Two of those sentences are constraint rationales published in `reference.json`; the rest are comments and test prose. The spec delta also stops carrying three scenario titles that named the old commands ("Verifying one rule catches a collision", "Test reports the findings its fixtures produced", "Testing a runtime rule reaches no network"). A MODIFIED block cannot rename a scenario, so their two requirements move to REMOVED plus ADDED, as "Validate checks a rule's required components" already had. Checked on a scratch archive: every prior scenario survives, and only the five intended titles change. Found in the second review of #492.
1 parent 2299495 commit 4e753aa

17 files changed

Lines changed: 183 additions & 179 deletions

File tree

‎openspec/changes/rename-rule-checks/specs/cli-rule-validation/spec.md‎

Lines changed: 158 additions & 154 deletions
Large diffs are not rendered by default.

‎packages/cli/assets/reference.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"engine": "vale",
8888
"enforcedBy": "validate",
8989
"summary": "A rule's `.vale.ini` assigns nothing above its first matcher; `StylesPath` and `MinAlertLevel` belong to the run.",
90-
"rationale": "Vale reads a rule assignment placed above the first `[matcher]` as a run-level key, warns `W101` on stderr, ignores it, and exits zero. The rule verifies clean while enabled nowhere. `StylesPath` and `MinAlertLevel` are properties of the assembled run config, which sets both; a per-rule copy is either redundant or silently fights the header."
90+
"rationale": "Vale reads a rule assignment placed above the first `[matcher]` as a run-level key, warns `W101` on stderr, ignores it, and exits zero. The rule validates clean while enabled nowhere. `StylesPath` and `MinAlertLevel` are properties of the assembled run config, which sets both; a per-rule copy is either redundant or silently fights the header."
9191
},
9292
{
9393
"id": "vale-config-breadcrumb-required",
@@ -129,7 +129,7 @@
129129
"engine": "vale",
130130
"enforcedBy": "validate",
131131
"summary": "Some matcher assigns `<id>.<id> = YES`.",
132-
"rationale": "No style is loaded, so a rule is off until a matcher turns it on. A config whose every matcher says `NO`, or none says anything, leaves the rule present but off: it verifies, it is assembled, and it reports nothing."
132+
"rationale": "No style is loaded, so a rule is off until a matcher turns it on. A config whose every matcher says `NO`, or none says anything, leaves the rule present but off: it validates, it is assembled, and it reports nothing."
133133
},
134134
{
135135
"id": "vale-config-disable-after-enable",

‎packages/cli/src/filesystem/migrations/0005-rule-directories.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ async function pruneEmpty(
267267
* its own style, so the same rule is now `<id>.<id>`.
268268
*
269269
* Carrying the old name across would leave a config Vale parses happily,
270-
* reports nothing for, and exits zero on — the rule verified, the check ran,
270+
* reports nothing for, and exits zero on — the rule validated, the check ran,
271271
* and no finding ever appeared. Found by migrating a real project and noticing
272272
* the Vale rule stopped firing while ast-grep kept working.
273273
*/

‎packages/cli/src/rules/constraints.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const RULE_CONSTRAINTS = [
133133
// Every entry below is decided by `schemas/vale-config.ts` over the ini AST,
134134
// never over the file's text. The common thread is that Vale accepts each of
135135
// these configs and does something other than what the author wrote, with a
136-
// zero exit and an empty report: the rule verifies, runs, and finds nothing.
136+
// zero exit and an empty report: the rule validates, runs, and finds nothing.
137137
//
138138
// `enforcedBy` reads `validate` for all of them even though `check` runs the
139139
// same schema and refuses the Vale run on a rejection. The field answers a
@@ -148,7 +148,7 @@ export const RULE_CONSTRAINTS = [
148148
summary:
149149
"A rule's `.vale.ini` assigns nothing above its first matcher; `StylesPath` and `MinAlertLevel` belong to the run.",
150150
rationale:
151-
"Vale reads a rule assignment placed above the first `[matcher]` as a run-level key, warns `W101` on stderr, ignores it, and exits zero. The rule verifies clean while enabled nowhere. `StylesPath` and `MinAlertLevel` are properties of the assembled run config, which sets both; a per-rule copy is either redundant or silently fights the header.",
151+
"Vale reads a rule assignment placed above the first `[matcher]` as a run-level key, warns `W101` on stderr, ignores it, and exits zero. The rule validates clean while enabled nowhere. `StylesPath` and `MinAlertLevel` are properties of the assembled run config, which sets both; a per-rule copy is either redundant or silently fights the header.",
152152
},
153153
{
154154
id: "vale-config-breadcrumb-required",
@@ -198,7 +198,7 @@ export const RULE_CONSTRAINTS = [
198198
enforcedBy: "validate",
199199
summary: "Some matcher assigns `<id>.<id> = YES`.",
200200
rationale:
201-
"No style is loaded, so a rule is off until a matcher turns it on. A config whose every matcher says `NO`, or none says anything, leaves the rule present but off: it verifies, it is assembled, and it reports nothing.",
201+
"No style is loaded, so a rule is off until a matcher turns it on. A config whose every matcher says `NO`, or none says anything, leaves the rule present but off: it validates, it is assembled, and it reports nothing.",
202202
},
203203
{
204204
id: "vale-config-disable-after-enable",

‎packages/cli/src/rules/deliver.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export type DeliveryAssessment =
155155
* Decide whether a whole file set may be written, BEFORE anything is written.
156156
*
157157
* Every check runs against the set as a unit and the first failure refuses all
158-
* of it. A partially written rule directory is worse than none: it verifies as
158+
* of it. A partially written rule directory is worse than none: it validates as
159159
* a broken rule two steps from the cause, and the delivery that produced it has
160160
* already reported success.
161161
*/
@@ -380,7 +380,7 @@ async function clearSymlinkedPath(
380380
* case-insensitive filesystem a delivered `captures/Logs.yml` written into an
381381
* existing `captures/logs.yml` keeps the on-disk spelling, so an exact compare
382382
* would find `captures/logs.yml` unmentioned and delete the file just written —
383-
* leaving a rule with no capture, which verifies as incomplete and never fires.
383+
* leaving a rule with no capture, which validates as incomplete and never fires.
384384
* The cost is on a case-sensitive filesystem, where a stale sibling differing
385385
* only in case is spared. That is the right way round to be wrong: sparing a
386386
* stale file leaves the merge behavior this change narrows, while deleting a
@@ -521,7 +521,7 @@ export class PurgeIncompleteError extends Error {
521521
* - **Writes come first, deletions second.** Every delivered file is on disk
522522
* before anything is unlinked, so an IO failure part-way leaves a directory
523523
* that is a superset of the blessed rule — the merge behavior being narrowed,
524-
* which is survivable — rather than a rule missing pieces, which verifies as
524+
* which is survivable — rather than a rule missing pieces, which validates as
525525
* incomplete or silently never fires. That ordering is what makes a failed
526526
* purge recoverable rather than dangerous: an entry that cannot be removed
527527
* is reported by name and the rest of the pass still runs, so the worst case

‎packages/cli/src/rules/demo/manifest.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export interface DemoManifest {
6262
* Listed rather than globbed. Several are dot-paths — under `.tests/`, or
6363
* named `.env` — and glob helpers skip those by default, so a glob would
6464
* embed the rule file and silently omit every case. That produces a rule that
65-
* writes, verifies, and has nothing to prove, which is the exact failure
65+
* writes, validates, and has nothing to prove, which is the exact failure
6666
* these runners exist to catch.
6767
*/
6868
testPaths: readonly string[];

‎packages/cli/src/rules/id-uniqueness.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function collisionFrom(
3737
/**
3838
* Whether this one id is held by more than one engine.
3939
*
40-
* Asked per rule rather than only over the whole tree, because verifying the
40+
* Asked per rule rather than only over the whole tree, because validating the
4141
* rule an author just wrote is the moment a collision is cheapest to fix. A
4242
* whole-project pass that only diffs the engine id lists would say nothing at
4343
* exactly that moment.

‎packages/cli/src/rules/vale/run.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export const VALE_TIMEOUT_MS = 60_000;
8686
* still exiting zero. That combination is not noise. Vale reports a rule
8787
* assignment placed outside any section as `W101 … is ignoring it` — on stderr,
8888
* with exit 0 and a well-formed empty result on stdout — so discarding it
89-
* leaves an author with a rule that verifies, runs, and reports nothing.
89+
* leaves an author with a rule that validates, runs, and reports nothing.
9090
* Surfacing it is what makes the section-less scaffold safe: the mistake it
9191
* invites becomes legible instead of silent.
9292
*/

‎packages/cli/src/rules/vale/verify.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export interface ValeRuleVerification {
176176
* Carried on the verification rather than dropped at this seam because the
177177
* `W101 … isn't a core option` warning — what Vale says about an assignment
178178
* placed above the first `[…]` section — arrives on exactly this path: exit
179-
* zero, empty findings, a rule that verifies clean while Vale ignores it.
179+
* zero, empty findings, a rule that validates clean while Vale ignores it.
180180
* Empty when Vale was never run (a one-sided fixture set short-circuits) and
181181
* when it ran with nothing to say; the two are not worth distinguishing, and
182182
* empty-never-absent lets a caller concatenate without a fallback.

‎packages/cli/src/schemas/rules-verify.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const layerResultSchema = z.object({
5252
* Layer 1, which alone can also report things that are true but not failures.
5353
*
5454
* An sg rule spelled `language: typescript` reaches the right parser and
55-
* verifies clean, but `TypeScript` is how ast-grep spells it. That is worth
55+
* validates clean, but `TypeScript` is how ast-grep spells it. That is worth
5656
* saying on a rule that passed, so it cannot ride in `errors`.
5757
*
5858
* A list, one notice per element, because a rule can be true of more than one

0 commit comments

Comments
 (0)