Source loops: coverage-until-threshold + bundle-size-budget (loops.elorm.xyz)
What the loops do
Turn a continuous numeric metric into a binary loop terminator: iterate (add focused tests / trim deps) until the metric crosses a threshold (coverage ≥ 80%, bundle ≤ budget), with explicit anti-gaming rules against the obvious cheat (trivial always-pass tests to inflate coverage).
Why valuable for MAP
MAP's gates are mostly pass/fail on exit codes. A generalized "iterate until numeric metric crosses threshold" gate is reusable for any continuous budget — coverage %, perf/latency, size — and pairs the quantitative exit with anti-metric-gaming guardrails. MAP has a bidirectional requirement-coverage gate (#249) but not a numeric-percentage convergence gate.
What MAP has today
- Bidirectional requirement coverage gate (set-diff of Requirements Index vs coverage_map) — structural, not numeric %.
- No "drive metric X to threshold T" loop primitive.
Proposed scope
- A small reusable gate helper: given a
measure command that emits a number and a threshold, loop the Actor until metric >= threshold (or <= for budgets), bounded by max-iter.
- Bake in anti-gaming: coverage gains must come from real assertions (reuse test-integrity guardrails), not trivial tests.
- Opt-in via config; default off (language-agnostic —
measure command supplied by project).
Notes
Lower priority than the correctness/safety slices; included as a clean reusable primitive. Likely a single config-driven gate rather than per-metric skills.
Part of #251
Source loops:
coverage-until-threshold+bundle-size-budget(loops.elorm.xyz)What the loops do
Turn a continuous numeric metric into a binary loop terminator: iterate (add focused tests / trim deps) until the metric crosses a threshold (coverage ≥ 80%, bundle ≤ budget), with explicit anti-gaming rules against the obvious cheat (trivial always-pass tests to inflate coverage).
Why valuable for MAP
MAP's gates are mostly pass/fail on exit codes. A generalized "iterate until numeric metric crosses threshold" gate is reusable for any continuous budget — coverage %, perf/latency, size — and pairs the quantitative exit with anti-metric-gaming guardrails. MAP has a bidirectional requirement-coverage gate (#249) but not a numeric-percentage convergence gate.
What MAP has today
Proposed scope
measurecommand that emits a number and athreshold, loop the Actor untilmetric >= threshold(or<=for budgets), bounded by max-iter.measurecommand supplied by project).Notes
Lower priority than the correctness/safety slices; included as a clean reusable primitive. Likely a single config-driven gate rather than per-metric skills.
Part of #251