Skip to content

Attacks

Beovulfo edited this page Nov 26, 2026 · 3 revisions

Attacks

The attacks shape the design. Before the first herd verify, and so before any code, the agent decides what each attack means for the input and logs all six, each with its command (or --covered-by) or an n/a: reason; the commands should fail then. On the standard route the first herd verify refuses while an attack has no note: it names each missing one, runs no check and writes nothing (0.13.2). The quick route has no attacks. There is no review step (removed in 0.13.0, see Review), so bugs outside the attacks and criteria are not caught by a second model.

The agent tries to break its own work on exactly what the request promises: the words any, every, very big become generated cases of different shapes and a scale run. It always also runs six standard attacks: bad input at every entry point, collisions (distinct entries that share a name, value or position must all count; input that contradicts itself is refused, unless the request says which entry wins), one broken entry it does not need (skipped only when that cannot change a requested answer, otherwise refused; a warning on stderr with exit 0 is never a refusal), a recount of every reported number from the output, on the generated and collision inputs too, and a refusal check (every kind of input the program refuses, such as an unreachable product, is confirmed refusable by separate, simpler code on generated inputs, logged before building so it fails at the first verify), and an other-reading check (each [[inputs]] entry read in at least two ways a person could read the human's words, such as a date as 03/04/2026 or 2026-04-03, with generated inputs from code that calls no project code; the program must serve every reading itself, and n/a: is refused when the task lists inputs). At every risk, other-reading also needs --example "<cmd>" --expect "<text>": the program run on a tiny case written as the human described it, and the answer solved by hand before any code. The example passes only on exit 0 with stdout that contains the text; the text is frozen at the first herd verify, and a change needs --expect-changed "<reason>", which the report and the PR list (0.13.3). Each [[inputs]] entry in task.toml lists its readings (at least 2 ways a person could read the human's words for it, counted by items, never by wording); herd done refuses fewer at medium and high risk, and the report shows them next to the input. A known limit that narrows a human any/every claim (only, first, rejected, skipped, assumed) is shown under Not proven in the report and the PR, and herd verify warns about it, and about such a claim whose coverage names no random inputs. Each attack is logged with a command that shows it (herd note --tried --attack <name> --check "<command>"); --refuses "<cmd>" goes with collision (contradictory input) and one-bad-part (a broken requested entry), and at medium and high risk herd done and the Stop gate refuse without it; for collision only, --refuses "n/a: <reason>" is not run and is listed under Not proven. For recount, refusal and other-reading, --covered-by <criterion id> reuses a criterion's check instead of a second test: the attack passes exactly when that check passed in the latest herd verify, and one that ran zero tests or no project code does not count (0.13.1). herd verify runs these commands like criterion checks, and herd done and the Stop gate refuse until each attack has one that passes (or an n/a: reason). Each attempt, failure and fix is logged with herd note.

Clone this wiki locally