fix: security gate no-verdict is deterministic on gate-describing diffs -- capture the response, harden the retry #491

Closed
opened 2026-08-09 15:09:39 +00:00 by igor · 0 comments
Collaborator

The security gate failed to produce a parseable verdict THREE consecutive times on igor#480 (2026-08-09 ~01:05, 04:19, 05:53) -- "no verdict from the reviewer after 2 attempts" -- while every other model surface was healthy all night (.health clean throughout). The failure is deterministic and content-shaped, not transient: #480's diff rewrites lib/automerge.sh's header COMMENT describing merge-gate security semantics, and the security reviewer plausibly responds to gate-describing prose with something other than the required verdict format.

Deliverables

  1. Diagnose from evidence, not the theory above. The gate's raw model responses are the ground truth: capture/inspect what the reviewer actually returned on a re-run of the #480 diff (preserve the stream/envelope on no-verdict, the way crashlog preserves worktrees -- if that capture doesn't exist, adding it IS part of this ticket; a no-verdict with no artifact is undebuggable, which is exactly what happened here).
  2. Make no-verdict handling smarter than fail-and-block: a third attempt at escalated effort with a sharpened "your ENTIRE response must be the verdict format" reinforcement is the minimum; whatever the captured responses show should drive the real fix (e.g., if the model is writing an essay about the diff's security implications, the prompt needs a harder format contract).
  3. Keep it fail-closed. No-verdict must still block the push -- the fix is making the verdict arrive, never assuming safety on silence.
  4. Tests: extend the security-gate test coverage with the parse/retry path (a stub returning non-verdict text twice then a valid verdict -> proceeds; three non-verdicts -> blocks with the artifact preserved).

Out of scope

  • Re-queueing igor#480 itself (the operator is hand-applying that one-paragraph docs change).
  • Any change to what the gate reviews or its blocking semantics.

Verification

  • make test green including the new gate tests.
  • Manual: run the gate against #480's exact diff (preserved in the issue) and confirm either a verdict arrives or the artifact is captured for diagnosis.
The security gate failed to produce a parseable verdict THREE consecutive times on igor#480 (2026-08-09 ~01:05, 04:19, 05:53) -- "no verdict from the reviewer after 2 attempts" -- while every other model surface was healthy all night (`.health` clean throughout). The failure is deterministic and content-shaped, not transient: #480's diff rewrites `lib/automerge.sh`'s header COMMENT describing merge-gate security semantics, and the security reviewer plausibly responds to gate-describing prose with something other than the required verdict format. ## Deliverables 1. **Diagnose from evidence, not the theory above.** The gate's raw model responses are the ground truth: capture/inspect what the reviewer actually returned on a re-run of the #480 diff (preserve the stream/envelope on no-verdict, the way crashlog preserves worktrees -- if that capture doesn't exist, adding it IS part of this ticket; a no-verdict with no artifact is undebuggable, which is exactly what happened here). 2. **Make no-verdict handling smarter than fail-and-block:** a third attempt at escalated effort with a sharpened "your ENTIRE response must be the verdict format" reinforcement is the minimum; whatever the captured responses show should drive the real fix (e.g., if the model is writing an essay about the diff's security implications, the prompt needs a harder format contract). 3. **Keep it fail-closed.** No-verdict must still block the push -- the fix is making the verdict arrive, never assuming safety on silence. 4. **Tests:** extend the security-gate test coverage with the parse/retry path (a stub returning non-verdict text twice then a valid verdict -> proceeds; three non-verdicts -> blocks with the artifact preserved). ## Out of scope - Re-queueing igor#480 itself (the operator is hand-applying that one-paragraph docs change). - Any change to what the gate reviews or its blocking semantics. ## Verification - `make test` green including the new gate tests. - Manual: run the gate against #480's exact diff (preserved in the issue) and confirm either a verdict arrives or the artifact is captured for diagnosis.
igor self-assigned this 2026-08-09 15:26:58 +00:00
igor added spent time 2026-08-09 15:43:38 +00:00
16 minutes 35 seconds
igor removed their assignment 2026-08-09 15:43:38 +00:00
igor self-assigned this 2026-08-09 15:45:30 +00:00
igor added spent time 2026-08-09 15:56:17 +00:00
10 minutes 22 seconds
igor removed their assignment 2026-08-09 15:56:17 +00:00
igor self-assigned this 2026-08-09 20:04:47 +00:00
igor added spent time 2026-08-09 20:14:59 +00:00
9 minutes 41 seconds
igor removed their assignment 2026-08-09 20:14:59 +00:00
igor self-assigned this 2026-08-09 20:34:26 +00:00
igor added spent time 2026-08-09 20:45:13 +00:00
10 minutes 18 seconds
igor removed their assignment 2026-08-09 20:45:13 +00:00
igor self-assigned this 2026-08-09 20:49:37 +00:00
igor removed their assignment 2026-08-09 20:55:55 +00:00
igor closed this issue 2026-08-09 20:58:57 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Total time spent: 46 minutes 56 seconds
igor
46 minutes 56 seconds
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
joshtronic/igor#491
No description provided.