Skip to content

Separate metadata and fact publication from ACP transport startup - #4902

Merged
trissim merged 5 commits into
mainfrom
perf/runtime-observation-boundary
Nov 18, 2026
Merged

trissim merged 5 commits into
mainfrom
perf/runtime-observation-boundary

Conversation

@trissim

@trissim trissim commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Results and limits

  • Metadata family controls: 382 passed, 2 skipped. Spawned-worker family: 4 passed.
  • Fact-publication/runtime group: 102 passed, 12 skipped, exit 0, including native channel replies, owner-socket replay, compaction and session retirement.
  • Actual background drain failure/recovery group: 14 passed, exit 0 after repairing stale method callers and invalid SQLite test setup/restoration.
  • Rebased fact/annotation/drain controls: 245 passed, exit 0, on current Core main 704ac58. Toad companion #2140: 35 passed, exit 0, plus the real compaction producer 1 passed, exit 0. Earlier worker/error/fixture failures are retained.
  • Cold threads returns the same SHA256 without importing acp.schema. It still imports native_pi. Preliminary cold timings are not a stable speedup or overall CPU claim.

One fact-publication contract, transport-owned envelopes

Move nine complete runtime observation declarations, then explicitly replace NativeMetadataObservation's optional path representation as described below, and five spawned concurrency workers without importing pytest's fixture graph. AgentCommsUpdate, UpdateBatch and encode_updates now live below text routing. SessionUpdateSink encodes original facts once; AcpUpdateSink owns the empty ACP SDK envelope. NoController remains transport-free and validates before declining publication.

Migrate all original runtime/socket/session sink implementations and fact producers together: failures, queue state, started input, turn changes, compaction, session identity and transcript replay. Preserve publication bools, ordering, original failed text and worker-side transcript encoding. SessionInfoUpdate and text-bearing updates stay distinct. No encoder compatibility aliases or new guarded imports.

Native session-path observation

Unobserved and reported paths are distinct immutable values. A reported empty path retains its identity and the original no-attachment effect. Only a nonempty report invokes the existing captured turn attachment; that owner retains fence validation and publication. StateData.agent_info is the sole production conversion boundary; TurnProgress delegates attachment without a null/type case. Native wire output and persisted runtime-info values are unchanged.

113 focused checks passed, exit 0, including null/empty/nonempty identity, real turn attachment fencing, native payloads and runtime metadata. The gate's independent NoneAbsence count for runtime_observations is now zero. Current AST comparison confirms the nine declarations retain every other original field, method and base.

Verification repairs

DrainObservation.holds_event_current is a method, not a boolean field. The broken-store control now creates genuinely absent/consumed schemas, uses the existing SQLite snapshot owner instead of copying only the main file, closes raw connections and restores through SQLite plus its change notification. The original tests could initialize their supposedly broken schema or restore an incompatible WAL. No production observer repair is claimed.

NRA declaration-selected plans, simulations, applications, independent AST comparisons and every failed run are retained in named scratch. Toad's companion changes migrate its test consumers and repair the warm-helper descriptor range and stale UI controls; no physical user-window test is claimed.

Still open

P279's backend-free installed activity client is not achieved by this partial batch; fresh installed delivery is verified. Merged as e7dfecb, with companion Toad #2140 merged as e5eff11109a2. Installed in runtime core-e7dfecb09-lock-83386afa894a8c9f; native reply b54dd9cdac47 explicitly answers fresh probe91f01d07c590. No whole-machine CPU saving is claimed. Existing guarded-import debt remains.

The two NRA relocation defects are now repaired separately in NRA #479: implicit sibling discovery and its competing text writer are deleted. 87 focused controls, 72 repository guards and 14 installed-package controls passed in separate overlapping groups. Earlier unsafe simulations remain unapplied. P279 still needs a backend-free activity-client import; it remains open.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

debt-tools at ae737f4 blocks on 26 lines:

grew ClientTypeErrors:batrachian-toad/tests/app/test_recorded_transcript_reader.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/app/test_transcript_recipient.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/model/test_session_updates_after_binding_change.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/agents.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/coordination.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/core_adapters/mcp_turn_boundaries.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/core_adapters/typed_turn_events.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/peers/delayed_load.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_cursor_request_results.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_initial_session_title.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_input_failure_draft.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_sent_message_drawn_once.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_session_agent_selection.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
found ClientTypeErrors:batrachian-toad/tests/app/test_recorded_transcript_reader.py at batrachian-toad/tests/app/test_recorded_transcript_reader.py:11 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/app/test_transcript_recipient.py at batrachian-toad/tests/app/test_transcript_recipient.py:6 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/model/test_session_updates_after_binding_change.py at batrachian-toad/tests/model/test_session_updates_after_binding_change.py:3 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/support/agents.py at batrachian-toad/tests/support/agents.py:151 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/support/coordination.py at batrachian-toad/tests/support/coordination.py:8 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/support/core_adapters/mcp_turn_boundaries.py at batrachian-toad/tests/support/core_adapters/mcp_turn_boundaries.py:23 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/support/core_adapters/typed_turn_events.py at batrachian-toad/tests/support/core_adapters/typed_turn_events.py:42 (Cannot instantiate abstract class "Pipe" with abstract attribute "publish_metadata"  [abstract])
found ClientTypeErrors:batrachian-toad/tests/support/peers/delayed_load.py at batrachian-toad/tests/support/peers/delayed_load.py:26 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_cursor_request_results.py at batrachian-toad/tests/textual/test_cursor_request_results.py:13 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_initial_session_title.py at batrachian-toad/tests/textual/test_initial_session_title.py:8 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_input_failure_draft.py at batrachian-toad/tests/textual/test_input_failure_draft.py:11 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_sent_message_drawn_once.py at batrachian-toad/tests/textual/test_sent_message_drawn_once.py:10 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_session_agent_selection.py at batrachian-toad/tests/textual/test_session_agent_selection.py:6 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

