Skip to content

P954: reland paired narrow relationship readers and complete controls - #1349

Merged
trissim merged 2 commits into
mainfrom
work/frame-baseline--P954--toad
Oct 30, 2026
Merged

trissim merged 2 commits into
mainfrom
work/frame-baseline--P954--toad

Conversation

@trissim

@trissim trissim commented Oct 30, 2026 •

Copy link
Copy Markdown

P954 — 2 reland commits; 7 files, +166/−35

Paired source: Core OpenHCSDev/agent-comms#3607 at e1ee783f1a2354563ea6cb8806d49c877c37b439; ToAD 3ce014574f4c6a1d5fcecce45f3768ff2eab9d84. Local and explicit remote ToAD refs match; owned ToAD tree is clean.

This restores the SAME accepted implementation from ToAD#1331 (95be07c37c8274c766b945cff3746f8c45203564), which merged alone and was reverted by #1348 because its Core pair was absent. The restoration is 5368223d7; the remaining strict-status and presentation controls are 3ce014574. Do not land this half independently again. The old merged PR cannot accept this reland; this is its continuation, not a competing implementation.

1. Complete nominal people, with a distinct real model-cache miss

Before, RelationshipEntry.person was ThreadView | None; consumers rediscovered absence, and show_member converted nominal absence back to None before looking up a model.

After:

Core ThreadView(PresentMember) / NoThreadView(NullMember)
└─ RelationshipRows.show_member passes captured Mapping[str, ThreadRowModel]
   └─ RelationshipRow.present
      ├─ unavailable entry: original unavailable/detail handling
      ├─ person.present(): lookup person.thread.name, use matching cached model
      │  └─ real cache miss/mismatched birth: existing async model preparation
      └─ no person: original label/detail path, no model lookup

No cache copy or mutation. Existing worker cancellation, stale-entry protection, availability, navigation, focus and details remain. Nominal person absence is not a model-cache miss.

IDEN-3: fact=person presence versus distinct cache absence; at=former show_member next(..., None); derive=existing presence capability; by=Core ThreadView/NoThreadView and RelationshipRow.present in src/toad/widgets/thread_comms.py:114. Core's wire absence stays JSON null.

Added source controls, UNRUN: the existing test_relationship_groups_follow_core_edits_tools_sorting_and_renames journey now mounts real relationship rows in its already-open panel, uses genuine Core entries, waits for actual uncached ThreadRowModel.of preparation, reuses an actual matching cached model, and checks a genuine channel entry with nominally absent person retains label/detail without gaining a thread model. Both temporary rows retire in finally. No new App, fake observer, fake person or patched production path was added.

2. One retained peer owns strict status resolution

Before, DM status acquired CurrentDisplayReferences for the entire registry to recover one peer name.

After:

Core ThreadIncarnation.require_current(snapshot)
├─ IncarnationThreadTarget.selected_name
└─ DmConversation.status_text: one snapshot → configuration.answer(current.name)

ChannelConversation.status_text: unchanged, no registry acquisition
WireSource.references: deleted; genuine consumers use captured sidebar references

Strict resolution rejects missing or recreated births with UnregisteredThreadError, and follows original rename aliases to the current canonical name. Tolerant historical destination resolution remains distinct. asyncio.to_thread and the actual configuration answer owner remain.

IMPL-12: fact=strict original-peer selection; at=ToAD conversation_kind.py:301; derive=base-method; by=Core ThreadIncarnation.require_current at thread_identity.py:212 (paper1 Theorem4.7: copying the answer creates an independent supply path).

Added source controls, UNRUN: the existing copied-conversation rename control now checks actual status before and after rename. test_dm_status_refuses_deleted_or_recreated_peer covers actual public unregister/delete, absent birth, same-name recreated birth, successful replacement status, and refusal of the retained old peer. Explicit RecordedCreationTime separates the recreated birth; no timer or fake configuration answer.

3. First wire page does not wait for discarded sidebar references

Deletes only CommsChatView.initialize_view's discarded current_sidebar await. Original shared observation preparation, root/source/viewer/prompt/native-anchor checks and real refresh ownership remain. Genuine sidebar reference and mention consumers remain. Geometry/preparation/page ownership is untouched.

Existing authored control, UNRUN: test_first_wire_page_paints_before_pending_sidebar_and_keeps_source_fences uses the real private Workspace/bus/observer and the actual first page. It closes/joins the real reader, changes archived interest, requires first paint while genuine sidebar/reference waiters are pending, restores the receiver in finally, and checks labels, alternate root and retirement fences. No fake-ready sidebar, second observer or synthetic App was added.

Evidence and exact remaining limits

  • git diff --exit-code 95be07c37c8274c766b945cff3746f8c45203564 HEAD -- src/toad/conversation_kind.py src/toad/widgets/comms_chat.py src/toad/widgets/thread_comms.py src/toad/wire_history.py returned0: all four production files are identical to the accepted source, not a replacement implementation.
  • All 7 changed Python files AST-parse; zero omissions. git diff --check is clean. These are syntax/source checks, not import, typing or behavioral proof.
  • Retained source evidence: p954-strict-before.json / p954-strict-after.json, 8 parsed modules,7 production modules,104 projected classes,0 parse omissions. This predates the latest two control edits; dynamic/conditional/local/external bindings remain OPEN.
  • Original status lead: /home/ts/.cache/agent-scratch/claude-code/perf/toad-1696798-1802-pyspy.raw:64/370 samples on the whole-catalog chain. A sample fraction is NOT measured CPU share or a promised saving. No new exploratory profile was run.
  • Root owns execution of the failed/changed contract controls, matched Core/ToAD typing and cold imports, authentic saved-cut parity/count/opening comparisons and the actual configured saved-session frontend journey.
  • No author pytest, checker, project import, build, provider, frontend, profile, service or install ran. No installed speedup,16ms frame result or p99.9 acceptance is claimed. P954 stays open.

Exact ToAD selectors for root's bounded combined selection:

tests/textual/test_conversation_kind.py::test_dm_rename_retains_key_and_history_scope_but_resolves_current_name
tests/textual/test_conversation_kind.py::test_dm_status_refuses_deleted_or_recreated_peer
tests/textual/test_thread_relationship_sidebar.py::test_relationship_groups_follow_core_edits_tools_sorting_and_renames
tests/textual/test_channel_updates_and_returns.py::test_first_wire_page_paints_before_pending_sidebar_and_keeps_source_fences

decoded the address book to print one name
fixed the reader, then shipped it without the book's new type
this reland is paired; no encore

Assumed: Root reviews this exact matched pair, lands both halves coherently and executes the real acceptance journey before reporting a working performance repair. Existing sessions, UNKNOWN inputs, original profiles and other owners' checkouts were not touched.

Copilot AI balanced review requested due to automatic review settings October 30, 2026 05:20

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.

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