Skip to content

P958: retain the context annotation reader across inspections - #1363

Merged
trissim merged 4 commits into
mainfrom
work/slot-activity--P958-context
Oct 30, 2026
Merged

trissim merged 4 commits into
mainfrom
work/slot-activity--P958-context

Conversation

@trissim

@trissim trissim commented Oct 30, 2026 •

Copy link
Copy Markdown

P958 production caller companion — source checkpoint, NOT qualified

Head bcc8ce7, push and ls-remote match. Current main is included. git diff --stat origin/main...HEAD: 3 files, +6/-21. Latest commit: 3 files, +4/-19.

Matched Core: OpenHCSDev/agent-comms#3613, head 1598bda4a03b34f8922ffdbfb8d3cdcc18dcd205. The API/caller pair is not independently landable. Earlier nominal fixture companion #1346 is merged; this PR does not reopen it or duplicate the unrelated producer-digest companion #1360.

Before / after

  • ContextInspection supplies its existing registry's retained coordinator_reader instead of a path that loses read lifetime. NativeContextData comes from its actual response declaration owner, pi_payloads, after the Core family move.
  • RuntimeConnection gets the actual owner's ThreadIncarnation. A registry incarnation is not an ACP attachment, and no AcpSessionId(owner.name) conversion is introduced here.
  • AgentController.request_owner used the subscription-bearing RuntimeProxy through a forwarding-only OwnerRequestContext wrapper. It now uses the request-only RuntimeConnection with the retained incarnation and actual process socket. Existing ClientSessionRequest remains the UI attachment authority; owner-incarnation checks and connection close remain.
  • The now-unused 12-line OwnerRequestContext declaration is deleted, with no compatibility alias or second request path. Whole Core/allocated-Toad source/test/tool search found no remaining references.

Verification boundary

All three changed Toad sources were syntax-compiled, alongside 34 changed Core sources: 37 total, exit 0. No author tests, checkers, product import probes, provider/UI calls, services or install. Root owns matched execution and actual saved-session journey.

The Core checkpoint still has a disclosed startup-context identity defect at owner_launch.py:162 (AcpSessionId(self.thread)); that is retained as an open P958 correction, not called a complete migration. Both PRs still need exact-head review and qualification.

Historical Core qualification remains 14 passed /2 failed at 3b8f1540a, not a clean result. The original installed P958 acceptance remains worker <15% CPU with >=2 streaming agents and <50 registry-lock opens/10s, measured by root; AFTER is unmeasured.

Assumed: syntax and name closure are not runtime/MRO/transport proof. No statement that this source is installed or that it fixes the separately owned shared-stdio settlement timeouts.

Receipts: /home/ts/.cache/agent-scratch/slot-activity/p958-toad-contract-publish.log and p958-contract-syntax.log.

request_owner needed one request
OwnerRequestContext supplied a dataclass-shaped forwarding address
12 lines retired; the actual connection still does the work

Copilot AI balanced review requested due to automatic review settings October 30, 2026 10:51

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 enabled auto-merge October 30, 2026 13:41
@trissim
trissim merged commit fd683f3 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