Uh oh!
There was an error while loading. Please reload this page.
docs(scripts): state the ablation-on-dist hazard by its true condition, not as a dogfood property - #8951
Merged
os-project-manager merged 1 commit intoAug 16, 2026
Conversation
…y suite The header framed the false green as a property of `packages/qa/dogfood`. It is not. The true condition is any test whose subject resolves through the dependency's `exports` (which point at that package's built `dist/`) with no vitest alias redirecting the specifier back to source. That set is already enumerated as `KNOWN_UNALIASED_TEST_IMPORTS` in `scripts/check-test-source-alias.mjs` -- 61 packages, 305 pairs -- and every entry carries the hazard. Measured twice outside dogfood: plugin-email -> platform-objects and plugin-auth -> core. Also recorded, all in the same header: - why the false green is worse than uninformative: an un-rebuilt ablation whose purpose was to prove a new gate can fail returns "the gate did not fire", which reads as evidence the gate is broken -- so a dev hunts a fix that is not needed, or weakens a working gate until it "fires"; - both halves of the mechanical rule -- rebuild after mutate AND rebuild after restore, proving each reached dist/ -- since the restore half is the one that gets skipped; - the measured limitation of the whole-package scan: a marker the package also writes elsewhere breaks both modes in opposite directions, so a per-field ablation needs a property read rather than a substring scan. The worked example is kept close to verbatim from the filing measurement. Comment-only: every changed line is a `//` comment and the executable code is byte-identical. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011RB4waLuNbdruCo6X9oobm
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This was referenced Aug 16, 2026
os-project-manager
marked this pull request as ready for review
August 16, 2026 02:52
Uh oh!
There was an error while loading. Please reload this page.
os-project-manager
deleted the
claude/issue-8706-ablation-dist-hazard-scope
branch
August 16, 2026 03:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#8706
Header prose only, in
scripts/ablation-dist-preflight.mjs. Every changed line is a//comment; the executable code is byte-identical (git diff -U0 | grep -vE '^[+-]//'returns nothing).What was wrong
The header opened by framing the ablation-on-dist false green as a property of one suite:
That is an instance, not the condition. The hazard belongs to resolution: any test whose subject resolves through the dependency's
exports— which point at that package's builtdist/— with no vitest alias redirecting the specifier back to source. A guard whose stated scope is narrower than its hazard gets trusted where it proves nothing.What the header now says
1. The true condition, with the enumerable list. The set is already enumerated:
KNOWN_UNALIASED_TEST_IMPORTSinscripts/check-test-source-alias.mjs, the measured shrink-only ledger of exactly those package-dependency pairs — 61 packages, 305 pairs, re-measured on this branch rather than carried from the card.packages/qa/dogfoodis named as the most familiar instance, not the definition. Both measured pairs are cited:plugin-email⇢platform-objects(375 passes on an ablated field, 4 red once rebuilt) andplugin-auth⇢core.2. Why this is worse than an uninformative green — a new sub-section, because it is the part a reader acts on. When the ablation's purpose was to prove a new gate is capable of failing, an un-rebuilt run returns "the gate did not fire", which reads as evidence the gate is broken rather than the harness. A dev acting on it hunts a fix that is not needed, or weakens a working gate until it "fires" — destroying the thing the ablation was written to certify. The false green points confidently the wrong way.
3. Both halves of the mechanical rule. The existing restore-leg paragraph is amended (not duplicated) into an explicit two-line statement: mutate ⇒ rebuild ⇒ prove the marker is IN
dist/; restore ⇒ rebuild ⇒ prove it is GONE. The restore half is the one that gets skipped — rebuilding after mutating is obvious, remembering that restoring also needs a rebuild before the next measurement is trustworthy is not.4. The measured limitation of the whole-package scan — new section, adjacent to the existing sourcemap-fidelity one, because it is a different topic from the hazard itself. A marker the package also writes elsewhere breaks both modes in opposite directions:
--absentreports surviving hits that were never yours (false red), and the default mode passes on a sibling's hit alone (false green — the very failure this script exists to stop, reintroduced through the marker choice). The worked example is kept close to verbatim from the filing measurement: theinternal: truecase onsys_email, and thenode -eproperty read that is exact where a substring scan cannot be.The section states plainly that there is no per-symbol mode and prescribes the property read as the fallback. It makes no design commitment either way — whether the preflight should grow such a mode was raised and deliberately left unsettled on the card, and stays out of this PR.
Scope notes
AGENTS.mdreads at 927 lines (positive control) andgrep -inE 'ablat|mutat|rebuild.*dist'over it returns only the worktree/stash directives at:170and:208. The real second and third locations are the ones the script itself names, which are the skills root and another seat's lane; skills: the ablation-on-dist hazard is scoped to dogfood in os-dev.md and the dogfood skill, but it holds for every dist-resolved test #8949 carries that half, human-merge only. Nothing under.claude/is touched here.packages/qa/dogfood/README.mdstep 4 is a third live copy of the procedure and now carries the full rebuild instruction. The list is corrected to three and marked as stating the procedure scoped to dogfood, against the resolution condition at the top. Same file, same defect class (the header understating its own scope), evidence pinned by grep; no file outside the declared surface is edited.Verification — union run at
09469effa(the final commit)node scripts/pm/dispatch-gates.mjs scripts/ablation-dist-preflight.mjsre-run on the real diff: no check family names this path in its own source (exit 0) — expected for dev-side agent tooling that is deliberately not acheck:*gate.check:nul-bytes(any edit)node scripts/ablation-dist-preflight.mjs --self-testdist/Judged by exit status, not by grepping the output. A control-byte self-scan beyond the gate (
grep -naPover the edited file) also returns no hits — the diff discusses markers and mutation, which is exactly when escapes get materialised into real bytes.No changeset:
scripts/is not published package source and nothing user-visible changes. Labelledskip-changesetat PR creation.Generated by Claude Code
Generated by Claude Code