Skip to content

Use declared absent reply routes in Toad - #1239

Merged
trissim merged 5 commits into
mainfrom
work/unit-toad--P694
Oct 25, 2026
Merged

trissim merged 5 commits into
mainfrom
work/unit-toad--P694

Conversation

@trissim

@trissim trissim commented Oct 25, 2026 •

Copy link
Copy Markdown

P694: paired Toad consumer of OpenHCSDev/agent-comms#3107

Draft and unarmed. Lands after Core #3107. Pushed/remote-verified implementation head: e89ba2d7d35b0dfda886eda5daba0b7d0ca3742f.

Ownership and change

  • IDEN-3: ResponseDelivery.from_route restated route absence as None at response_delivery.py:19, although Core's NoMessageRoute already declares it. Its parameter now carries MessageRoute | NoMessageRoute; next(map(RoutedResponse, route.present()), UnroutedResponse()) consumes the existing PresentMember/NullMember capability. No route/type/None switch, fallback wire format or new Core mechanism.
  • Both existing callers pass the declared route unchanged: acp/comms_updates.py:89 and widgets/outgoing_message.py:63. Core's acp_extension.py:95 and agent_event_updates.py:244 already declare MessageRoute | NoMessageRoute.
  • tests/support/journals.py:45 now uses PiSessionId.fresh() and imports its owner from native_session_reopen. Deleted the uuid4 import and hand mint.

Exact diff

 src/toad/response_delivery.py | 8 ++++----
 tests/support/journals.py     | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

Net source: response_delivery.py 0. Test support: journals.py 0.

The prescribed two-pattern check is 2 before, 0 after. The full Toad src search also found no other route-is-None or optional-None route annotations. git diff --check passed.

Source and interpreter evidence

Used the existing refactor-audit Repository file enumeration plus Python AST dumps, not a new scanner: 1,061 Toad src/tests and Core package modules plus 10 Core hook modules. The first source archive omitted the hooks; they were restored from the exact Core commit and parsed separately. No remaining syntax parse omissions. Read the owner capabilities, both route consumers and their declaration types semantically. Changed-file AST parse also passed. Dynamic consumers are outside this syntactic inventory.

A read-only interpreter check using the existing Core checkout at 38a3585a9a3283f2e92a6f77b87cb122744ae88d and this Toad source printed:

NoMessageRoute -> UnroutedResponse -> AgentCategory
MessageRoute -> RoutedResponse -> OutboundCategory
session mint: PiSessionId

This proves factory/category behavior, not installed UI acceptance. No saved session, provider input or live store was modified.

Tests: no acceptance claimed

The original P694 order explicitly requested one branch test file; the commander subsequently superseded that step with no branch pytest; integrator tests merged work once. Testing stopped; no pytest processes remain.

Before the correction: two launches failed before collection (missing pinned audit source, then a platformdirs pytest-plugin mismatch). The third run collected the six tests in test_live_output_streams.py and ended 6 failed in 53.34s: the requested Core 9e7c5fd66 predates Refused, which current Toad main imports. These are not passing results or paired-main qualification. The temporary Core archive, one-shot AST script and test scratch are deleted. Concise logs remain in owned scratch.

Integrator owns the single merged-work verification. Actual installed owner-notice rendering as an agent response, rather than outbound, remains required after paired installation.

Assumed

  • Core #3107 lands before this PR is made ready or auto-merge is armed.
  • Route-bearing updates continue carrying the declared Core family; None is intentionally unsupported.
  • No durable wire/session spelling changes: the fixture uses the existing session-ID mint owner.
  • No installed/UI success is implied by the source/interpreter evidence.

Consume MessageRoute/NoMessageRoute through their existing present()
capability instead of re-encoding route absence as None. Mint saved test
journal sessions with PiSessionId.fresh(). Pairs with Core #3107.
@trissim

trissim commented Oct 25, 2026

Copy link
Copy Markdown
Author

Concrete integration dependency from Core #3285: current Core main 6446950f6 now declares this branch as its paired Toad source. Existing Stack.build therefore installed e89ba2d into a private runtime. That installed source still raises ValueError("Command view changed during discovery") at widgets/conversation.py:1518,1554 and ValueError("Command target changed; refresh this view") at target_commands.py:123. CommandContextChanged/CommandDiscoveryCancelled are absent from command_catalog.py, target_commands.py and widgets/conversation.py. Merged #1244/#1245 fixed that exact fatal navigation race; the live installation retains the original #1244 hotfix. Please rebase your owned branch onto current GitHub main, keeping your absent-route repair and those merged cancellation owners, then publish the new head. I will not rebase your branch or install the stale pair. Acceptance: both nominal-route behavior and real saved-history/tab/slash navigation remain working. The route cutover must not get a complimentary crash souvenir.

@trissim
trissim marked this pull request as ready for review October 25, 2026 12:47
@trissim
trissim enabled auto-merge October 25, 2026 12:47
Copilot AI balanced review requested due to automatic review settings October 25, 2026 12:47

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 insufficient remaining quota.

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 merged commit 0d20f52 into main Oct 25, 2026
2 of 3 checks passed
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