Commit 27f9072
#4394 removed the instance — `validateReadonlyFlowWrites` was hand-wired into
`os validate` and `os compile` and never into `os lint`, so an `error`-level
gate left `os lint` returning clean for stacks `os compile` refuses. It did not
remove the failure MODE.
A rule wired into two commands out of three produces no failing assertion
anywhere: every command's own tests pass, the rule's unit tests pass, and the
only symptom is the three commands disagreeing about the same stack. That is how
the last one survived from #3425 until #4394, with the suite's own header naming
it "the standing proof" of the drift the suite exists to end — a comment doing a
test's job.
The invariant worth pinning is `os lint` ⊇ `os compile`'s gate set: lint is the
cheap pre-flight, compile is the gate, and a green lint followed by a red
compile makes the pre-flight worthless — worse than worthless for an agent,
whose remaining options are re-verifying everything or learning to distrust the
signal.
The guard asserts each command calls `validateReferenceIntegrity` and that none
imports a suite member directly — the import is what a second call site starts
with, so catching it closes the window between adding the import and adding the
call. It scans source rather than spying, for the same reason lazy-deps.test.ts
scans src: vitest inlines imports through its transform, so a module-cache probe
cannot prove which symbols a command file actually reaches for. A third
assertion keeps the other two from passing vacuously if the suite were emptied
or its export renamed.
Verified to FAIL on a reintroduced direct import in compile.ts, not merely to
pass today. Test-only; no runtime or behaviour change.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent ffd2ce2 commit 27f9072
2 files changed
Lines changed: 106 additions & 0 deletions
File tree
- .changeset
- packages/cli/src/commands
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
Lines changed: 82 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
0 commit comments