Delegated-child finalization performance evidence

Environment: Linux x86_64, Node 26.13.1. Both commits run sequentially on the
same machine, as real T3 HTTP/WebSocket servers with their own fresh T3 homes.
No live database is copied. No tests or in-memory ProjectionStore harness run.

Base: d1f8636f4909f1cda2568391efa67ceec5567956
Head: ef270bdfe811dc1a77c3256951fcd6d49281bbdd
Base is git merge-base origin/main HEAD_SHA.

In each clean checkout, install dependencies with `vp i`, then run:
  python3 instrument.py CHECKOUT
  node driver.mjs CHECKOUT SIDE 1000
where SIDE is base or head. Run sequentially, never concurrently.
Set PROOF_OUTPUT_DIR to the directory that should contain timestamped results.
After both seed runs finish, use their printed output directories:
  python3 run-rounds.py BASE_CHECKOUT HEAD_CHECKOUT BASE_OUTPUT HEAD_OUTPUT OUTPUT
This runs base/head, head/base, base/head, sequentially. Each round restarts the
same commit's server on its own synthetic seed home, executes three warm-up
follow-ups and nine timed follow-ups, then stops that server. The databases are
never copied, and both sides reach the same child history length in each round.
The driver is resume.mjs, next to run-rounds.py. The manifest records directories.
Analyze with seed directories, then each base/head round pair, then report output:
  python3 analyze-rounds.py BASE_SEED HEAD_SEED BASE_R1 HEAD_R1 BASE_R2 HEAD_R2 BASE_R3 HEAD_R3 REPORT


The instrument script adds observation-only monotonic timers to the existing
finalizer and its control read. It also adds a minimal Replay transcript: one
assistant message, "Done.", and a normal end_turn. The parent's first replay
turn pauses for two seconds so the driver can request a real delegated child
while the parent run is active; later parent turns finish immediately.

The driver creates one synthetic git project through HTTP, a parent thread and
one delegated child through WebSocket RPC, then sends 1,009 sequential child
follow-ups. Every provider turn passes through the real ACP adapter, real
orchestrator, SQLite persistence, checkpoint effects and delegated completion.
The first 1,000 follow-ups build history; the final nine are measurement tasks.
It observes completion in this server's own database, opened read-only. It does
not insert, update or copy database rows. Each action records the time from send
to persisted completed task result. The JSON captures also contain the actual
server-side read and finalizer probes for every history size.

Each finalizer read returns the records its commit actually uses. Base reads
runs, user messages, subagents, provider threads, provider turns and attempts.
Head reads bounded controls through readDelegatedChildControls, including its
fallback if used. The reported row count counts returned records in those
collections, not SQLite VM instructions or rows examined internally. The head
control read includes delegatedTaskProgress; base's initial read timer stops
before that pure computation. This makes the read comparison conservative.

The full finalizer timer spans the existing generator body, including its
normal task settlement and provider-session release. Both timers execute in
the real server, under the existing parent dispatch lock. Logging occurs after
the measured read; no decision or return value is replaced by instrumentation.

analyze-rounds.py reports all 27 timed tasks in three independent rounds and
all captured finalizer calls at their child run ordinals. It independently
counts persisted child records and completed task results. The final task in
each round can have fewer trailing probes because the driver stops the server
after its result becomes available; actual sample counts are reported.
The seed's full raw timings are also retained, including the first nine-task
measurement window. The final verdict uses the preplanned alternating rounds.
For each metric, it compares the difference in pooled sample medians with the
larger of the two within-commit ranges of round medians. No round is discarded.

Privacy: uploaded measurement JSON omits thread identifiers, file paths,
credentials and startup logs. It contains only synthetic result summaries,
commit IDs, platform/runtime versions and measured values.

Observed seed detail: both sides had exactly 1,010 child runs, attempts and
provider turns, and 2,020 messages. Head had 1,009 completed parent tasks versus
1,010 on base: the seed waits for the initial child run to finish before sending
its first follow-up, so that startup follow-up can coalesce into the initial
task before settlement. The primary timed rounds occur after this startup,
with matching child history lengths; the analyzer checks that every timed
follow-up creates exactly one new task and completes with Done. The one-record
historical parent-task difference is disclosed, not removed or synthesized.
