Skip to content

Gate the SQL store's performance targets at ten times each - #313

Merged
dinoderek merged 1 commit into
mainfrom
task/engine-380
Nov 23, 2026
Merged

dinoderek merged 1 commit into
mainfrom
task/engine-380

Conversation

@dinoderek

@dinoderek dinoderek commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Objective

A test fails when the SQL store exceeds 10× any performance target on the benchmark fixture (500 items, 1,000 attempts, 20,000 updates, 2,000 receipts): get, an updates page and session-view at 1 ms; inbox, overview and plan-detail at 5 ms; a write at 5 ms; opening a database at 200 ms, also with 10× the update history.

Gates

Lane Result Evidence
./dev test (every required lane) PASS all ten lanes PASS locally with umask 022 (.test-ai-results/summary.md)
  • New or changed tests:
    • internal/control/bench_test.go: the gate on the full-size fixture; opening with 10× history; the gate fails an operation over 10× and names it; a wrong answer is reported without timing; the fastest run is kept.
    • internal/control/tx_order_test.go: SessionAttempts leaves out the ended attempts of finished work; TaskStatesOfPlan returns states only.
  • Not run, with reason: none. Other packages' mode tests fail under this host's default umask 0077; they pass under 022 and are unrelated to this diff.

Measured on a 16-thread machine (go test -bench BenchmarkStore): get 0.06 ms, updates 0.14 ms, session-view 1.6 ms, inbox 0.8 ms, overview 9.9 ms, plan-detail 2.2 ms, write 0.3 ms. The gate passes with 5× or more headroom, but session-view and overview sit above their 1× targets (see Rulings).

Rulings

Ruling (risk: low): the time bound is skipped under -race (about 20× slower); there the fixture is a tenth the size and only answers are checked. The coverage lane (no race detector) enforces the time bound; no lane changes.
Ruling (risk: low): each operation is timed by its fastest of 11 runs after a warm-up, so load pauses cannot flake it.
Ruling (risk: low): the fixture has 4 live sessions, open and answered operator questions, and plans of 20 tasks, because an idle fixture made session-view and overview look free.
Ruling (risk: low): session-view and overview list only unended current attempts plus an unfinished task's ended one (new Tx.SessionAttempts, replacing CurrentAttempts), and a plan's status reads its tasks' states without decoding their cards (Tx.TaskStatesOfPlan). Responses are unchanged. Without the first, session-view read about 500 ended attempts and failed the gate.
Ruling (risk: low): the code's schema is version 7; the card calls it v6.

Review

  • Fresh reviewer: Claude Code, claude-opus-5-5; round 1: APPROVED. Its optional findings (CI flake margin, opening compared with the 1× open, a lane mention in quality-gates) are not acted on: the margin is the approved 10× design, and no lane changed.
  • Declined findings: none
  • Review hard: internal/control/bench_test.go (gate and fixture); internal/control/tx.go (SessionAttempts, TaskStatesOfPlan).

Deviations

The card says the gate runs in the unit lane; its time bound runs in the coverage lane, because the unit lane runs under -race. overview (about 2× its 5 ms target) and session-view (about 1.6×) are inside the 10× gate but over their 1× targets; most of overview is the per-plan question lookup.

🤖 Generated with Claude Code

…over ten times its target

The benchmark fixture now has live sessions, open questions and plans of
twenty tasks. Session lists no longer read the ended attempts of finished
work, and a plan's status reads its tasks' states without decoding each card.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012F3VVCcSbictsP6gsNN9g5
@dinoderek
dinoderek merged commit 87d936f into main Nov 23, 2026
1 check 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