Skip to content

Integration batch two: owned dispatch, closure state, field directives, retained waits, install speed, import tax - #2701

Merged
trissim merged 30 commits into
mainfrom
integration/next
Oct 23, 2026
Merged

trissim merged 30 commits into
mainfrom
integration/next

Conversation

@trissim

@trissim trissim commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Integration batch two: #2692, #2694, #2646, #2697, #2698, #2683, plus the integrator fixes (Platform import, dead table imports, carry read snapshot closed before write-back).

One local pass over the 17 touched test files at f07ea2b: 163 passed, 1 failed, 1 error.

  • FAILED test_carry_bus_history::test_predecessor_publisher_history_round_trips_into_bus: known red on main (retired last_finished_turn_id in tests/fixtures/p117), being fixed on its own PR.
  • ERROR test_tool_output large-uncertain-inputs setup: OSError E2BIG from git argv in a fixture, not touched by this batch beyond a one-line rename.

🤖 Generated with Claude Code

trissim and others added 30 commits October 23, 2026 03:35
# Conflicts:
#	src/agent_comms/acp_extension.py
#	src/agent_comms/context_store.py
#	tests/test_acp_queue_contract.py
FieldCodec.digest owns the SHA-256 of a declared value's sorted compact
encoding. CursorEnvelope.digest, QueueChangedUpdate.digest,
AuthorizationQuery.request_id and ContextSegmentVersion.append each spelled
that procedure by hand; they now derive it. Byte-identical output.

private_sidecar.py imported FieldCodec twice, and selected_write_plan.py
imported Platform twice (already on main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acp_extension.py keeps main's recipient_lookup/incarnation.lookup check over
#2646's claimed_identity field name. private_sidecar.py keeps only the
TYPE_CHECKING import; Annotated and Literal are unused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The batch dedupe and #2646 each deleted a different copy of Platform in
selected_write_plan.py, leaving none. selected_tool_broker.py imported
Platform twice; native_runtime_input.py kept DurableTables and
SharedFileTables after #2646 stopped using them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Install 8 spent its time on three things that do not need to happen:

- Carry steps: 41 step_worker processes (1 dry run, then backup, migrate
  and retire on the practice copy, then backup and migrate live), each
  paying the ~2 s agent_comms import for milliseconds of work. The worker
  now takes a whole pass: STEPS lists each step in order and RESULT holds
  the pass's answers under the operation's declared answer type. One
  backup_files pass on a copy of the live bus: 14.8 s as 8 workers,
  2.1 s as 1.
- prepare-pi-native: install_native ran it in the per-install scratch
  tree, where .pi-native-<pin> never exists, so every install rebuilt
  the same pin from npm (20.2 s in install 8; 27 runtimes hold
  byte-identical copies of 9c5a3c174532e517). The built package is now
  kept under ~/.local/share/agent-comms/native/.pi-native-<pin>, keyed
  by the manifest, which pins the declared build inputs and the output
  tree. PinnedLocationProbe requires the checkout's sources to still hash
  to the manifest's inputs line before the pin is used as a key, and
  PrepareNativeProbe still qualifies the runtime's copy against the
  pinned tree digest. Reuse: 0.04 s inputs check + 4.1 s copy.
- PrepareNativeProbe qualified one immutable runtime tree up to three
  times per install (build, rehearsal, live): 2.6 s, 6.8 s and 47.8 s in
  install 8, the last on a page cache the bus backup had just cold-
  evicted (qualify measured 10.8 s cold, 0.49 s warm). Qualification now
  happens once, where Stack.build selects the runtime, for a new and a
  reused runtime alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreadNameOwners kept SQLiteFile.read_snapshot(path) open for the whole
carry, holding a read transaction on the file it later backs up into.
Connection.backup retries SQLITE_BUSY forever, so applying the carry hung
(tests/test_thread_name_owners_carry.py wedged at thread_name_owners.py:118).
The snapshot now lives only for the copy into memory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 08:58
@trissim
trissim merged commit 05fcdfe into main Oct 23, 2026
2 checks passed

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

Copy link
Copy Markdown

debt-tools at 3734219, every finding:

grew FamilyFlattened:tools/cutover/carry_bus_history.py +3
grew FamilyFlattened:tools/cutover/carry_claim_fields.py +2
grew LintFindings:tools/cutover/carry_bus_history.py +1
grew LintFindings:tools/cutover/carry_claim_fields.py +9
grew LintFindings:tools/cutover/retired_claim_fields.py +1
grew NoneAbsence:tools/cutover/carry_claim_fields.py +1
grew NoneAbsence:tools/cutover/retired_claim_fields.py +1
grew StringIdentity:src/agent_comms/plan_phases.py +3
grew StringIdentity:tools/cutover/carry_bus_history.py +3
grew StringSubscript +1
grew TypeErrors:tools/cutover/carry_claim_fields.py +3
grew TypeErrors:tools/cutover/carry_declared_failures.py +1
grew Unformatted:tools/cutover/carry_bus_history.py +1
grew Unformatted:tools/cutover/carry_claim_fields.py +1
grew Unformatted:tools/cutover/retired_claim_fields.py +1
introduced NoneAbsence:tools/cutover/carry_claim_fields.py at lines [148]
introduced NoneAbsence:tools/cutover/retired_claim_fields.py at lines [84]

@github-actions

Copy link
Copy Markdown

debt-src at 3734219, every finding:

grew FunctionLocalImport:src/agent_comms/installer/interpreter_operation.py +1
grew LintFindings:src/agent_comms/agent_backend.py +1
grew LintFindings:src/agent_comms/field_codec.py +1
grew LintFindings:src/agent_comms/task_sources.py +1
grew LintFindings:src/agent_comms/ui_model/observation.py +1
grew NoneAbsence:src/agent_comms/field_codec.py +1
grew StringIdentity:src/agent_comms/plan_phases.py +3
grew StringIdentity:tools/cutover/carry_bus_history.py +3
grew TypeErrors:src/agent_comms/field_codec.py +3
grew TypeErrors:src/agent_comms/installer/carry.py +3
grew TypeErrors:src/agent_comms/installer/step_worker.py +1
grew TypeErrors:src/agent_comms/turn_inputs.py +1
grew UncarriedRecordFormat +2
grew Unformatted:src/agent_comms/audience_manifest.py +1
grew Unformatted:src/agent_comms/installer/step_worker.py +1
introduced NoneAbsence:src/agent_comms/field_codec.py at lines [1826]

trissim pushed a commit that referenced this pull request Oct 23, 2026
…wners

- RetiredCommanderFile is retained bus state its carry consumes: a DurableFile,
  so every declared root file is durable or runtime again (a012a03, #2743).
- The ratchet guard composes owners through Black, so the formatting measure
  counts nothing and each comparison measures only the classes; 97256db
  flipped the expectation to status 0 while the fixture stayed unformatted.
- bus_files keys are DeclaredFile since #2709: assert the declared owner.
- Routes are written owner-only by their owner; the backup reads the saved
  route through read_active_route since #2731.
- The bus-history round trip runs every step the chain orders before the
  goal-request carry, under the maintenance hold, instead of a hand-picked
  subset that #2701's claim-field carry fell between.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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