Skip to content

I0825 — An explicit committed baseline

Add bench --write-baseline, which refuses a dirty tree unless forced, prints old, new and delta per target, and writes .ai/repo/benchmarks/baseline.json with schema majordomus/benchmark-baseline/v1.

DONE wave 3 · p0 · implementation profile · runs alone

Part of M004 — Performance is executable evidence, and the hot path does no canonical work twice.

Objective

Add bench --write-baseline, which refuses a dirty tree unless forced, prints old, new and delta per target, and writes .ai/repo/benchmarks/baseline.json with schema majordomus/benchmark-baseline/v1.

Why

A baseline that updates itself is not a baseline.

Current state

No baseline exists.

Desired state

A reviewable file under .ai/repo/, updated only by the command, carrying the commit, the profile and the summary statistics per target and mode.

Scope

  • lib/bench.sh
  • .ai/repo/benchmarks/baseline.json
  • share/skeleton/ai/repo/benchmarks
  • docs/SCHEMAS.md
  • test/cases/81_bench_baseline.sh

Out of scope

  • Raw samples in the baseline

Dependencies

What waits on this

Acceptance criteria

  • Writing on a dirty tree is refused without --force
  • The written file round-trips through bench --check with zero regressions

Validation

  • bash test/run.sh 81_bench_baseline

Evidence required

  • baseline_explicit

Evidence

coverstypecommandresultat commit
baseline_explicittestbash test/run.sh 81_bench_baselinecase 81 asserts --write-baseline is refused with exit 15 on a dirty tree and writes nothing, that --force writes and records dirty:true, that on a clean tree the baseline carries schema majordomus/benchmark-baseline/v1, dirty:false and the HEAD commit, that it is the one untracked change git status shows, that the written file round-trips through --check with every target within thresholds, and that a second write prints the move per target and mode and leaves a reviewable diff; the tree state is read once at the start of the run so the baseline temporary file cannot make the run look dirtynext

Risk

Two machines give two baselines; the file records the platform and the check reports not comparable across a different profile or schema.

Timeline

started
2026-09-05T03:47:33Z
verified
2026-09-05T03:47:33Z
completed
2026-09-05T03:47:33Z

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I0825.yaml. Read it back with majordomus plan show I0825.