Skip to content

Repair Toad-main Core API callers and sidebar worker typing - #1344

Merged
trissim merged 3 commits into
mainfrom
fix/toad-main-callers
Oct 30, 2026
Merged

trissim merged 3 commits into
mainfrom
fix/toad-main-callers

Conversation

@trissim

@trissim trissim commented Oct 30, 2026 •

Copy link
Copy Markdown

Summary

2 source commits carried on one PR; 5 files, +7/-6; 5 removed Messaging calls → 0; 22 assertion ASTs and all sender/target/body arguments unchanged. No new classes, adapters, fixture framework, or compatibility methods.

P972 migrates actual Toad main fea097d callers against Core main 3274448901ece95c671110cbf8c1bb6e6b765136. Source-only author proof; application acceptance remains with the integration owner.

Message publication: before / after

Before, four read/unread tests called deleted Messaging.send_message and expected a full Message. Core's existing Messaging.send already owns registered agent lookup, executable-role validation, sender incarnation and publication; its SendResult.message is the committed full envelope (src/agent_comms/messaging.py:62–110).

After, each test calls Messaging.send(original_sender, original_target, original_body).message. The existing Workspace.thread (tests/support/workspace.py:41–52) declares every original sender; no Workspace change is needed. Actual human UI sends keep the existing send_user_message path. No agent message is relabeled human; sequence, view key, sender, role and source evidence remain on the real envelope.

Deleted: five obsolete API selections. No behavior-owning class changed, and no duplicate send helper was introduced.

Consumer closure and preserved behavior

  • tests/app/test_channel_display_basis.py: hidden DM and channel history retain their original authors; visible-only marking and hidden expansion assertions unchanged (5 assertions).
  • tests/textual/test_saved_view_read_only.py: union history still uses the three real committed envelopes; read-only submission, unchanged wire bytes and pin assertions unchanged (4 assertions).
  • tests/textual/test_divider_only_viewport_stays_unread.py: divider-only unread case uses the real final Message (5 assertions).
  • tests/textual/test_channel_partial_paint.py: partial painting, scroll-to-read and style-switch identity assertions unchanged (8 assertions).

git diff --check passed. NRA ModuleSyntaxIndex inventory before/after parsed 632 source modules and 2,099 class declarations with zero parse omissions (all Toad src/tests plus selected existing Core owners). It records lexical imports, inheritance and relevant consumers; dynamic reflection/runtime alias resolution is not proved. Removed comms.messaging.send_message sites: 5 → 0. Both legitimate Textual app._driver.send_message sites remain unchanged. A separate AST comparison proves all 22 assertions and all five original argument lists unchanged. These are source checks, not execution.

Evidence retained under /home/ts/.cache/agent-scratch/awareness-schema/: p972-source-{before,after}.json, corresponding logs, and p972-assertion-proof.json. One-shot collector is retired after recording its hash before delivery.

Actual main versus companion-only drift

  • Actual Core main still declares ReadCommanderUnit at ui_model/observation.py:432; Toad main's import is therefore not a removed-main-API failure. Core #3566 and Toad Integrate owner reads and common queue presentation #1319 own its paired replacement. This PR neither restores a compatibility API nor prematurely applies that unmerged companion.
  • HudRecord, message_parts and agent_comms.nominal have zero actual-main Toad source/test references. No unmerged nominal package is imported.
  • Toad main already includes P964: migrate compaction fixture to shared child stdio #1340's DetachedChildStdio fixture migration. Exact-head hosted run 40987997770 at this PR's ab6e7f8 collected 696 tests and stopped on one ImportError at tests/textual/test_compaction_turn_events.py:12 (construction at :24 inside SpawnedProcess.launch, not ProcessCommand.start). Actual Core origin/main a8b8b95709c4b110c69a1fea9f11ead880e09df6 has zero DetachedChildStdio references. OPEN Core #3619 head 27d6b5691aeaff357335f61728a205b5aa2079b0 declares it at native_build_inputs.py:93, preserving DEVNULL stdin and the existing configurable stdout/stderr. The class was not deleted: the fixture caller landed before its declaration. install-speed retains #3619's declaration and related review repairs; root owns matched integration. This PR does not restore old stdio keywords, add compatibility code, or duplicate that author's API. Source and hosted failure evidence were sent to install-speed and root.
  • Queue-toad-fix supplied annotation commit 82ad6aa on the existing Repair Toad-main Core API callers and sidebar worker typing #1344 carrier a163483: import the existing Textual Worker and declare _row_mounting: Worker[None] | None at sidebar_tree.py:242. This deletes the false inferred always-None field contract; it changes no mounting decisions. The author read its exact diff, fast-forwarded the owned P972 allocation to that carrier, and added the Messaging migration there. The contributor explicitly stopped further pushes while this closure is owned here.
  • Hosted run 40984076791 belongs to prior Run Core's client ratchet entry, with the audit submodule it pins #1342 head ed55bbb, not Toad main: both jobs failed action YAML validation (submodules duplicated at .github/actions/core-from-main/action.yml:43) before collection. Current Run Core's client ratchet entry, with the audit submodule it pins #1342 head is 9b9e28e and has a separate owner. No claimed suite result is derived from that failed setup. Older main run 39659981340 belongs to 43b0467, not the main revision repaired here.

Exact-head hosted evidence and remaining red checks

The actual #1344/ab6 run 40987997770 is retained in p972-ab6-hosted-failures.log: collection reached 696 tests, then the one missing-declaration import above caused exit 2 after 5.72 s. This is not a green suite, and no tests executed in that collection job.

The SAME run's production debt job exited 1: NoneAbsence:src/toad/widgets/sidebar_tree.py grew 9 → 10, introduced at line 242 by the supplied Worker[None] | None annotation. Existing slot guards are at :394–397; its only other lexical consumers are tests/textual/test_channel_member_mount_lifetime.py:26–29 and tests/textual/test_sidebar_rows_in_steps.py:65/:87. Root was notified while exact-head review remains open. No counter rebudgeting, spelling trick, compatibility wrapper or author ratchet run was used. This red needs an owned source decision before full acceptance, not an invented pass.

The PR remains source-delivered, NOT complete API/application closure. These exact-head results supersede the older setup-only run for current failure attribution; that older failure is retained as historical evidence.

Required integration proof (author UNRUN)

Root/Claude owns one necessary combined collection and app execution under the native test lease: the four affected paths, actual current-main commander import/open, ordinary conversation open, visible-only read marks, saved-view read-only behavior and tab return. Then exact-head review, queue landing and installed acceptance. No author pytest, ratchet, provider/runtime launch, package/environment change or input replay was run.

Assumed: the existing registered agent role and SendResult.message contract are intended; this is the explicit P972 order, not an invented sender policy. No performance improvement, merge, install or live usability is claimed.

five calls to a deleted method
zero reasons to resurrect it

Copilot AI balanced review requested due to automatic review settings October 30, 2026 01:43

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 8a46f4b into main Oct 30, 2026
1 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