fix(demo): gate invite-path RM triage on Finder having case replica (Bug #2120) - #2127
fix(demo): gate invite-path RM triage on Finder having case replica (Bug #2120)#2127sei-ahouseholder wants to merge 2 commits into
Conversation
sei-ahouseholder
left a comment
There was a problem hiding this comment.
PR Triage: #2127 — fix(demo): gate invite-path RM triage on Finder having case replica (Bug #2120)
Linked issues: #2120 (Bug: fcvcv and fvcv-handoff demos fail — ReconstructChainTail CLP-08-005)
Changed files: 5 — demo/scenario, test/demo, plan/history
CI status: ❌ failing (pre-existing only — see notes)
Needs integration tests: yes (5 regression tests added)
CI Summary
All failing CI jobs are pre-existing on main (confirmed against run 31233723925):
| Job | Failure | Pre-existing? |
|---|---|---|
| Tests (pytest) | test_pcr_bootstrap (#2086), test_integration_script_scenarios (#2122) |
✅ yes |
| fcvcv Demo Integration | engage-case 422 / RM.RECEIVED timeout |
✅ yes (different error from #2120) |
| fvcv-handoff Demo Integration | Ownership-transfer offer delivery timeout | ✅ yes (different error from #2120) |
| fcvcv / fvcv-handoff Invariant Harness | Downstream of demo failure | ✅ yes |
All linters (black, flake8, mypy, pyright) pass.
Findings
| # | Phase | Severity | Description | Outcome |
|---|---|---|---|---|
| phase8-unguarded-triage-sibling-scenarios-0 | code-review | ❌ FAIL | 5 sibling scenario files call run_invite_path_rm_triage without wait_for_case_on_container(finder_client) guard — same CLP-08-005 defect |
new-issue-ask |
Total: 1 FAIL · 0 IMPROVE · 0 NEW-ISSUE-NO-ASK
Finding Detail
phase8-unguarded-triage-sibling-scenarios-0 — CLP-08-005 defect in sibling scenarios
The fix is correct and complete for the two scenarios named in #2120. However, the same root cause (Finder's genesis hash not seeded before run_invoke_path_rm_triage fires) exists in 5 other scenario files:
| File | Line | Phase function | finder_client param? |
|---|---|---|---|
fccv_handoff_demo.py |
538 | _phase_c2_invites_vendor |
❌ not a param |
fvcv_extension_demo.py |
425 | _phase_coordinator_suggests_vendor2 |
❌ not a param |
fccv_extension_demo.py |
427 | _phase_c2_suggests_vendor |
❌ not a param |
fvv_demo.py |
270 | _phase_report_submission |
✅ in scope |
fcv_demo.py |
330 | _phase_invite_vendor |
❌ not a param |
This is non-trivial (requires threading finder_client through 4 call chains) and distinct from #2120's stated scope, so it warrants a new tracking issue.
User decision needed: Should these be fixed in this PR (expands scope to all 6 scenarios), or tracked in a new issue to stack on top?
Triage artifact: .claude/pr-2127-triage.json
Next step: run /pr-ship 2127 after user responds to the scope question above.
Bug #2120: run_invite_path_rm_triage fired before the Finder's VulnerabilityCase (genesis hash) was seeded, causing ReconstructChainTailNode to raise CLP-08-005 (unanchored chain bootstrap) in fcvcv and fvcv-handoff scenarios. Root cause: three call sites in _phase_report_submission, _phase_c2_suggests_v2, and _phase_coordinator_invites_vendor2 triggered RM state updates that broadcast Announce(CaseLedgerEntry) to the Finder before wait_for_case_on_container was called for the Finder container. Fix: - Add wait_for_case_on_container(finder_client, case.id_) immediately before run_invite_path_rm_triage at all three sites - Add finder_client parameter to _phase_c2_suggests_v2 and _phase_coordinator_invites_vendor2 (was missing from both signatures) - Add 5 regression tests (3 in new test_fcvcv_demo.py, 2 in test_fvcv_handoff_demo.py) verifying call ordering invariant Spec: CLP-08-005, SYNC-13 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ge on Finder having case replica Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2c64c6d to
9892b76
Compare
|
Branch freshened onto current
Full unit suite (6453 passed) and all demo tests (1055 passed) confirm clean on the freshened branch. |
Closing as supersededEvery change this PR would merge is already present on Production code — identical diffs already on mainCommit
A second commit, Tests — main has a superset
All three test classes this PR introduces ( Closing in favour of the work already merged. |
|
Superseded — see comment above for full code-level evidence. |
Summary
run_invite_path_rm_triageinfcvcv_demo.pyandfvcv_handoff_demo.pytriggered RM state updates that broadcastAnnounce(CaseLedgerEntry)to the Finder before the Finder'sVulnerabilityCase(genesis hash) had been seeded, causingReconstructChainTailNodeto raise CLP-08-005 (unanchored chain bootstrap) in thefcvcvandfvcv-handoffdemo scenarios.Changes
vultron/demo/scenario/fcvcv_demo.py: Addwait_for_case_on_container(finder_client, case.id_)before V1 triage in_phase_report_submission; addfinder_clientparameter to_phase_c2_suggests_v2and call site; add finder wait before V2 triagevultron/demo/scenario/fvcv_handoff_demo.py: Addfinder_clientparameter to_phase_coordinator_invites_vendor2and call site; add finder wait before Vendor2 triagetest/demo/test_fcvcv_demo.py: New file — 3 regression tests verifying finder-wait-before-triage ordering invariant (spec CLP-08-005)test/demo/test_fvcv_handoff_demo.py: 2 new regression tests for_phase_coordinator_invites_vendor2ordering invariantVerification
test_fcvcv_demo.py, 2 intest_fvcv_handoff_demo.py)test_integration_script_scenariosCI config mismatch,test_pcr_bootstraptest isolation — both pre-date this PR)🤖 Generated with Claude Code