Skip to content

Let turn origins and child processes own absence behavior - #2647

Merged
trissim merged 4 commits into
mainfrom
next/absence-origin
Oct 23, 2026
Merged

trissim merged 4 commits into
mainfrom
next/absence-origin

Conversation

@trissim

@trissim trissim commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Scheduled turns encoded autonomous input as None, while backend code repeated the child-input liveness rule and mirrored its stdin. This change gives absence to TurnOrigin/NoTurnOrigin and command transport to the existing PiChild/AttachedChild owners.

Message.batch_target derives exact_reply_target; existing Message.reply_target keeps its automatic-reply meaning. Message's existing messages() method supplies actual originals; NoTurnOrigin supplies none. Scheduling and delivery scope call those origin operations. No Message dataclass field or persisted wire shape changes. typed_table.py remains outside this PR as ordered.

AttachedChild.send owns the one ordinary-input liveness check; drain owns backpressure and write combines them. PiChild.send registers once, writes the encoded command and returns its future. pending_response and StatsRequest consume that future instead of registering again. PiRpcChannel.encode and backend.stdin are deleted. Attestation, abort, prompt/steering callbacks, retained/borrowed RPC queries and catalog queries use the child. The catalog keeps its existing BoundedRun lifetime.

The independent fenced prompt writer still uses raw unbuffered writes while its original locks are held. PiChild.send_fenced registers that command once and invokes that existing writer through AttachedChild. Calling ordinary send here would emit bytes before the fence and send twice. This separate registration path is explicitly raised with the commander for a source decision; it is not presented as satisfying the literal single-method registration requirement.

Validation before Tristan stopped parallel testing:

  • Source checkpoint8e28/a32: 28 passed,13 failed in39.74s. Failures exposed my new messages tuple property shadowing the existing messages() method; fixed by deleting the property and using the method.
    -325dd9557: the17-file routing/backend/native/catalog/child test command in absence-child-owned-tests.log exercised pending_response and failed. It was still running when that head was reported; it was not reported passing. Stopped on the known duplicate-registration bug before final counts.
    -595cb6ac3: no local tests, debt scans or census scripts run under the new centralized-integration order. Added actual pipe exchanges for RequestId and anonymous commands for the integrator to run.
  • Last required probe check at325 (backend/input_drain source unchanged since): backend4->0, input_drain1->0. No proc.stdin remains outside child_process; no scheduled-origin None/truthiness selectors. Initial existing NRA source trace covered458production modules/4806projected classes; no after-scan loop.

Assumed: every production PiSessionChild launch uses streaming input (PiSessionChild.start -> PiChild.start_command -> AttachedChild.start default); synchronous sends remain inside existing send boundaries before awaiting drain; catalog BoundedRun still owns process/timeout retirement; UI reply registration remains exactly one as main's reader.encode did; fenced prompt writes must remain unbuffered under their independent locks. No installed-build claim.

The PR is ready for the single integrator. Auto-merge was disabled to follow the latest rule that only that integrator merges ready heads into integration. No further local test runs.

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

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 reached their quota limit.

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.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

debt-tools at 9ac80ac, every finding:

grew LintFindings:tools/cutover/carry_context_request_key.py +1
grew StringSubscript +3
grew Unformatted:tools/cutover/carry_context_request_key.py +1
grew Unformatted:tools/cutover/carry_turn_owner.py +1

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

debt-src at 9ac80ac, every finding:

grew FunctionLocalImport:src/agent_comms/child_process.py +1
grew FunctionLocalImport:src/agent_comms/pi_commands.py +1
grew LintFindings:src/agent_comms/active_route.py +1
grew LintFindings:src/agent_comms/context_store.py +1
grew LintFindings:src/agent_comms/coordination_database.py +1
grew LintFindings:src/agent_comms/installer/backup.py +1
grew LintFindings:src/agent_comms/messages.py +1
grew LintFindings:src/agent_comms/native_child.py +1
grew LintFindings:src/agent_comms/private_registry_guard.py +1
grew LintFindings:src/agent_comms/schedule_rules.py +1
grew LintFindings:src/agent_comms/selected_write_plan.py +1
grew TypeErrors:src/agent_comms/child_process.py +3
grew TypeErrors:src/agent_comms/native_child.py +2

@trissim
trissim disabled auto-merge October 23, 2026 07:56
@trissim
trissim merged commit f2f8035 into main Oct 23, 2026
5 of 8 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