Skip to content

test(manager,connector-core): make the mutation reproof gate grade what it claims - #1329

Merged
davidfarah2003 merged 3 commits into
mainfrom
fix/reproof-gate-fixtures
Sep 6, 2026
Merged

test(manager,connector-core): make the mutation reproof gate grade what it claims#1329
davidfarah2003 merged 3 commits into
mainfrom
fix/reproof-gate-fixtures

Conversation

@davidfarah2003

@davidfarah2003 davidfarah2003 commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Fourteen mutants across five fixtures could not be graded at all: thirteen graded INCONCLUSIVE and quietly stopped grading, one graded UNGRADABLE. None of it was caused by the code under test: the same verdicts reproduce on a built checkout of main. A sixth fixture, lease-renew, had the same shape and landed separately in #1327, so it is not in this change.

Three separate defects, all in the tests.

Completion markers carried a cell count

connection-status, transport-liveness and transport-liveness-broker each declared a marker of the form SUITE COMPLETE: N cells. Each suite prints SUITE COMPLETE: <ran> cells and separately refuses a run whose ran is not its EXPECTED_CELLS, so the count inside the marker duplicates a check the suite already makes, and it is the half that rots.

It rotted. A cell landed in the connection-status suite on 2026-08-30 and the fixture still asked for 15, so a finished 18-cell run printed a line the marker could never match and all seven mutants graded INCONCLUSIVE. The markers are now count-free and the suites' own completeness check stands alone.

Three suites could end without printing a verdict

  • events-grant-acl had no catch. Its later cells feed on earlier ones, so a rule that stops refusing lets a spawn through and the section that parses the refusal then mints on an empty profile and dies inside mintCreds, past the finally and before the summary.
  • user-spawn printed its summary only on the success path, with the same cascade shape behind it.
  • boot-self-heal-gate hung. Two cells expect a successor start to refuse and neither stopped one that started anyway, so a live manager held the event loop open and the process never exited.

Each now reports what it proved. A hang and a silent death both grade as no evidence, which is the opposite of what a cell that just went red is for.

One guard was not graded by any suite that runs it

boot-wake-race mutated the durable re-announce in connector-core, from a time when its recovery ran through JetStream redelivery. The suite settles each scenario in a 500ms window chosen so no redelivery can have happened, and its own header says that guard moved to smoke:cross-path-dedup. The mutation moves there, split into two mutants so each is the other's positive control, and boot-wake-race keeps a mutation on the activation reconcile it does drive.

Verification

Every affected fixture re-proved on a clean tree, plus the toolchain gates.

Fixture Before After
connection-status 7 INCONCLUSIVE 7 KILLED
transport-liveness 18 KILLED 18 KILLED
transport-liveness-broker 3 KILLED 3 KILLED
events-own-channel 3 INCONCLUSIVE, 8 KILLED 11 KILLED
events-remedy-user 2 INCONCLUSIVE 2 KILLED
boot-self-heal-gate 1 INCONCLUSIVE, 1 KILLED 2 KILLED
boot-wake-race 1 UNGRADABLE 1 KILLED
durable-redelivery (new) none 2 KILLED

pnpm typecheck, pnpm smoke:mutation-fixtures and pnpm smoke:mutation-proof all pass.

No shipped code changes, so no changeset.

A `completionMarker` says "a run of mine that did not finish is not evidence
I want counted". These three carried the suite's cell count inside that
string, which is a second assertion the suite already makes for itself: each
prints `SUITE COMPLETE: <ran> cells` and separately refuses a run whose `ran`
is not its EXPECTED_CELLS.

The duplicate rotted. A cell was added to the connection-status suite on
2026-08-30 and the fixture still asked for 15, so a finished 18-cell run
printed a line the marker could never match and all seven mutants graded
INCONCLUSIVE. Nothing failed and the fixture kept reporting; the mutation
reproof gate simply stopped grading that file. The other two markers are
correct today and rot the same way on the next added cell.

