Skip to content

P717 stalled orders strike and release themselves - #1960

Merged
trissim merged 24 commits into
mainfrom
fix/p717-stall-strikes
Oct 19, 2026
Merged

trissim merged 24 commits into
mainfrom
fix/p717-stall-strikes

Conversation

@trissim

@trissim trissim commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

P717 — ready for the gaming merge queue

Head: 2b2fefd4cd4d4838de75c5da3217f6936df7d722. Source +298/-119, net +179 (limit +223). No main merge after the replacement order. Not installed or merged.

What changed

  • Connector.watch_orders starts the task without opening the wire. Each worker pass owns its context; it is closed before the minute timer.
  • TodoStore.stalled only observes active held orders. OpenTodoState.open_names() derives eligible states from their declarations; blocked/frozen state stays visible on the board but is not eligible. No P-number list.
  • Assignment validates the replacement first. The incarnation's assigned hook folds the strike and release into the same Todo result and SQLite upsert. A refused or unavailable replacement leaves the owner and strikes unchanged. The older two-write distance rule now uses this same operation.
  • Ordinary incarnations require the commander; StallWatcherIncarnation owns Core's permission and assignment consequence. Deleted the permission subclasses, Stall-prefixed operation/action copies, separate watcher module, destructive pre-release loop and silent conflict skips in that loop.
  • Deleted the new parking/failure tables and their CLI/board paths. Existing commander configuration owns parked units; the existing service log records watcher errors.
  • Restored the transcript reader's source selection and checked actual turns, not the truthiness of its result object.

Verification

Ten existing files were run on origin/main at a6799790f and the branch: test_commander_problem_orders, test_tool_replies, test_connector, test_standing_rules, test_todos, test_tools, test_declared_family, test_turn_identity_equality, test_goal_nominal, test_goals.

  • Main: 157 passed, 9 failed. Branch's ten files: 158 passed, 8 failed; every failure also fails on main. Production source has not changed since that comparison.
  • Final focused run: 13 passed, including all eight watcher cases, migrated assignment callers, the distance rule and concurrent assignment.
  • The actual connector application on a copied bus completed three successful passes. Between every pass, a separate process acquired the wire, registry and exclusive route locks and completed maintenance. No watcher error was logged. The original Todo stayed unchanged.
  • A copied blocked order refused a direct reassignment and kept its owner, strikes and release history exactly unchanged. A missing check directory also refused a real reassignment before any Todo change. With no spare, the original holder stays assigned.
  • Saved native records are controlled fixture data; native history reading, connector lifecycle, state, locks and maintenance are real. No provider input or live-root writes.
  • Both complete-root ratchets: src rc 0 / tools rc 0. No new budget added; inherited budget lines remain. Tools have no diff.

Existing main failures are wording-refusal expectations (three tests), withdrawn-order setup, read-only result decoding, read-tool inventory, open-Todo decoding and an event-consumer fixture with no session owner. They were not patched in this task.

Source evidence

Existing NRA parser/index covered 405 Python files with no parse omissions, before and after. References are lexical evidence, not a claim that dynamic receiver bindings were proved. The existing incarnation, Todo, state-family, transcript and connector owners were read directly. There is one assignment-result hook call, and no competing pre-release writer in the watcher.

Evidence: /home/ts/.cache/agent-scratch/core-pi-durable/P717/: main-ten.log, final-ten.log, served-final.log, delivered-{src,tools}-ratchet.log, delivered-source.jsonl, and served-final/test_three_connector_passes_al0/three-pass-result.json. Earlier failed proof setups remain recorded; the final served proof passes.

trissim and others added 24 commits October 19, 2026 14:48
Stalling owns the 600-second clock and the atomic strike/release transition. Core connector observes activity without running each order Check. Delete commander STALL prompts and automatic fallback assignment. Released rows expose their recorded strikes.

Src-Budget: 160
Cache Git movement per observation; GitProgress applies it once to found commits, pushes and open PRs. Missing checkout is a declared progress state, not an exception fallback. Git read and decode faults raise; only timeout becomes UnreadProgress.

Src-Budget: 160
…vel Coordination import

WheelSpin.assign and both enforce calls come back from main; a unit struck
on a problem is never paired with it again. Stalling.stall_reason writes the
window from Stalling.seconds once; the three ten-minute literals are gone.
coordinator imports no todos-dependent module, so the local import hid no
cycle and moves to module level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed watcher

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…entity

StallWatcherIncarnation joins the thread-identity family as a birthless member
(wire birth -2.0); deleted and unrecorded members now share BirthlessIncarnation,
which owns the mark-to-member decode instead of an if-chain in the record.
StallStrikeTodo/StallReleaseTodo take their permission from StallWatcherPermission;
commander strikes keep CommanderPermission. advance() records the watcher, not the creator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…same pass

After Core's stall watcher struck and released a stalled order, nothing gave
the order to anyone until a commander read its standing rules. The watcher pass
now runs UnownedWheelSpin's own pairing on the orders it just released, for
each order's commander, so the reassign happens in the same pass with no
commander turn. WheelSpin and UnownedWheelSpin move to commander/wheel_spin.py
because commander/standing.py imports order.py, which opens the commander's
configured bus on import; the connector must not do that. TodoStore loses its
watch loop; the rule owns it.

StallWatcherIncarnation's name now derives from its class name through the
declared-name conversion DeclaredFamily already used, shared as
declared_words(); the hand-written "core-stall-watcher" literal is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recorded births pick their member by membership, not by a None lookup.
reissued() lives on the ProblemOrder base, so the wheel-spin assign needs
no narrowing, and it traces the reissued order's own source line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…passes, assigns as the watcher

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-checkout progress

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s to the assigner

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The watcher's recorded failure state, the Core parked set with its CLI and the
watcher's own assignment action are new behavior the review asked for.

Src-Budget: 23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	src/agent_comms/commander/standing.py
# Conflicts:
#	src/agent_comms/commander/order.py
#	src/agent_comms/todos.py
@trissim
trissim marked this pull request as ready for review October 19, 2026 23:39
Copilot AI balanced review requested due to automatic review settings October 19, 2026 23:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@trissim trissim mentioned this pull request Oct 19, 2026
trissim added a commit that referenced this pull request Oct 19, 2026
@trissim
trissim merged commit 4dc42b1 into main Oct 19, 2026
1 of 4 checks passed
@trissim
trissim deleted the fix/p717-stall-strikes branch October 20, 2026 01:59
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.

2 participants