You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(proof): enforce EvidenceRule.test_id/must_pass in proof runner (#729) (#802)
* fix(proof): enforce EvidenceRule.test_id/must_pass in proof runner (#729)
A requirement is no longer SATISFIED by any green pytest run — each
must_pass evidence rule is enforced by a pytest run scoped to its
test_id (-k), and a named test that was never written is a FAILED
obligation.
- EvidenceRule gains an owning gate field, stamped at capture,
persisted in the ledger; legacy rows derive it from the test_id
prefix convention
- gates.run/_run_pytest accept a test_selector; with a selector,
"no tests matched" (exit 5) is a failure, not an empty suite
- _run_gate enforces pytest-style rules on every runnable gate: SEC
runs ruff AND its test_sec_* rules (codex review finding)
- UNIT stub now defines test_unit_<slug> to match its rule, and stub
slugs share obligations.slugify with rules (was [:50] vs [:60])
- drop unused pytest import in tests/test_new_feature.py (pre-existing
ruff failure)
* review: guard empty gate checks, warn on unenforceable rules, pin gate=None no-op
Addresses claude-review findings on #802: explicit FAILED when gates.run
returns no checks, per-requirement warning for rules with no resolvable
gate, docstring note on per-rule subprocesses, and a test pinning that
gate=None rules fall back to whole-suite behavior.
* review: harden enforcement per CodeRabbit findings
- invalid persisted gate values fall back to test_id prefix derivation
instead of crashing requirement load
- SKIPPED/ERROR pytest checks fail enforcement (pytest unavailable is
not proof)
- must_pass rules without a pytest-style test_id fail loudly instead of
vanishing silently
0 commit comments