Skip to content

perf(auto): per-round wall-clock regression ~3x in PR-A/B/β/γ merge train (RFC #1256 §I5) #1258

Description

@shaun0927

Summary

ooo auto interview rounds on main HEAD 2f6247c6 (post PR-A/B/β/γ merge train) execute at ~3× the wall-clock cost of the pre-merge baseline. R3 cli-todo completed only 4 rounds in 600 s where R2 (baseline 73ad865a) completed 12 rounds in the same budget.

This issue tracks the implementation of RFC #1256 §I5 (performance budget) and the bisect work needed to identify which of the four merged PRs introduced the regression.

Evidence

Run HEAD Rounds in 600 s Round-cost (s/round)
R2 73ad865a (pre-merge) 12 ~50
R3 2f6247c6 (post-merge: PR-A/B/β/γ all in) 4 ~150

R3 raw timeline (from ~/.ooo-observability/R3-20260527-131856/R3-cli-todo.log):
R1@15.6s, R2@22.4s, R3@30.3s, R4@57.4s — the cost-per-round increases sharply once ambiguity scoring (LLM call) enters the loop.

Why this matters

RFC #1256 §I5 sets a regression budget of 1.5× for any substrate change in src/ouroboros/auto/. The PR-A/B/β/γ merge train is ~3× — twice the budget. Without a baseline policy this kind of silent slowdown will keep accumulating, eventually consuming whatever phase budget NEW-A raises, and making the vision (any task → product) impossible to deliver within reasonable wall-clock.

This is not just a performance ticket: a slow ooo auto is a ooo auto that BLOCKED on wall-clock more often, which compounds with NEW-A. Fixing NEW-A without fixing NEW-B postpones the same failure mode at a higher budget.

Hypothesis space (to be confirmed by bisect)

Likely candidates:

Bisect plan:

  1. Capture R-run timing at each of: 73ad865a (R2 baseline), c3e82125 (post PR-A), 0303a429 (post PR-B), 23d06b0e (post PR-β), 2f6247c6 (post PR-γ).
  2. Identify the commit that introduces ≥ 1.5× per-round regression.
  3. Inspect the diff for new synchronous LLM / I/O calls in the round loop.

Proposed fix scope (after bisect identifies the offender)

Three patterns to look for in the offending PR's diff:

  1. Synchronous LLM call in the round loop where async or cached would suffice.
  2. Heavy import triggered on first use inside the loop (one-time cost amortized over rounds; only relevant if rounds increase).
  3. Per-round serialization of state (e.g. EventStore writes) that should be batched or async.

Acceptance criteria

  • Bisect identifies the responsible commit, recorded in this issue's evidence.
  • A targeted PR brings per-round cost back to ≤ 1.5× R2 baseline (≤ 75 s/round).
  • PR template includes a mandatory "R-run comparison" section for any src/ouroboros/auto/ change (RFC RFC: reconcile ooo auto terminal-liveness policy with the narrowed invariant #1256 §I5 enforcement).
  • CI lint blocks PRs to src/ouroboros/auto/ without the R-run section attached.

Anti-scope

Cross refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OSCore engine, state machine, internal pipeline, and system-level behaviorbugReproducible defect or broken behaviorneeds-approvalTouches protected boundaries (SOUL.md, AGENTS.md, CI, security)needs-designMulti-PR epic or architectural change, needs human planning

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions