Skip to content

Share human-read evidence across notification presentation passes - #4904

Merged
trissim merged 2 commits into
mainfrom
perf/registry-runtime-boundary
Nov 18, 2026
Merged

trissim merged 2 commits into
mainfrom
perf/registry-runtime-boundary

Conversation

@trissim

@trissim trissim commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

One human-read capture for the whole notification presentation pass

The original real three-thread presentation control acquired ReadLedger three times; it now requires one. This removes repeated whole-document detachment per window, rather than weakening the store's detached-read contract. The initial witness failed as expected. Final critical rerun: 50 passed, exit 0. Earlier affected-family runs reached 53, 85 and 244 passing controls respectively; their exposed stale controls were corrected and are included in the final rerun. These overlapping groups are not added together. No overall CPU or stable wall-clock saving is claimed.

HumanReadCut owns the root and its first ledger/document read for one short-lived pass. NotificationSource composes that scope with AssignmentSource through native multiple inheritance. Assignment-only consumers remain independent. ThreadPresentations shares the composed source across its existing open readings scope; live and recorded reference readers hold one cut across every bounded chunk. Every projector takes its root, ledger and document from that cut.

CapturedNotificationEvidence implements the same role with its original explicit fields; constructor field names/order remain root, ledger, document, snapshot. No stored or wire record shape changes. Human display, model consumption, independent replies and assignment state remain distinct. Original recipient births, visibility, bus identities and direct-human read projection retain their existing owners.

History's lower reader contract

HistoryReadSource composes the existing RelationshipSource and InputIngressContext contracts, with no copied fields or forwarding methods. HistoryViews inherits it. The historical reader annotates that actual lower contract instead of hiding an import of the whole facade. NRA's promote_guarded_import passed against the complete src/tests/tools import graph. Runtime type-hint resolution and MRO/constructor checks passed.

Verification

  • Existing presentation-family control counts the actual ReadLedger.read calls and retains assignment/input acquisition and next-pass change checks.
  • New real direct-human display control: an already captured pass retains its answer after a durable paint; a fresh pass sees that paint.
  • Corrected two stale test calls to has_evidence(): they previously tested bound methods as booleans. The original failure remains retained.
  • Authored declaration-selected NRA plans, reviewed simulations and revision-checked applications retained under notification-read-cut scratch. The import promotion uses the complete graph; the initial exact-source patch plan is not a global architectural proof.
  • Verification repairs also replace the obsolete working field and string change identities with their existing methods/value types, retain committed WAL reads during a writer, and drain the observer's scheduled continuation wakes in the shared fixture. Genuine physical-reader lock contention remains covered (passed).
  • Four additional consumers of that shared observer fixture are running behind this landing. No user window changes, model calls, replayed inputs, new environments or subagents. Independent acceptance and installed behavior are not yet claimed.

P283. Part of the continuing solo CPU-factoring goal; backend-free activity-client startup and other measured paths remain open.

Installed result and fixture correction

Installed8055175b,exit0;15 installed controls passed and fresh request23608 was answered23610. The later wider observer follow-up reached53passes then timed out; it was not green. Test-only follow-up4905 merged4beef903 restores the shared single-pass fixture and drains the notification fixture after reading its frames;15 focused observer controls then passed. No second install was needed for that test-only change. P283 delivery is recorded in Core. No overall CPU or old-window saving claim.

@github-actions

Copy link
Copy Markdown

debt-src at c80b30b blocks on 2 lines:

grew TypeErrors:src/agent_comms/registry/history_read_source.py +1
found TypeErrors:src/agent_comms/registry/history_read_source.py at src/agent_comms/registry/history_read_source.py:8 (Definition of "registry" in base class "RelationshipSource" is incompatible with definition in base class "InputIngressContext"  [misc])
Warn-only, never blocks (2)
src/agent_comms/messaging/historical_views.py: LintFindings +5
found LintFindings:src/agent_comms/messaging/historical_views.py at src/agent_comms/messaging/historical_views.py:3 (I001 [*] Import block is un-sorted or un-formatted) src/agent_comms/messaging/historical_views.py:261 (E501 Line too long (103 > 100)) src/agent_comms/messaging/historical_views.py:294 (E501 Line too long (103 > 100)) src/agent_comms/messaging/historical_views.py:638 (E501 Line too long (103 > 100)) src/agent_comms/messaging/historical_views.py:678 (E501 Line too long (102 > 100))

@trissim
trissim marked this pull request as ready for review November 18, 2026 23:10
@trissim
trissim merged commit 8055175 into main Nov 18, 2026
3 of 5 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.

1 participant