Commit 832b157
Harden the DYADT claim verifier against adversarial-review bypasses (#458)
## Context
Follow-up to #457 (Wave 4, merged), which introduced DYADT — the
post-action verifier that checks an agent's *claimed* outcomes actually
happened. Before considering it done, I ran an **adversarial review** of
the reference verifier (3 red-team lenses — bypass, verdict-logic,
spec-gaps — each finding independently re-verified). It found **real
ways to make a false claim pass**, or to make the verifier drop or
mis-judge a claim.
A claim-checker that can be fooled is worse than none. This PR closes
every confirmed hole **fail-safe** (return `unverifiable`, never a
confident wrong verdict) and locks each with a regression assertion
**and** a conformance vector.
## Holes closed (`scripts/verify-claims.sh`)
| Bypass found | Now |
|---|---|
| Unresolvable/empty base ref → confident-wrong
`created`/`modified`/`deleted` | `unverifiable no-base-ref` |
| `created` confirmed any existing file (untracked build output, etc.) |
requires a git-**tracked** file new to the change |
| Missing required field → false-confirm / silent drop | `unverifiable
missing-field`; a block with no `id` still appears (no silent drop) |
| Empty / `.*` `expect` → unconditional confirm | `unverifiable
empty-pattern`; malformed regex → `bad-regex` |
| `target` = absolute / `..` / symlink → evidence redirection |
`unverifiable unsafe-path` |
| `stdout-contains:` matched **stderr** too | matches stdout only
(stderr captured separately) |
| `contains:`/`sha256:` on a directory/unreadable file → `refuted` |
`unverifiable` |
| Licence claim phrased only in `statement` → auto-confirmed | licence
detected in class/target/expect/**statement** → `manual-only` |
| `claims-compose` infinite recursion (cycle / fork bomb) | depth-capped
at 8 |
| `not_before` (stale-evidence) unimplemented | present → `unverifiable`
(reference collects no timestamps) |
| Parser only accepted `key = "v"` | whitespace-tolerant (`key="v"` too)
|
## Spec
`VERIFICATION-PROTOCOL.adoc` gains two normative sections: **Fail-safe
requirements** (the exhaustive list of "cannot collect trustworthy
evidence → unverifiable") and **Command execution & sandboxing**
(`command-transcript` executes `target`; untrusted claims MUST be
sandboxed; the reference impl is trusted-input-only and says so).
## Verification
- `scripts/tests/wave4-dyadt-test.sh`: **14/14** (7 new hardening
assertions — each proves a specific bypass is now closed).
- `spec/conformance/`: **9/9** vectors (added `missing-field`,
`unsafe-path`, `licence-in-statement` so the production verifier must
handle them too).
- Dogfood `CLAIMS.a2ml` still all-confirmed; Waves 0/1/3 tests
unaffected; registry + dashboard in sync.
Method: 3-lens red-team fan-out → independent re-verification of each
finding → fix only the confirmed ones fail-safe. Licence handling stays
`manual-only` end-to-end.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
_Generated by [Claude
Code](https://claude.ai/code/session_0114ps6mY5jAH4SzbGxeuYjc)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9083f25 commit 832b157
10 files changed
Lines changed: 269 additions & 35 deletions
File tree
- .machine_readable
- did-you-actually-do-that/spec
- conformance
- scripts
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
95 | 134 | | |
96 | 135 | | |
97 | 136 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
110 | 180 | | |
111 | 181 | | |
112 | 182 | | |
| |||
0 commit comments