Remove repeated command reads and repair admission sweep coverage

Merged
VA
2d ago
+24-23

Main's poll-sweep fixture now compiles after #760, but three tests reject stale exact boundary manifests. Trace the added operations, remove repeated authenticated reads, and record only the remaining required work.

Attribution

#718/#734 add zero controlled operations in this fixture: Fixture::open stages and installs Some(context_manifest) before schedule.start(), so per-turn context discovery/staging is bypassed. Hooks are empty, so hook capture is bypassed. checkout_context is false and workspace is None, so checkout instruction capture is bypassed. The compatibility field/helper changes are already on main via #760 and have no diff here.

The increases come from #617's file-backed command control, selected-model settings and lifecycle projections. A temporary counter around the real functions measured every ready stream read during the controlled baseline; probes were removed before this push.

Required operationText (2 commands, 1 turn)Effect/GOAL (4 commands, 2 turns)
Authenticated command lineage and followed pause-control observation (CommandOwner::execute)2 × 29 = 58 reads4 × 29 = 116 reads
Fresh config/task model-settings snapshots (stock_commands)2 × 2 = 4 reads4 × 2 = 8 reads
Lifecycle/status and attention projection (refresh_command_task)56 reads112 reads
Total required ready-read increase118236

Each completed turn publishes two ordinary task-volume files: its lifecycle/status and the attention list. Their commits add two owned-task submissions/completions and four blocking submissions/completions per turn. Therefore text adds task +2 / blocking +4, and effect/GOAL adds task +4 / blocking +8. Model, tool and native counts do not change.

Removed repeats

The original main baselines measured 330/660 additional reads: command control 58/116, model binding 160/320, and lifecycle refresh 112/224. Remove 78 reads per command by using the lineage already authenticated by its existing TaskContext, instead of loading the admission, reconstructing a context, and loading lineage again. Reconciliation obtains lineage directly from its existing context too. Keep fresh model-settings snapshots for each command.

advance already refreshes lifecycle/attention, so remove the second refresh in the same successful resume_turn path (56 reads per turn). Keep refresh for already-terminal recovery, which repairs interrupted projection publication. Savings are 212 text / 424 effect reads. The exact manifests reject restoration of those repeats as well as missing boundaries.

Final ready-read totals: 2,665 text (formerly 2,547), 6,951 effect/GOAL (formerly 6,715). All 998 cuts remain: 280 text and 718 effect/GOAL.

Decisions

Merge main into the already-pushed branch without rewriting signed history. The fixture and bind repairs disappear from the diff. Two small code deletions accompany the two JSON manifests because profiling found redundant reads that must not be legitimized by raising expectations. No limits, authority checks, assertions or cancellation cases are weakened.

Validation

  • bb1 through bs.ps1: built the focused poll_sweep library target; after changing runtime-loaded JSON, reused that binary. 10 passed in 4.89 s, all 998 cuts, missing-hook/missing-cut and broken-recovery controls included.
  • Windows through lb.ps1: Harness --lib --tests check with filesystem-local,native-execution,test-support,tui passed in 2m29s.
  • Temporary read profiling: /home/var/log/buildbox/2026-10-16T201252216Z-717174.log. Final build: /home/var/log/buildbox/2026-10-16T202139303Z-724253.log; direct final run: /home/var/log/buildbox/2026-10-16T202537588Z-728782.log.
  • LF, formatting, changed callers and git diff --check pass.

Signed head: 37f2ee9bc8ffc31e3272e21f3f73d5fbdff8352d.