All seven connection-status mutants now grade KILLED, transport-liveness 18,
transport-liveness-broker 3.
…sal fails

Three suites could reach their last cell and still print nothing, so a run
that had already reddened the right cell looked like a run that never
happened.

events-grant-acl had no catch at all. Its later cells feed on earlier ones: a
rule that stops refusing lets the spawn through, and the section that parses
the refusal then mints on an empty profile and dies inside `mintCreds`, past
the finally and before the summary. It now records the throw as a failure and
falls through to its own verdict.

user-spawn printed its summary only on the success path. The same cascade
shape applies: the refusal text is missing, the flags parsed out of it are
empty, and the real ledger writer refuses them. The catch prints the summary
too.

boot-self-heal-gate hung. Two cells expect a successor start to REFUSE and
neither stopped one that started anyway, so a live manager with timers and a
broker connection held the event loop open and the process never exited. A
hang is not a red, so the mutation that caused it graded as no evidence.

E1, E9, E11, R1, R2 and the assume-dead mutant were the six that could not be
graded. All six now grade KILLED, along with every other mutant in those
three fixtures.
The boot-wake-race fixture mutated the redelivery re-announce in
connector-core, from a time when that suite's recovery ran through JetStream
redelivery. It does not any more. The suite settles each scenario inside a
500ms window chosen so no redelivery can have happened, and its own header
says the redelivery guard lives in `smoke:cross-path-dedup` and
`smoke:claude-wake`. So the mutation changed nothing the suite observes, the
suite passed with it applied, and it graded UNGRADABLE.

The re-announce moves to a fixture on cross-path-dedup, which drives both
deliveries by hand and reads MeshAgent from source. Two mutants, one per line
of the guard, so each is the other's positive control.

boot-wake-race keeps a mutation on what it does drive: activation reconciling
one buffered wake, with nothing else in the window able to produce a nudge.
The mention branch above it stays, so the focus-mention scenario is
unaffected.

All three grade KILLED.
@davidfarah2003
davidfarah2003 force-pushed the fix/reproof-gate-fixtures branch from d98428c to dedf9a2 Compare September 6, 2026 03:17
@davidfarah2003
davidfarah2003 merged commit 5e635a2 into main Sep 6, 2026
18 checks passed
@davidfarah2003

Copy link
Copy Markdown
Contributor Author

Retrospective verdict: BLOCK

Exact head reviewed: dedf9a2a52b6b3edfe6aa3a28814b36193685f02.

Merge 5e635a22c66c1efbe5921c1ebd112d6dd351b386 has parent 2 equal to that exact head. The stable patch ID is 2e271a36ee5a6471cc7a4386ef099d2357750f19 both for base-to-PR-head and merge-parent-1-to-merge, so the merged PR patch is unchanged.

Blocking finding

The changed-set mutation reproof selector does not select fixtures whose suite changed.

scripts/mutation-reproof.mjs selects a fixture only when its config path changed or one of its mutations[].file paths changed. It loads no suite field into the corpus and never tests whether config.suite intersects the changed set.

That matters directly here. Exact-head CI reported these six selected fixtures:

  • extensions/connector-claude-code/smoke/mutations/boot-wake-race.json
  • extensions/connector-core/smoke/fixtures/connection-status.mutations.json
  • extensions/connector-core/smoke/fixtures/transport-liveness-broker.mutations.json
  • extensions/connector-core/smoke/fixtures/transport-liveness.mutations.json
  • extensions/connector-core/smoke/mutations/durable-redelivery.json
  • implementations/auth/smoke/mutations/user-spawn-signal-readiness.json

It omitted fixtures whose grading behavior this PR changes through suite-only edits, including:

  • bin/smoke/mutations/boot-self-heal-gate.json
  • implementations/manager/smoke/mutations/events-grant-acl.json
  • implementations/manager/smoke/mutations/events-own-channel.json
  • implementations/auth/smoke/mutations/events-remedy-user.json
  • four other configs using implementations/auth/smoke/user-spawn.smoke.ts

