Repository navigation
test(kanban): pin that carrying a ref does not cost the bundle beside it - #866
Merged
Merged
Conversation
Collaborator
Author
FleetReviewReviewed with 2 of 3 model families — openai unavailable. Confidence: 4/5 Findings
FleetReview provenance · models: C=claude-code-opus-5, D=grok-4.6, G=grok-4.6 · cost: $4.23 · duration: 11m 05s · rounds: 1 · files examined: 1 |
Kyzcreig
force-pushed
the
daedalus/t_e41d3dd4-mixed-carry-pin
branch
from
September 22, 2026 17:33
1e6339b to
f14afd1
Compare
Kyzcreig
changed the base branch from
survivor/t_1bcd8aec-cleanup-coverage
to
main
September 22, 2026 17:33
…t shape
`missing <= _vouched_repositories(previous)` is the whole of what lets a reaper
DELETE a workspace whose recorded repository is gone. It was pinned for ONE cell
of its input matrix: a ref-shaped survivor under total loss. Three mutations of
the other cells left all 78 survivor tests green.
Tests only; no production change (`git diff hermes_cli/` is empty).
ref/partial -- `if repos: carried = [...]` (kanban_survivor.py:380-386) was
reached by exactly one PRE-EXISTING test, which reads the COMPLETION
snapshot and passes with the branch disabled. Disabled, the surviving repo
satisfies the completion alone and the RECORDED ref for the vanished repo is
silently dropped -- preserve() SUCCEEDS with the lost work pointed at
nothing. Now driven through the CLEANUP path, asserting both refs survive.
patch/any -- `_vouched_repositories()` excludes `repositories` because a patch
is keyed by base SHA against a checkout. That was prose in a docstring.
Widening the helper to collect `repositories` turns a fail-CLOSED hold into
a reapable workspace whose only survivor is a patch against a base SHA that
exists nowhere. Now pinned, with a direct shape assertion as teeth.
bundle/total -- no test exercised a bundle-shaped recorded survivor at
cleanup, so dropping `bundles` from the helper converts every bundle-backed
reclamation into a permanent HOLD. Verified: that mutant passes 78/78 on the
unmodified suite. Now pinned.
Verified (CPython 3.11.15, pytest 9.1.1, isolated --basetemp, four survivor
files):
baseline #842 head 3ca4b60 : 78 passed
with these tests : 81 passed
mutant if repos -> if False : 1 failed, 80 passed (ref/partial test)
mutant +repositories : 1 failed, 80 passed (patch test)
mutant -bundles : 1 failed, 80 passed (bundle test)
mutant -bundles, no new tests: 78 passed <- the gap was real
Each mutant is caught by exactly its own test and nothing else. ruff clean.
Scope note: enumerating the matrix surfaced a LIVE defect, not a test gap --
bundle-shaped survivor under PARTIAL loss. `carried` collects only
`previous["refs"]` while `_vouched_repositories()` accepts bundles too, so the
bundle passes the coverage test, carries nothing, gets erased from the record,
and the hold clears. Measured on pristine code; carded as t_e41d3dd4 rather than
fixed here, and deliberately NOT pinned -- pinning it would freeze the bug.
Refs: t_1bcd8aec (found by argus on t_a49e8a28 / PR #842 round 1)
(cherry picked from commit 8272cd4)
…exits Round-2 class sweep on the cleanup relaxation, re-derived over THREE axes (survivor shape x loss extent x workspace content) after #842 r2 landed both FleetReview P1 fixes. The omitted axis in round 1 was workspace content. Measured, not inferred: a 30-cell probe over {ref,bundle,patch,mixed,none} x {total,partial,partial-dirty} x {clean,loose} at 3afa908 found one unpinned family -- the `_loose_files()` guard is exercised only by REF-shaped survivors. Waiving it for `kind == "bundle"` at the relaxation's own exit flips four cells (bundle|partial|loose, mixed|partial|loose, and both partial-dirty variants) from fail-closed HOLD to a reclaim that rmtree's `qa-output/verdict.md`, and leaves all 84 tests GREEN. Two tests added: test_partial_loss_holds_for_loose_evidence_under_a_bundle_shaped_survivor test_a_bundle_shaped_survivor_does_not_buy_a_delete_for_loose_evidence Verified: 86 passed across the four survivor files. Mutation gate (mutation_gate_r2.sh) -- M4 (relaxation exit waived for bundles) kills the partial test; M5 (the `elif claimed:` arm waived) is an EQUIVALENT mutant, traced with sys.settrace: the total-loss bundle+loose case raises at the first site and never reaches the second, so it flips zero cells alone. The combined M4+M5 mutant kills both tests. Source restored pristine after every arm. Test-only: zero lines of hermes_cli/kanban_survivor.py changed. (cherry picked from commit 7d7f223)
…ping `missing <= vouched` is the whole of what lets a reaper delete a workspace whose recorded repository is gone. Every existing test loses exactly ONE repository, where the subset test and an intersection test agree — so relaxing it to `missing & vouched` (or `missing & vouched or missing <= vouched`) left all 86 tests on the four survivor files, and all 151 on the wider survivor surface, GREEN while flipping two cells from fail-closed HOLD to reapable. Adds the discriminating shape: two recorded repos gone, the recorded survivor vouching for only one. The unvouched repo has no ref, no bundle and no patch anywhere, so under the mutant its unpushed work is pointed at nothing after the reap. Pinned on both the total and partial loss arms, plus a full-coverage teeth case proving the assertion keys on TOTAL coverage rather than on multi-repo loss itself. Measured (mutation_gate_r3.sh, source restored + `git diff --quiet` verified after every arm): P1 `missing & vouched or missing <= vouched` -> 2 failed, 1 passed P2 `missing & vouched` -> 2 failed, 1 passed P0 pristine -> 3 passed Four survivor files: 89 passed. Wider surface (7 files): 154 passed. ruff clean. Zero lines of kanban_survivor.py changed — behaviour untouched. (cherry picked from commit 7c3e0b6)
The carded defect (t_e41d3dd4) is ALREADY FIXED: #842 r2 (a61dda5) added `carried_bundles` and gated the ref branch on `not bundles`. Both shapes the card measured -- bundle-only partial loss and mixed partial loss -- were driven through `preserve(cleanup=True)` on pristine #845 head and both already carry the bundle and record `kind: "bundle"`. No behaviour change is needed. What IS missing is a gate. `carried` and `carried_bundles` are independent collections read from the same recorded survivor, and every existing partial-loss test loses a repository vouched for by exactly ONE of them. So a mutant that keeps the bundle carry-forward but disables it whenever a ref is also carried -- `carried_bundles = [] if carried else [...]` -- leaves all 30 tests on this file GREEN while the MIXED shape drops the bundle and relabels the record `kind: "ref"`, telling an operator the work is pushed when its only copy is an orphaned bundle attachment. Measured on this tree, pre-existing suite only: M1 `carried_bundles = []` -> 3 failed / 28 passed (already gated) M2 `[] if carried else [...]` -> 0 failed / 30 passed SURVIVES With this test: M1 3 failed, M2 1 failed (killed only by the new test). Test-only: zero lines of hermes_cli/kanban_survivor.py; impl byte-identical to the pristine base. Four survivor files at this head: 95 passed before, 96 after. (cherry picked from commit 1e6339b)
Kyzcreig
force-pushed
the
daedalus/t_e41d3dd4-mixed-carry-pin
branch
from
September 23, 2026 10:42
f14afd1 to
7dbd9ed
Compare
Collaborator
Author
|
apollo/merge-pass 2026-09-23: rebased onto current main (clean, own commits only, no content change) so CI runs against the post-#915 main; landing via fleet-merge on the FR-pause lane once green. |
Collaborator
Author
|
🤖 merged-by: apollo · lane: fr-pause-0922 · gate: BYPASS: FR PAUSED by Ace ruling 2026-09-22 (state/fleetreview-pause-20260922.md); t_e41d3dd4 approved · why: argus APPROVED (card done); rebased clean onto main; FR paused; CI green; Apollo merge pass 2026-09-22 |
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 free
to 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.
Stacked on #845 (which is stacked on #842). Test-only.
The carded defect is already fixed — this closes the GATE, not the bug
t_e41d3dd4 was written against PR #842 head
3ca4b600a3, where the cleanupcarry-forward read only
previous["refs"]. Two commits landed on #842 after thatbase —
a61dda5edf("close FleetReview's 2xP1 on the cleanup relaxation") addedcarried_bundlesand gated the ref-completion branch onnot bundles, and7afe1b9e37re-keyed the coverage test onabsent.Re-measured on pristine #845 head
7c3e0b6db1(impl blob370e5b30f1, byte-identicalto this branch's): both shapes the card measured — bundle-only partial loss and mixed
partial loss — already carry the bundle and record
kind: "bundle". The bundle-onlyshape is additionally pinned by the pre-existing
test_a_bundle_vouched_missing_repo_is_carried_into_the_rewritten_survivor.No behaviour change is needed. Zero lines of
hermes_cli/kanban_survivor.pyin this diff.What IS missing: the MIXED shape has no gate
carried(refs) andcarried_bundlesare two independent collections read out of theSAME recorded survivor. Every pre-existing partial-loss test loses a repository vouched
for by exactly ONE of them, so nothing in the suite exercises "carry a ref and a bundle
at once".
Mutant M2 — keep the bundle carry-forward, but disable it whenever a ref is also carried:
Under M2 the mixed shape silently drops the bundle and relabels the record
kind: "ref",telling an operator the work is pushed when its only copy is an orphaned bundle attachment.
Measured (my run, isolated
--basetemp, four survivor files)Mutant applied in a throwaway detached worktree, reverted, worktree removed; both
checkouts
git status --porcelainclean afterwards.ruff checkclean on the test fileand on
kanban_survivor.py.Verify:
Notes
hermes_cli/kanban_survivor.pyis a six-way collision surface(kanban: make the operator survivor reachable when a recorded repo vanishes (t_49c1dec1) #837/t_49c1dec1, kanban: reclamation consults the RECORDED survivor instead of re-deriving from stale bases #842/t_a49e8a28, fix(kanban): preserve home-clone work via verified canonical live trees #796/t_f31d9d5a, t_de2e348e, test(kanban): pin the cleanup relaxation's coverage decision per input shape #845/t_1bcd8aec, this).
This PR's only conflict surface is
tests/hermes_cli/test_kanban_survivor_stale_bases.py— it appends to the end of the file.
t_62f0eb15has atests/conftest.pychange in flight.kanban_survivor.pydoes not exist inNousResearch/main).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.