feat(lib): floor-guard, diff-scoped detector of a weakened quality bar
SUPPRESS / SKIP / DELETED_TEST / ASSERT_DROP / STUB / THRESHOLD_DOWN over git diff <base> (untracked files included), floor-guard: allow <reason> waiver printed as WAIVED, rc 0/2/3. Mandatory verifier STEP 3, documented under GATE 1 of verify-secure-loop.md. Suite: 6 kinds + WAIVED + CLEAN, flip-tested. Adapted from agent-skills constraint-driven-development.
This commit is contained in:
@@ -55,6 +55,16 @@ Dispatch a FRESH verifier subagent (`subagent_type: verifier`, or load
|
||||
`TEST` command. Never pass the dev's summary, never pass a prior iteration's
|
||||
gaps — the verifier reads the contract from disk and judges blind.
|
||||
|
||||
The verifier's STEP 3 (`agents/verifier.md`) runs `lib/floor-guard.sh`
|
||||
against the diff before it renders any verdict — a deterministic,
|
||||
diff-scoped check for a quietly weakened quality bar (a suppressed
|
||||
lint/type check, a skipped or deleted test, a dropped assertion, a lowered
|
||||
coverage threshold) that an LLM verdict alone can miss or be talked past
|
||||
one line at a time. Its findings fold straight into that same verifier's
|
||||
`ECARTS` count unless the contract's `CLARIFICATIONS` explicitly authorizes
|
||||
the exact weakening; there is no separate gate and no extra dispatch, it
|
||||
rides this GATE 1 call.
|
||||
|
||||
Parse its single `VERIFY — VERDICT:` line:
|
||||
|
||||
- `CONFORME` → go to GATE 2. (First-pass conforme = no loop.)
|
||||
@@ -74,9 +84,9 @@ Parse its single `VERIFY — VERDICT:` line:
|
||||
micro-gate that appends `[gated <date>]` to the contract's FILE SCOPE;
|
||||
otherwise the dev removes the file.
|
||||
- Structural failure (`ERROR(…)`, missing/duplicated VERDICT line,
|
||||
unparsable, crash, `CONFORME` without `PROOF`) → retry ONCE with a fresh
|
||||
verifier; a 2nd structural failure → human escalation. A mute verifier is
|
||||
NEVER a PASS.
|
||||
unparsable, crash, `CONFORME` without `PROOF` or without `FLOOR`) → retry
|
||||
ONCE with a fresh verifier; a 2nd structural failure → human escalation.
|
||||
A mute verifier is NEVER a PASS.
|
||||
|
||||
## GATE 2 — SECURITY (fresh security-auditor)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user