Skip to content

I0828 — doctor under a declared budget, and the hook inherits it

Report doctor's own wall time against benchmark.budget.doctor_ms as a finding, advisory, and record the measured value on this repository as the budget's rationale in docs/PERFORMANCE.md.

BLOCKED wave 3 · p0 · implementation profile · runs alone

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

Blocked. This issue cannot start until I0820 is done. The status is derived from that, not declared.

Objective

Report doctor's own wall time against benchmark.budget.doctor_ms as a finding, advisory, and record the measured value on this repository as the budget's rationale in docs/PERFORMANCE.md.

Why

The pre-commit hook is the one place a slow doctor is paid on every commit.

Current state

10 s on this repository before this milestone.

Desired state

Under 1.5 s on this repository, with the budget declared and the hook unchanged.

Scope

  • lib/doctor.sh
  • docs/PERFORMANCE.md
  • .ai/repo/policy.yaml
  • test/cases/83_doctor_budget.sh

Out of scope

  • A blocking budget

Dependencies

What waits on this

Acceptance criteria

  • doctor prints its total and the budget; over budget is WARN, never the exit code
  • Case 83 proves the finding appears with a tiny budget

Validation

  • MJ_TIMING=1 bin/majordomus doctor
  • bash test/run.sh 83_doctor_budget

Evidence required

  • doctor_under_budget

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Risk

WARN never changes the exit code, by doctrine.

Timeline

started
verified
completed

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/I0828.yaml. Read it back with majordomus plan show I0828.