debt-src at ae737f4 blocks on 26 lines:

grew ClientTypeErrors:batrachian-toad/tests/app/test_recorded_transcript_reader.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/app/test_transcript_recipient.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/model/test_session_updates_after_binding_change.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/agents.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/coordination.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/core_adapters/mcp_turn_boundaries.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/core_adapters/typed_turn_events.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/support/peers/delayed_load.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_cursor_request_results.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_initial_session_title.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_input_failure_draft.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_sent_message_drawn_once.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
grew ClientTypeErrors:batrachian-toad/tests/textual/test_session_agent_selection.py +1: this change removes or changes an agent_comms name that client file uses; run mypy on it to see which
found ClientTypeErrors:batrachian-toad/tests/app/test_recorded_transcript_reader.py at batrachian-toad/tests/app/test_recorded_transcript_reader.py:11 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/app/test_transcript_recipient.py at batrachian-toad/tests/app/test_transcript_recipient.py:6 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/model/test_session_updates_after_binding_change.py at batrachian-toad/tests/model/test_session_updates_after_binding_change.py:3 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/support/agents.py at batrachian-toad/tests/support/agents.py:151 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/support/coordination.py at batrachian-toad/tests/support/coordination.py:8 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/support/core_adapters/mcp_turn_boundaries.py at batrachian-toad/tests/support/core_adapters/mcp_turn_boundaries.py:23 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/support/core_adapters/typed_turn_events.py at batrachian-toad/tests/support/core_adapters/typed_turn_events.py:42 (Cannot instantiate abstract class "Pipe" with abstract attribute "publish_metadata"  [abstract])
found ClientTypeErrors:batrachian-toad/tests/support/peers/delayed_load.py at batrachian-toad/tests/support/peers/delayed_load.py:26 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_cursor_request_results.py at batrachian-toad/tests/textual/test_cursor_request_results.py:13 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_initial_session_title.py at batrachian-toad/tests/textual/test_initial_session_title.py:8 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_input_failure_draft.py at batrachian-toad/tests/textual/test_input_failure_draft.py:11 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_sent_message_drawn_once.py at batrachian-toad/tests/textual/test_sent_message_drawn_once.py:10 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
found ClientTypeErrors:batrachian-toad/tests/textual/test_session_agent_selection.py at batrachian-toad/tests/textual/test_session_agent_selection.py:6 (Module "agent_comms.text_route_update" has no attribute "encode_updates"  [attr-defined])
Warn-only, never blocks (10)
src/agent_comms/text_route_update.py: LintFindings +1
src/agent_comms/agent_event_updates.py: Unformatted +1
src/agent_comms/execution/runtime_observations.py: Unformatted +1
src/agent_comms/text_route_update.py: Unformatted +1
src/agent_comms/transport/acp_update_sink.py: Unformatted +1
found LintFindings:src/agent_comms/text_route_update.py at src/agent_comms/text_route_update.py:1 (I001 [*] Import block is un-sorted or un-formatted)
found Unformatted:src/agent_comms/agent_event_updates.py at src/agent_comms/agent_event_updates.py:1 (Black would reformat this file)
found Unformatted:src/agent_comms/execution/runtime_observations.py at src/agent_comms/execution/runtime_observations.py:1 (Black would reformat this file)
found Unformatted:src/agent_comms/text_route_update.py at src/agent_comms/text_route_update.py:1 (Black would reformat this file)
found Unformatted:src/agent_comms/transport/acp_update_sink.py at src/agent_comms/transport/acp_update_sink.py:1 (Black would reformat this file)

P279 working checkpoint, not a completed cold-client fix.
NRA relocate_symbols_to_new_module: simulate then apply to the complete
nine-class observation/consumer family and the five spawned worker functions.
All original class/function bodies and bases compare unchanged by AST.
The cold-import probe still performs its selected import first.

Affected controls: 382 passed, 2 skipped, exit 0 (294.69s).
Worker family: 4 passed, exit 0 (103.25s) at a two-core test quota.
Two earlier bounded worker runs timed out before metadata writes; the
captured diagnostic run passed in 54.12s and exposed conftest -> goal fixture
-> ACP -> served tools -> installer imports in each spawned child.
Workers no longer import the test controller and its fixture stack.

Registry attachment still reaches backend/transcript implementations.
P279 remains open; no installed or overall CPU saving is claimed.
Delete repeated envelopes; keep fact encoding and no-controller validation below text routing. NRA plans applied with explicit owned source roots. Affected publication controls are running; original import-cycle failure retained.
The Nov 12 field-to-method change left eight callers testing bound-method truthiness. Migrate all eight through the declared method; retain the newly exposed corrupted-store observer failure as unresolved, not a passing run.
@trissim
trissim marked this pull request as ready for review November 18, 2026 22:27
@trissim
trissim merged commit e7dfecb into main Nov 18, 2026
9 of 12 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