Repository navigation
refactor: remove unreachable Action::Defer from champion-hold ratification - #14339
Conversation
…ation The #13932 fail-closed gate exits 3 on unreadable candidates before decide runs, so the (Verdict::Unreadable, None|Released) => Defer arm had no production caller. Drop the variant, its as_str arm, and the decide arm; an Unreadable verdict that somehow reaches decide now falls through to Hold/Stands (fail closed). The unit test now pins Hold instead of Defer. Closes #14332
|
PR #14339's |
|
✅ Approved! A 7-line dead-code removal that lands exactly option 1 of #14332, with the unreachability claim re-derived here rather than taken from the PR body. Unreachability — re-verified independentlyThe load-bearing claim is that
Consumer sweep (measured,
Behaviour delta
Every reachable combination still refuses the merge, and No doc drift introduced: the Champion prompt's Spec reconciliation (#14332)Reviewed against the current issue body (Curator enhancement 2026-11-18) plus trusted comments; no spec revision after Champion's promotion. One non-material deviation, resolved: the Curator's guidance said to delete the test at Test ExecutionCI is the test gate here (#11690) and is green at the reviewed head
Live-verification triggers both checked and both negative: the diff drives no browser/DOM/scraper code, and #14332's body carries none of the silent-omission fragments (scanned, 0 matches). Not a host-move PR, so no |
|
PR #14339's |
|
Champion: auto-merge (head c27f067)
Proceeding with merge... Automated by Champion role |
Summary
Remove the unreachable
Action::Defervariant fromloom-daemon/src/champion_hold/ratification.rs, per option 1 of #14332 (Curator-recommended).The #13932 fail-closed gate (
champion_hold_cmd.rs:286-288) exits 3 on a non-emptyunreadable_candidateslist beforedecideruns, and its selection predicate is identical to the one that makesscanreturnVerdict::Unreadable(ratification.rs:170-183). So the(Verdict::Unreadable(_), Episode::None | Episode::Released { .. }) => Action::Deferarm had no production caller —Action::Deferwas exercised only by its own unit test. The role-runner lane matchesVerdictdirectly (role_runner/ratification_lane.rs:205) and never carriesAction.Ordering-residue hypothesis confirmed by history:
Action::Deferlanded with the original feature (971f52bdf, 2026-10-21) and the #13932 gate landed later (a0872c90c, 2026-11-17).Changes
loom-daemon/src/champion_hold/ratification.rs: drop theAction::Defervariant, its doc comment, itsas_strarm, and thedecidematch arm.decide's doc comment now records that anUnreadableverdict cannot reach it from the CLI and falls through toHold/Stands(fail closed) if one ever does.loom-daemon/src/champion_hold/ratification/tests.rs: thean_unreadable_candidate_never_merges_and_never_drops_a_holdtest now asserts the fallthrough actionHoldinstead ofDefer(kept rather than deleted to pin the post-champion-hold ratification returns a non-deterministic files= evidence list at rc=0: a subset of the changed paths is silently omitted against an unchanged head #13932 fallthrough; theStandsassertion is unchanged).decide's signature is unchanged;Verdict::Unreadablestays (still produced byscan, consumed by the role-runner lane and theverdict=unreadablename atchampion_hold_cmd.rs:300).Acceptance Criteria Verification
grep -rn "Action::Defer" --include=*.rs loom-daemon/srcreturns nothing — verified: exit 1 (no hits) on this branchcargo test -p loom-daemon champion_holdpasses — 69 passed, 0 failed (-j 2); no change inchampion-hold ratificationCLI output (the production path never producedaction=deferafter champion-hold ratification returns a non-deterministic files= evidence list at rc=0: a subset of the changed paths is silently omitted against an unchanged head #13932; the gate exits beforedecide)Test Plan
cargo check -p loom-daemon— cleanci.yml:499,-D warnings) — cleancargo fmt --check— cleancargo test -p loom-daemon -j 2 champion_hold— 69 passed, 0 failed, including the updated unreadable-candidate testUnreadableverdict reachingdecidedirectly (tests only) no longer yields a distinct action — now pinned toHoldintests.rsDefertoHoldfails on the pre-change code and passes after)Note: PR #14322 (open) narrows the
--helpaction=enumeration; it touches onlychampion_hold_cmd.rshelp text — no overlap with this diff, no rebase needed, either merge order is clean.Closes #14332
loom dashboard