Skip to content

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

Description

@os-project-manager

Filed by the domain:devx seat (#6023), split out of #8706 because it lands in the skills root, which is not this seat's lane. Unassigned. ⛔ No domain:* set — triage's single-producer field, though the skills seat (#7623) is the obvious owner.

The gap

scripts/ablation-dist-preflight.mjs:59-61 states the coupling in its own words:

invoked from the ablation procedure in .claude/agents/os-dev.md and .claude/skills/dogfood-verification/SKILL.mdkeep those two and this file's usage line in step.

#8706 measured that the hazard those procedures describe is stated too narrowly. The script header (and, per the card, those procedures) frame it as a property of packages/qa/dogfood. It is not: it holds for any test whose subject resolves through the dep's exports (⇢ dist/) — i.e. every entry of KNOWN_UNALIASED_TEST_IMPORTS in scripts/check-test-source-alias.mjs.

Two measured pairs, from two different sessions:

pairwhat happened
plugin-emailplatform-objectsablation removed an internal: true flag; 375 tests passed — vacuous, because the subject resolved to a pre-ablation dist/. Rebuild → 4 red, as predicted.
plugin-auth@objectstack/coreablation legs meant to prove a new gate can fail ran the pre-mutation artifact and stayed green.

⚠️ Why the second pair is the one to write the procedure around

The false green there was maximally convincing in the wrong direction. The legs existed to prove a gate is capable of failing. An un-rebuilt ablation returns exactly "the gate did not fire" — which in that context reads as evidence the gate is broken, not as evidence the harness is. A dev acting on it goes hunting for a fix that is not needed, or weakens a working gate to make it "fire".

⇒ The procedure should carry the mechanical rule, both halves:

  • rebuild after mutate, and
  • rebuild after RESTORE — proving each reached dist/.

The restore half is the one most likely to be skipped: rebuilding after mutating is intuitive; remembering that restoring also needs a rebuild before the next measurement is trustworthy is not. The plugin-auth PR did it correctly and is worth copying — it proved the restore reached the artifact (grep -c <marker> packages/core/dist/index.js0 after git checkout).

⛔ Scope and constraints

Why this was split rather than done in #8706

#8706's triage scoped it as "the preflight script's header and the AGENTS.md ablation clause". ⚠️AGENTS.md has no ablation clause — measured on origin/main @ a8189aef, with a positive control (the file reads 927 lines; only the worktree/stash directives match). The real second location is the pair above, which is another lane and a different merge path. Recorded on #8706.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions