Repository navigation
Description
The shape
Across the 2026-09-15 merge train, 3 of 5 ejections were the same defect class, and every one had fully green CI: a test that proves the code was written rather than that it runs. This is the third consecutive train where this shape dominated the ejections, so it is one upstream habit, not a run of unrelated bugs.
Three spellings, all of which pass identically when the code above throws the result away:
- Source-text regex —
readFileSync+toContain,inspect.getsource, a slice anchored on a comment string. - A tautology — a bound check whose parameters make the two candidate bounds numerically equal.
- An unverified rationale — a claim about what CI would do, asserted in a docstring and a
learnings.mdentry, never negative-controlled.
The three from this train
#2811 — main.js's request/response interceptors, the storage listener, and handlePlatformUnauthorized are asserted by readFileSync + stripComments + toContain. vitest.config.js pins environment: 'node'; nothing mounts, no spec imports main.js, and no spec reads App.vue at all. Mutation, on the PR head, baseline 2937 green:
| Mutation | Result |
|---|---|
restore authStore.logout(); router.push('/login') on the stale branch — literally the bug the PR reports |
2937 passed, 0 red |
| invert the storage listener so a sibling login ends this tab's session | 2937 passed, 0 red |
delete the stale arm from the pure verdict function |
2 red ✅ |
The pure-function half is genuinely tested. The wiring half — which is where all three acceptance criteria live — is not executed anywhere.
#2817 — test_portal_attempt_ceiling_still_covers_one_worst_attempt, a deliberate, well-named bound check, asserts svc.portal_attempt_ceiling_seconds(t) >= t + 10 + 300, which reduces to t+310 >= t+310. It cannot fail for any value of the bug, and the real defect (a 6610s wall-clock on a 3600s turn, invalidating the slot lease and the watchdog) sat behind it. The PR's own learnings.md entry in the same diff says "a bound-check test must be parameterised away from the coincidence."
#2805 — the PR body, a docstring, and a new learnings.md entry all assert that omitting a SQLite migration "turns that guard red forever." One negative control (remove the registration, run test_schema_parity) → 4 passed. The guard is structurally blind to that column, so a DROP TABLE + rename-swap of a live production table was running at boot on every SQLite install for a CI benefit that does not exist — and the false claim was about to land in a file /autoplan reads as fact.
Why it keeps landing
Every one of these passes review and CI by construction. The tests are present, well-named, numerous, and green; nothing in the pipeline distinguishes "asserts the behaviour" from "asserts the source". The reviewer sees coverage.
Note the near-miss in the same train: #2819 is 6/10 source-text substring matches and was kept — because its live consumer is GitHub Actions itself, and a real run on the PR proved the workflow registered. Same test shape, opposite verdict. The discriminator is not the assertion style, it's whether a live consumer executes the value.
Suggested direction
Make the question mechanical rather than a reviewer's instinct. Two greps settle nearly every case, and the second is the one that decides:
# a) are the assertions source-text?
grep -nE 'readFileSync|inspect\.getsource|indexOf\(|toContain\(' <test file>
# b) does the changed value have a live consumer? definition + test only IS the finding
grep -rn '<changed symbol>' src/Concretely:
- Add the coverage question to
/validate-prand/reviewas an explicit, answered-first step — does any test execute the changed path, and what is the live consumer of every value this PR changes? It is already in/merge-trainPhase 2 and is what caught all three. - Prefer mutation as the evidence standard for a bug fix: revert the fix, show the new test goes red. fix(ci): guard workflow triggers that are inert on dev until they reach main (#2814) #2816 did this (three mutations, including a novel case) and was the strongest member of the train by a distance.
- Treat a frontend
refthat is declared, bound to a child, and never assigned as conclusive on its own —grep -n '<theRef>'returning only the declaration and the binding is enough. - Where a test's whole purpose is a bound, require it to be parameterised away from the coincidence — assert the relationship, not a literal, at a point where the two candidate bounds differ.
Cross-ref #2828 (the CI-gap sibling from the same run). Prior occurrences of this shape: the 2026-09-13 and 2026-09-14 trains (#2648 discarded a correct SQL count one layer up; #2645 assigned error_code only for 503 while the failure arrives as 429; #2619 declared canvasLimit, bound it, never assigned it).
Found by /merge-train, 2026-09-15.
🤖 Generated with Claude Code
Activity
dolho commentedon Sep 16, 2026
/claim
github-actions commentedon Sep 16, 2026
Claimed by @dolho. Label
status-in-progressadded.Next steps:
feature/2829-<short-slug>Fixes #2829docs(testing): the evidence bar — a test executes the path, a fix rec…
docs(testing): the evidence bar — a test executes the path, a fix rec…
test(frontend): a spec can mount a component — jsdom + @vue/test-util…
feat(workspace): theme switch — light / dark / system at the top righ…