Skip to content

Catch Core's RouteChangedError from its leaf error owner - #1132

Closed
trissim wants to merge 2 commits into
mainfrom
commander/route-changed-error
Closed

trissim wants to merge 2 commits into
mainfrom
commander/route-changed-error

Conversation

@trissim

@trissim trissim commented Oct 21, 2026 •

Copy link
Copy Markdown

P434: consume the route error from Core's leaf error owner

Paired with OpenHCSDev/agent-comms#2480. The six Toad consumers import RouteChangedError from agent_comms.errors: agent_session.py, comms_updates.py, comms_root.py, session_navigation.py, target_commands.py and thread_actions.py. No alias, re-export or restored Core error declaration. Importing the exception back from route_selection recreates the eager coordination-database startup cycle.

Current checkpoint

Per commander instruction15803, merged current Toad main 242e173ff5509818dbde0d97d3eb4d490227418f into the existing PR branch. Published merge fbe653bd9fe19ceb2df7b5205139758b60f5a165; git ls-remote exactly matched HEAD. Separate checkout /home/ts/wt/unit-coverage--P434--toad; original commander checkout and protected Core P417 unchanged.

Main's lockfile now resolves Core to 2e51f3b67fc7ee4acf2c8ee6e34f42d6528d3a70, replacing the obsolete pre-merge lock. This is NOT the final pairing: Core#2480 is still OPEN at 5e8b01627925a75c6c18899a2783ea38b21fb70e, with no merge commit. Relock Core through uv to that PR's actual merge commit after it lands. No hand-edited lock, environment installation, auto-merge or installed-success claim.

Verification

  • git diff --check: passed; checkout clean after publication.
  • Exact-source pairing: Toad fbe653b plus Core5e8b01627, using existing installed runtime dependencies and PYTHONPATH for those two sources. All six migrated modules imported successfully, rc0. This is an import check, not an installed UI journey or a test-suite pass.
  • Initial import check with the shared development venv stopped on missing ui_theme; corrected the interpreter to the existing installed runtime, without installing packages.
  • A separate read-only inventory launch returned UNKNOWN; not retried, and no inventory result claimed. No further source changes were made after the merge.

Receipts under /home/ts/.cache/agent-scratch/unit-coverage/: P434-toad-main-merge.txt, P434-toad-main-publish.txt, P434-toad-paired-imports.txt, P434-toad-paired-imports-installed-deps.txt.

Assumed:

  • Commander still owns Core#2480's landing and the constructor-write measurement repair.
  • The final Core relock and installed UI acceptance remain required; importing source modules is not installation evidence.

agent-comms PR 2480 (P434) moves the route-change error from
route_selection.RouteChanged to errors.RouteChangedError, because putting it
back in route_selection recreates the import cycle presentation ->
route_selection -> active_route -> private_nk_entrypoint ->
coordination_database. Every Toad importer now takes it from
agent_comms.errors; no alias, no re-export. Lands paired with 2480.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trissim
trissim marked this pull request as ready for review October 21, 2026 20:58
Copilot AI balanced review requested due to automatic review settings October 21, 2026 20:58

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 left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

head-review: sent back at 54f185a. The change itself is right: all six importers catch and raise RouteChangedError from its leaf owner agent_comms.errors (class at errors.py:20 on #2480's head), and no route_selection.RouteChanged reference is left in this diff. Two things keep it from landing as the pair:

  1. The lock still pins a Core without the name, at uv.lock (agent-comms source = ...#2e51f3b67, set by #1129). The ratchet reads Core from pyproject.toml's branch (main, ci.yml:37-52), so its six TypeErrors +1 (agent_session.py, comms_updates.py, comms_root.py, session_navigation.py, target_commands.py, thread_actions.py) only mean that main doesn't have #2480 yet, and they clear once it merges. But anything installed from the lock gets 2e51f3b67, where agent_comms.errors.RouteChangedError doesn't exist. Every one of these modules would then fail at import. Fix: after #2480 merges, relock Core to that merge commit (uv lock --upgrade-package agent-comms) in this PR and push, so Toad and its lock land together.
  2. Its pair isn't green: agent-comms #2480 (5e8b01627) currently fails debt-src, smoke and install-rehearsal. Per the pairing, this waits for #2480 green, then the relock, then a re-review on the new head.

@trissim

trissim commented Oct 21, 2026

Copy link
Copy Markdown
Author

head-review correction to item 1: this branch's uv.lock pins Core at aaeb75fea, not 2e51f3b67. The branch predates #1129 and doesn't carry its relock. Same fix, plus one more step: merge main (with #1129) into this branch, then relock to #2480's merge commit.

@trissim

trissim commented Oct 23, 2026

Copy link
Copy Markdown
Author

Superseded: origin/main already carries these renames (no drain_candidate_catchup or RouteChanged left in src or tests).

@trissim trissim closed this Oct 23, 2026
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