Skip to content

test(runtime): characterize autonomous-run bounds with an AC0 soak (AC0.1) - #236

Merged
lg2m merged 2 commits into
feat/eng-989-ap1-subagent-brieffrom
test/eng-986-ac0-soak
Oct 2, 2026
Merged

lg2m merged 2 commits into
feat/eng-989-ap1-subagent-brieffrom
test/eng-986-ac0-soak

Conversation

@lg2m

@lg2m lg2m commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Slice AC0.1 of autonomous-core.md · Linear ENG-986 · Base: #235 (AP1), on #233 and #232.

What this adds

AC0.1 is a deterministic soak and characterization harness for long autonomous runs. It changes no production code. The fixtures assert how QQ stops today. QQ_SOAK_EXPECT_COMPLETED=1 turns them into the completion oracles that later slices flip.

  • crates/qq-core/tests/support/soak.rs. A scripted provider driven through the public durable SessionRuntime. It scripts:

    • tool calls (with result sizes),
    • in-run compactions,
    • outages,
    • truncations,
    • empty checkpoints,
    • repeated-argument loops.

    It reports reached work, executed and settled tool calls, duplicate sequences, committed compactions, RSS samples, DB/WAL high-water samples and work-turn gaps.

  • crates/qq-core/tests/soak.rs. 7 default tests and 6 --ignored fixtures. The ignored ones cover:

    • 500 / 2 000-turn context reservation;
    • the shared 32-compaction budget;
    • a single-shot summarizer outage;
    • the one-turn 16 MiB hard text guard;
    • process kill and reopen, twice. A child process executes a tool, syncs its side effect, and is killed. After reopen, the call is settled with the exact interrupted sentinel and is never executed again.
  • crates/qq-core/benches/turn_overhead.rs. Per-turn harness overhead near turns 10, 100 and 1 000. This is a standalone diagnostic, not an H0 budget.

  • Docs.

    • docs/runbooks/perf-recording.md § Autonomous-core characterization: how to run the fixtures, what each receipt contains, and what is a proxy. Fsyncs need an external tracer.
    • The benchmarks/perf/README.md inventory row.
    • Ledger entries and a root request row.

Baseline (on this stack)

Run Result
cargo test -p qq-core --test soak 7 passed, 6 ignored
… -- --ignored (both kill/reopen cycles included) 5 passed in 22 s
QQ_SOAK_EXPECT_COMPLETED=1 4 completion oracles fail, as intended: the 500-turn context reservation, 40 in-run compactions, the empty slice checkpoint, and separated empty truncations. These are AC2's, AC3's and AP3a's failing tests
turn_overhead (3 iterations, 2 runs) medians 15.2–15.4 ms/turn at turns 10, 100 and 1 000. Flat; includes durable settlement

Review

177f4ea was reviewed independently (read-only). It got request changes on three findings, all fixed in 196608d:

  1. Blocking: the post-kill reap was unbounded. A WorkerGuard now kills and reaps the worker within a 5 s deadline on every path, including an early exit or a panic. The regression worker_guard_reaps_an_already_exited_worker covers it.
  2. The recovery oracle accepted any "interrupted" substring. It now asserts the exact execution-ambiguous sentinel, state = interrupted and is_error.
  3. The runbook overstated receipt contents. It now describes the shape of each receipt.

Verification

  • cargo test --workspace: 2019 passed. One unrelated timing flake, child_mutation_drains_before_steering_or_a_replacement_run_can_write, passed 6 of 6 on rerun.
  • cargo clippy --workspace --all-targets --all-features -D warnings and cargo fmt --check are clean.

Not in this PR (AC0.2)

H0 metric registration, full concurrent-stream WAL/fsync qualification, and the cross-window 16 MiB case, which stays masked by the 4 MiB reservation until AC2. No budget is added for a metric that has no emitter.

lg2m added 2 commits October 1, 2026 15:00
AC0.1 (ENG-986): context and separated-empty-truncation completion oracles fail on unchanged production code. Default characterization fixtures remain green. Add deterministic outages, two process kills, resource receipts and turn-overhead baseline. AC0.2 retains H0 registration and concurrency/fsync qualification.
…upted result

Review follow-up for AC0.1:
- the process-kill fixture kills and reaps its worker through a guard with a
  bounded deadline on every path, including an early exit or a panic. The
  regression worker_guard_reaps_an_already_exited_worker covers this;
- recovery asserts the execution-ambiguous sentinel, the interrupted state
  and is_error, not a substring;
- the perf runbook describes each fixture's receipt shape.

Linear: ENG-986
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@lg2m
lg2m added this pull request to stack #234 October 1, 2026 23:56
@lg2m
lg2m merged commit d1e51c2 into main Oct 2, 2026
4 checks passed
@lg2m
lg2m deleted the test/eng-986-ac0-soak branch October 2, 2026 05:26
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