fix(verify-slice): codify review handshake, boundary matrix, and evidence reconciliation

- Bypass static diff audit only when a matching Ready code-review report covers unchanged state
- Codify four-state disposition contract with split BLOCKED (env/fixture) and BLOCKED (out-of-bounds)
- Permit live-infra execution when explicitly authorized by human owner, preserving command when blocked
- Separate static review from runtime evidence reconciliation under Commit & Evidence Hygiene
This commit is contained in:
kiskaadee committed 2026-10-31 08:16:02 -05:00
1 parent 09911e8d9e
commit 2a3cf40d27
2 files changed
+26 -18

No files matched your search

+10 -10
View File
@@ -16,20 +16,20 @@ description: >-
- Not for investigating an unknown failure from raw symptoms: use `diagnose`.
## Steps
1. **Size checks to risk.** Inspect touched files, boundaries, and failure consequences, then apply the matching minimum check set in [perspectives](references/perspectives.md) (`Lightweight`, `Standard`, or `High-Assurance`) plus only the perspectives warranted by the diff. Proceed directly on routine checks within authorized scope; pause for confirmation only when verification would materially expand scope, incur substantial setup or subagent cost, or introduce a trade-off.
2. **Write falsifiable assertions.** Convert acceptance criteria and selected perspectives into concrete checks with explicit failure conditions (`FAIL if ...`) and required evidence. Never use open-ended observational prompts ("record what happens").
3. **Verify runtime behavior.** Run required behavioral, state, and persistence checks against the live system when the tier requires it, confirming mutations via both UI state and authoritative backend reads. Execute directly by default; use a clean subagent (withholding the diff, PR narrative, and author self-audit) only when independent execution is likely to expose blind spots in stateful workflows or `High-Assurance` changes.
4. **Inspect the diff.** Audit the actual code diff and commit history against the selected code-level perspectives (untrusted data and URL sinks, authoritative state reconciliation, scope containment, and test coverage claims).
5. **Record dispositions honestly.** Score every check as `PASS`, `FAIL`, `BLOCKED`, or `INCONCLUSIVE` with evidence (see [perspectives](references/perspectives.md)). Never rationalize an unexpected result as a design trade-off, treat a missing check as passing, or convert an aggregate score into release approval.
6. **Present the evidence packet.** Group confirmed findings by source (runtime vs. diff), note discrepancies against the implementer's self-audit, surface blocked or unverified areas, and recommend a disposition without waiving failed criteria.
1. **Size checks to risk and evaluate review handshake.** Inspect touched files, boundaries, and failure consequences, then apply the matching minimum check set in [perspectives](references/perspectives.md) (`Lightweight`, `Standard`, or `High-Assurance`) plus only the perspectives warranted by the diff. Reuse a preceding `code-review` report for static provenance only when its status is `Ready` (completed across all four axes, no unresolved blocking findings remain, and covered scope is identified), the reviewed base and head revisions match, and the current relevant working-tree diff is unchanged from the reviewed diff. Proceed directly on routine checks within authorized scope; pause for confirmation only when verification would materially expand scope, require `live-infra` authorization, incur substantial setup or subagent cost, or introduce a trade-off.
2. **Write falsifiable assertions.** Convert acceptance criteria, `code-review` Step 6 fenced checks (when present), and selected perspectives into concrete checks with explicit failure conditions (`FAIL if ...`), scope classification (`local` vs. `live-infra`), and required evidence. Never use open-ended observational prompts ("record what happens").
3. **Verify runtime behavior.** Execute `local` behavioral, state, and persistence checks against the live system when the tier requires it, confirming mutations via both UI state and authoritative backend reads. Execute `live-infra` checks only when the human owner has explicitly authorized the target environment and operation; otherwise record `BLOCKED (out-of-bounds)` with the preserved command and criteria. Execute directly by default; use a clean subagent (withholding the diff, PR narrative, and author self-audit) only when independent execution is likely to expose blind spots in stateful workflows or `High-Assurance` changes.
4. **Inspect the diff (unless handshake invariant holds).** When Step 1 verified a reusable `Ready` review on the exact unchanged diff, bypass static diff re-inspection and cite that review as static provenance (runtime verification provides behavioral evidence and never substitutes for static review). Otherwise (standalone run, non-`Ready` review, revision mismatch, or changed working-tree diff), audit the changed delta or full diff against the selected code-level perspectives (untrusted data and URL sinks, authoritative state reconciliation, scope containment, and test coverage claims).
5. **Record dispositions honestly.** Score every check as `PASS`, `FAIL`, `BLOCKED` (`env/fixture` vs. `out-of-bounds`), or `INCONCLUSIVE` with evidence (see [perspectives](references/perspectives.md)). Never rationalize an unexpected result as a design trade-off, treat a missing or `BLOCKED` check as passing, or treat either static provenance or runtime evidence as release approval.
6. **Present the evidence packet.** Distinguish static provenance (`diff` audit vs. `code-review` handshake) from runtime evidence, note discrepancies against the implementer's self-audit, separate `BLOCKED (env/fixture)` repairs from `BLOCKED (out-of-bounds)` operator checks, and recommend a disposition without waiving failed criteria.
## Your call
- **Expanded verification scope**: approve before spinning up costly test environments, isolated subagents, or checks outside previously authorized boundaries.
- **Handling non-passing checks**: decide whether a `FAIL`, `BLOCKED`, or `INCONCLUSIVE` check triggers a repair loop, an environment fix, a tracked follow-up issue, or an explicit waiver.
- **Release decision**: decide whether to accept residual risks and merge; verification evidence never authorizes release on its own.
- **Expanded verification scope and `live-infra` authorization**: approve before running `live-infra` operations against privileged or external environments, spinning up costly test setups, or launching isolated subagents outside previously authorized boundaries.
- **Handling non-passing checks**: decide whether a `FAIL`, `BLOCKED`, or `INCONCLUSIVE` check triggers a repair loop, an environment fix, an authorized operator window, a tracked follow-up issue, or an explicit waiver.
- **Release decision**: decide whether to accept residual risks and merge; neither static review nor runtime verification authorizes release on its own.
## Done when
- Every required check has an evidence-backed state (`PASS`, `FAIL`, `BLOCKED`, or `INCONCLUSIVE`) and the human owner has reviewed the evidence packet to decide release or rework.
- Every required check has an evidence-backed disposition (`PASS`, `FAIL`, `BLOCKED (env/fixture)`, `BLOCKED (out-of-bounds)`, or `INCONCLUSIVE`), static provenance and runtime evidence are clearly distinguished, and the human owner has reviewed the packet to decide release or rework.
## Hands off to
- `diagnose`: when a failed or blocked check needs root-cause investigation.
+16 -8
View File
@@ -4,7 +4,7 @@ Reference for `verify-slice`. Keep effort proportional to failure consequences a
## 1. Operational Rigor Tiers
Each tier defines the minimum required checks. Escalate individual perspectives when a small diff touches a high-risk boundary (for example, a two-line auth or URL sanitizer change).
Each tier defines the minimum required checks. Escalate individual perspectives when a small diff touches a high-risk boundary (for example, a two-line auth or URL sanitizer change). When a reusable `Ready` `code-review` handshake covers the exact unchanged base, head, and working-tree diff (see `SKILL.md` Steps 1 and 4), that review satisfies the tier's static diff audit as static provenance while `verify-slice` supplies runtime behavioral evidence; if any relevant file changed post-review, audit at least the changed delta.
| Tier | Typical Slice | Minimum Required Checks | Execution Mode |
| :--- | :--- | :--- | :--- |
@@ -23,16 +23,24 @@ Select only the perspectives relevant to the slice's risk profile. Give each sel
| **Security Boundaries** | Can untrusted data execute code, break attributes, or route to unsafe destinations? | Trace every dynamic value into DOM/template sinks: verify safe DOM APIs or HTML escaping for text and quoted attributes, context-appropriate URL validation for `href`/`src`/`action` (never relying on HTML escaping alone for URLs), and at least one adversarial payload check. |
| **Ergonomics & Accessibility** | Is the slice usable on narrow screens, with touch, and via keyboard/assistive tech? | Check narrow mobile viewport (`375px`) for overflow, `>= 44x44px` touch targets, sequential keyboard `Tab` focus, visible `:focus-visible` outlines, and `aria-live` announcements for dynamic feedback. |
| **Scope & Regression** | Did the slice disturb adjacent features or smuggle unrelated refactors? | Inspect shared files (`main`, routers, shared types/styles) for minimal additive footprint; run targeted smoke checks on neighboring views/endpoints. |
| **Commit & Evidence Hygiene** | Are commits localizable and does claimed test coverage match reality? | Check that commits separate coherent boundaries where practical and compare author self-audit claims against what unit/integration tests actually assert. |
| **Commit & Evidence Hygiene** | Are commits localizable and does claimed test coverage match reality? | Separates two distinct responsibilities: (1) **Static review** (commit structure, diff scope, source and test inspection) is covered by a matching `Ready` review handshake. (2) **Runtime evidence reconciliation** verifies that reported outcomes are supported by executed checks and relevant test assertions substantiate claimed contracts. |
## 3. Four-State Disposition Contract
## 3. Four-State Disposition Contract and Boundary Matrix
Every required assertion ends in exactly one state:
Every required assertion ends in exactly one disposition. `BLOCKED` records an honest execution boundary, never permission to assume correctness or count an unexecuted check as `PASS`:
- `PASS`: Assertion satisfied with observable proof (command output, HTTP response, DOM measurement, or screenshot).
- `FAIL`: Assertion violated with reproducible steps and observed vs. expected output.
- `BLOCKED`: Check could not run due to an environmental, fixture, or dependency problem (distinct from a product bug; diagnose the blocker before judging the implementation).
- `INCONCLUSIVE`: Check ran, but collected evidence is insufficient to prove or falsify the assertion.
| Situation | Disposition | Required Action |
| :--- | :--- | :--- |
| Check executes (`local`, or `live-infra` explicitly authorized by the human owner) and satisfies expected condition | `PASS` | Attach observable proof (command output, HTTP status, DOM measurement, or screenshot). |
| Check executes and contradicts expected behavior | `FAIL` | Record reproducible steps and observed vs. expected output. |
| Local fixture, seed, or tool setup prevents execution | `BLOCKED (env/fixture)` | Diagnose and repair the local blocker before judging the implementation (distinct from a product bug). |
| `live-infra` check requires permissions or infrastructure (host rebuilds, production migrations, privileged network changes) unavailable or not explicitly authorized for this run | `BLOCKED (out-of-bounds)` | Do not fabricate execution or mark `PASS`; preserve the exact command and pass/fail criteria for an authorized operator run or maintenance window. |
| Check executes, but available evidence cannot prove or falsify the assertion | `INCONCLUSIVE` | State what signal is missing and how to make the check deterministically falsifiable. |
### Authority Separation Invariant
- `code-review` establishes **static provenance** for a specific revision range and working-tree diff.
- `verify-slice` establishes **runtime behavioral evidence** for selected assertions.
- Neither substitutes for the other, and neither grants release approval; only the human owner authorizes release.
### Anti-Rationalization Rules
1. **Expected values before observation**: State the exact pass/fail condition before running the check. If an assertion expects `2` and the system shows `1`, record `FAIL`, never `PASS` with a narrative excuse ("targeted reconciliation trade-off").