Repository navigation
P440: keep the assigner typed so reissues and fork verdicts act under their commander (supersedes #2540) - #2555
Conversation
… their commander AssignTodo rebuilt its actor from the Assignment's wire fields, so a fork's authority was lost before apply and Core's watcher, reissuing as itself, competed with the fork that first assigned the unit. AssignTodo now carries the typed actor (AssignTodo.by is the one place it and the recorded assigner are made), and a reissue acts as Todo.acting_assigner: the stored assigner under its order's commander. A sibling fork's competing order is still refused. - GoalRef.authorize_order is deleted: the goal reference no longer stands in for the actor (IDEN-1); the actor's own require_may_change decides. - CommanderForkIdentity moves beside RecordedThreadIncarnation, whose acting_for builds it; the watcher keeps its own authority. - SupersededVerdict reads the commander's orders, not the fork's own. - resolve_order refuses an unknown or foreign problem as "holds no order". - UnownedWheelSpin.order_for and paired no longer take an assigner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… its assigner The registered-fork test now checks that Todo.acting_assigner is the fork that assigned the unit, acting under its commander, and that it passes the unit competition check. The blocked-goal reactivation test that main added in 2539 builds CreateProblemGoalAction, which now requires its assigner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
debt-tools grew Unformatted:tools/carry_rts_orders.py +1. Black only; no behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
review-batch verdict on a67f49b: pass on semantics. Two hosted reds remain, and a unit carries the fix. Checked against the ruling: the competition key stays the acting assigner ( Tests: test_order_claims, test_commander_forks, test_holder_standing_rules and test_todos give 60 passed and 6 failed at this head. The same 6 fail on main 09d45c6 (five test_order_claims tests with CandidateMaintenanceFailed, plus test_watcher_git_and_github_reads_leave_wire_free), so this PR adds no failures. Remaining red, exact edits for the holder:
Not blocking, noted: |
# Conflicts: # src/agent_comms/goal_actions.py
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeUaZjvChAcb6qAd6zPYmw
…r through P448's owner P448 moved the blocked holder's reissue onto BlockedExecution and ReissuedOrderGoalAction.for_todo; P440's typed assigner now lives there (todo.acting_assigner), and UnownedWheelSpin.order_for is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeUaZjvChAcb6qAd6zPYmw
# Conflicts: # src/agent_comms/goal_presentation.py # tests/test_holder_standing_rules.py
P440 reviewed carry resultPR #2555; head Preserved reviewed AssignTodo.by, Todo.acting_assigner, the deletion of GoalRef.authorize_order, original fork competition and superseded-verdict authority. Moved board_text unchanged to CommanderContext immediately after last_activity; AST equality of the moved function passed. Added an actual shared-context board comparison to the existing registered-fork test. Merged current main through Executed comparison (aggregate counts over the same 14 files)
Files: test_bus_files.py, test_commander_forks.py, test_commander_run_rules.py, test_declared_schema_carry.py, test_held_problem_orders.py, test_holder_standing_rules.py, test_order_progress.py, test_order_scopes.py, test_order_story.py, test_owned_turn_goal_replacement.py, test_proof_build.py, test_storage_violations.py, test_todos.py, test_unowned_checkout_work.py (all under tests/). Used shared installed dependencies, unchanged pinned SDK af3cb0e12a5fb250, PYTHONPATH=src:tests, timeout 300, pytest -q -s -n 0 -o faulthandler_timeout=60 --noconftest --basetemp= plus those files. A real-file Python entrypoint selected all existing FixtureFunctionDefinition objects from tests/conftest.py as a plugin, cleared its canonical managed-environment set and selected LaunchRoot.unstarted. This retains the existing root lifetime fixture without the eager session-start rebuild hook. The stdin prototype caused a multiprocessing re-import failure; a missing SDK caused a setup error. Both were harness defects corrected before these final results. Final runs have no bus maintenance teardown warning. All original/failed stages remain preserved; no uncertain inputs were replayed. Source evidenceExisting refactor-audit Package parser: 440 production modules + 471 test modules, zero parse omissions. One board_text declaration, on CommanderContext; one reissue factory deriving todo.acting_assigner; all consumers enumerated; no old order_for calls and no authorize_order declaration. Mandatory whole-src commander-rebinding search: 0. git diff --check passed. Targeted F401/F821 lint on the integrated production files passed. No local ratchets or full suite were run. NRA tree_sitter remains unavailable; dynamic SQL/MRO resolution is outside the syntactic proof. Exact-head hosted checks (run 39682968305)SUCCESS: smoke, native-scripts, install-rehearsal, review-verdict. Remaining acceptanceNot merged or installed. Copied-bus/source acceptance is demonstrated, not installed acceptance. Merger still owes the retained-bus practice installation and installed fork order-check/superseded-verdict/sibling-refusal journey. The unrelated #2549 and installation channel updates do not qualify P440. Assumed: #2553 removes the observed detector false positive; this has not yet been demonstrated on a post-#2553 #2555 head. Installed acceptance is not assumed. Evidence owner: unit-mi-1b. Logs: p440-2555-final-head-tests.log, p440-final-main-tests.log, p440-final-compare-driver.log, p440-converged-ast.txt, p440-1c8-debt-logs.txt, p440-delivery-github-state.log under /home/ts/.cache/agent-scratch/unit-mi-1b/. Owned disposable SDK copy: /home/ts/wt/unit-mi-1b--P440/stack/.pi-native-af3cb0e12a5fb250; retained failed/final test stages remain in that scratch directory until acceptance/diagnosis is complete. |
Supersedes #2540 (P440, keep commander reads separate from fork actors). It carries every #2540 commit, through #2540's head c73e229, merged with main, and fixes the four defects head-review found on that head. unit-forks has two strikes on P440, so a commander fork took the task over.
The defects and their fixes
AssignTodorebuilt its actor from the Assignment's wire fields, which lost a fork's authority, and Core's watcher reissued as itself, so it competed with the fork that first assigned the unit.AssignTodonow carries the typed actor;AssignTodo.byis the one place both the actor and the recorded assigner are made. A reissue acts asTodo.acting_assigner, the stored assigner under its order's commander (RecordedThreadIncarnation.acting_forbuilds theCommanderForkIdentity; the watcher keeps its own authority). Competition is still keyed on the acting fork, so a sibling fork's competing order on one unit is still refused (the fork-two refusal intest_registered_fork_sends_parent_problem_with_fork_actor). The fivetest_holder_standing_rulesreissue tests pass.GoalRef.authorize_orderlet the goal reference stand in for the actor. It is deleted, along with the base method it overrode;AssignTodo.applycalls the actor's ownrequire_may_change, as main did.test_clean_transfers_keep_history_and_third_owner_requires_a_tracepasses.judge supersededwas refused.SupersededVerdict.preparenow reads the commander's orders (actor.commanding_identity). New test:test_fork_superseded_verdict_reads_its_commanders_orders.resolve_orderrefuses an unknown or foreign problem as "UNIT holds no order on P", never "Unknown todo".test_a_problem_not_held_by_the_unit_is_refusedpasses.Also:
UnownedWheelSpin.order_forandpairedno longer take an assigner, andCommanderForkIdentitymoves from tool_caller.py into thread_identity.py beside the class it extends. One integration fix: the blocked-goal test #2539 added on main now passes its assigner.Proof
All 14 test files #2540 touches, run serially at this head and at main d555338 (
pytest -n 0; under xdist these files collected nothing locally, so those runs were not used):test_todos.py::test_watcher_git_and_github_reads_leave_wire_free, andtest_unowned_checkout_work.py::test_dirty_then_unpushed_then_pushed_linked_checkoutand::test_unreadable_checkout_is_its_units_state_and_the_pass_carries_ontest_owned_turn_goal_replacement.py,test_goal_authority_continues.pyandtest_head_review.py: 8 passed.git grep -nE "update=\{'commander'|def commanding\(self, caller" -- src | wc -l-> 0.Assumed
acting_assignerderives the fork's commander fromTodo.creatorinstead of storing it again on the Assignment.AssignTodowire form gainsactor, likeStrikeTodo's;authored_byalways overwrites it with the calling identity.🤖 Generated with Claude Code