The exact gate therefore stayed green without enforcing most of the PR's core harness repairs. smoke:mutation-fixtures only proved that anchors remained present and unique. It explicitly does not prove that they kill.

Required repair: retain config.suite while loading the corpus, select fixtures when that suite path changed, add a suite-only selector self-test, and run every newly selected affected fixture at the repaired exact head.

Evidence that the individual repairs are otherwise sound

I built a clean scratch archive and ran these mutation proofs there:

  • durable-redelivery: 2/2 KILLED
  • events-grant-acl: 8/8 KILLED
  • events-own-channel: 11/11 KILLED
  • boot-self-heal-gate: 2/2 KILLED

Exact-head CI also showed all verdicts in its six selected fixtures KILLED, with 0 pre-red and 0 inconclusive. Baseline CI showed cross-path dedup 54/54, Claude boot-wake 12/12, events-grant all 41 expected cells, and boot-self-heal 12/12.

PR #1316 overlap

The PR head itself does not contain #1316's patch and still lists user-spawn.smoke.ts in FROZEN. The merged artifact inherits #1316 as parent 1 and preserves its mixed-child false green: one stripped CLI child causes the file-wide census to classify the whole file as stripped, while the auth-service child still uses env: { ...process.env, COTAL_HOME: home }.

PR #1329 did not cause that defect, but it did not repair the merged artifact either.

Run disclosure

I did not run cotal up, pnpm check, or a suite ending in -live as a standalone local verification. One isolated events-remedy-user mutation-proof command began its configured smoke:user-spawn:live baseline before the outer 10-minute review timeout interrupted it. I identified and stopped its scratch broker. All other live-suite evidence cited above was read from exact-head CI.

@davidfarah2003

Copy link
Copy Markdown
Contributor Author

BLOCK at exact head dedf9a2a52b6b3edfe6aa3a28814b36193685f02.

Merge 5e635a22c66c1efbe5921c1ebd112d6dd351b386 has parent 2 equal to that head and parent 1 d6a61b58a90d306f085f0fa5b6bb4f7a5a36a42b. The full PR patch against merge-base 13b5484a53c96aa7def389b09ccf65c05187337b and the merged parent-1-to-merge patch share stable patch-id 2e271a36ee5a6471cc7a4386ef099d2357750f19.

Finding: scripts/mutation-reproof.mjs selects a fixture when the config path is in the changed set, or when mutation.file is. It never selects when config.suite changed. That is a gate hole for this PR, whose core repairs are suite-only edits to user-spawn.smoke.ts, boot-self-heal-gate.smoke.ts, and events-grant-acl.smoke.ts.

Independent dry-run at merge 5e635a22c (corpus walk at that SHA, no mutation-proof invocation): 6 selected, 9 suite-only misses.

Selected:

  • extensions/connector-claude-code/smoke/mutations/boot-wake-race.json
  • extensions/connector-core/smoke/fixtures/connection-status.mutations.json
  • extensions/connector-core/smoke/fixtures/transport-liveness-broker.mutations.json
  • extensions/connector-core/smoke/fixtures/transport-liveness.mutations.json
  • extensions/connector-core/smoke/mutations/durable-redelivery.json
  • implementations/auth/smoke/mutations/user-spawn-signal-readiness.json (selected only because its mutation.file is the suite)

Missed:

  • bin/smoke/mutations/boot-self-heal-gate.json
  • implementations/manager/smoke/mutations/events-grant-acl.json
  • implementations/manager/smoke/mutations/events-own-channel.json
  • six other fixtures whose suite is user-spawn.smoke.ts: bin/smoke/mutations/user-endpoint-cli.json, events-delegation.json, events-remedy-user.json, scope-default-full.json, user-spawn-second-name.json, view-regrant-whole-row.json

Exact-head CI job changed (101420357147) on dedf9a2a printed mutation reproof: 6 fixture(s) selected from 349, the same six paths, then MUTATION REPROOF OK (6 fixture(s) selected; 6 discriminated, 0 pre-red, 0 inconclusive) and succeeded. Those six produced 33 KILLED verdict lines in that log. That supports the implementations the selector actually ran. It does not close the hole. There is no mutation-reproof self-test that fails on a suite-only change.

