Expand description
The self-improvement loop: A/B → attribute → CAR fix → A/B, until CAR’s coder clears the quality bar or no harness lever remains.
This is the loop the /goal “make a loop of a/b testing, car fixes, and more
a/b testing until car quality is high enough” asks for, expressed as a
deterministic driver with injected seams so it is unit-testable and its
termination is provable:
- Run the paired A/B suite (
run_ab_suite) — CAR’s native coder (pinned on a pinned backbone) vs. the control arm, on the same contracts. attribute_roundthe native losses into harness-addressable interventions vs. backbone-bound (no-lever) losses.- Decide against the
LoopConfigquality bar:- met → stop
LoopStop::QualityMet; - no lever (remaining losses are all backbone-bound) → stop
LoopStop::NoLeverLeft(the honest “a better model, not a harness change, is what’s left” outcome — the ALE finding, enforced); - otherwise hand the interventions to the injected
AbFixer(live: the Evolution Agent’sevolution.runharness diagnose→gate→apply, HITL-gated on the approval ledger). If nothing lands → stopLoopStop::FixStalled.
- met → stop
- Re-run the A/B — the applied change’s own regression gate: a fix only “counts” if the next round’s numbers move, and McNemar says whether the move is real or noise.
The fixer and the arm runner are injected (the car-builder / car-verify::cwm
philosophy), so this core carries no live-inference or daemon dependency and
its convergence is exercised with scripted doubles. The live wiring (real
runner + real evolution.run fixer + the car coder-ab-loop CLI) sits on
top of this exactly as the live A/B runner sits on run_ab_suite.
Structs§
- FixResult
- The result of applying a fix round.
- Improvement
Run - The full loop trace.
- Loop
Config - Tuning for the improvement loop.
- Round
Record - One round of the loop, recorded for the report and the operator trail.
Enums§
- Loop
Stop - Why the loop stopped.
Traits§
- AbFixer
- The injected fix seam. The live impl drives the Evolution Agent
(
evolution.run’s harness diagnose→gate→apply) over the interventions, HITL-gated on the shared approval ledger.
Functions§
- run_
improvement_ loop - Run the self-improvement loop to a terminal
LoopStop. Always terminates (bounded bymax_rounds; each non-terminal round applies a fix or stops).