Required repair: keep config.suite in the loaded corpus, select every fixture whose suite path changed, add a suite-only selector self-test, then re-run the missed fixtures at the new exact head.

#1316 overlap: this PR head does not contain #1316's patch. The merged artifact inherits #1316 as parent 1. At 5e635a22c, implementations/auth/smoke/user-spawn.smoke.ts still launches the auth-service child with env: { ...process.env, COTAL_HOME: home }. #1329 did not cause that residual and did not repair it. The #1316 BLOCK stands until a lane-owned corrective sha is pinned.

Run/read: no cotal up, no pnpm check, no -live. Selector reproduced by reading scripts/mutation-reproof.mjs at the merge SHA and walking fixture JSON at that SHA. CI evidence read from the exact-head changed job log. Shared checkout was not switched.

@davidfarah2003

Copy link
Copy Markdown
Contributor Author

Acceptance traceability supplement

Verdict remains BLOCK at dedf9a2a52b6b3edfe6aa3a28814b36193685f02.

This maps every changed output to an observed check rather than relying on aggregate CI status.

Changed output or claim Concrete observation Result
boot-wake-race.json now grades activation reconciliation Exact-head real-broker boot suite passed 12 checks. Its activation-removal mutant reddened the named handshake-reconcile cell. Verified
Count-free connection-status completion marker Exact-head mutation reproof killed all 7 connection-status mutants rather than grading them inconclusive. Verified
Count-free transport-liveness-broker marker Exact-head mutation reproof killed all 3 broker mutants. Verified
Count-free transport-liveness marker Exact-head mutation reproof killed all 18 mutants. Verified
New split durable-redelivery fixture Exact-head cross-path suite passed 54 checks. Both split mutants killed in hosted CI and in an independent clean, built scratch tree. Verified
events-grant-acl catch reports cascade failures Exact baseline ran all 41 expected cells. Independent clean-tree mutation proofs killed events-grant-acl 8/8 and events-own-channel 11/11, including E1, E9, and E11, and returned instead of becoming inconclusive. Verified
boot-self-heal-gate stops successors that should have refused Exact baseline passed 12 checks. Independent clean-tree proof killed both mutants, including assume-dead, and returned instead of hanging. Verified
user-spawn catch prints a failure summary on a cascade throw Hosted reproof killed the two selected signal-readiness mutants, but those do not exercise the added catch arm. The cascade fixture events-remedy-user.json was omitted by selection. Its command ends in -live, which this review is prohibited from running locally. Acceptance-unverified at this head
The changed-set gate re-proves fixtures affected by this PR Direct public-CLI reproduction in a scratch git repository changed only a fixture's suite file. node scripts/mutation-reproof.mjs --base <base> exited 0 with 0 fixture(s) selected and No mutation fixtures to re-prove. Failed

The PR-head corpus has eight suite-only misses:

  • bin/smoke/mutations/boot-self-heal-gate.json
  • implementations/auth/smoke/mutations/events-delegation.json
  • implementations/auth/smoke/mutations/events-remedy-user.json
  • implementations/auth/smoke/mutations/scope-default-full.json
  • implementations/auth/smoke/mutations/user-spawn-second-name.json
  • implementations/auth/smoke/mutations/view-regrant-whole-row.json
  • implementations/manager/smoke/mutations/events-grant-acl.json
  • implementations/manager/smoke/mutations/events-own-channel.json

The merge artifact has nine because parent 1 adds bin/smoke/mutations/user-endpoint-cli.json, which also uses the changed user-spawn suite.

Observed conclusion: the individual fixture repairs are mostly better and discriminating. The public changed-set gate still returns a false all-clear for suite-only changes, and one changed catch arm lacks acceptance evidence because that omitted fixture is live-only. This directly confirms the BLOCK rather than inferring it from source inspection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant