The pass that quoted its own poison
Description and use
The audit failed because the assertion searched for a string that didn’t match the receipt’s wording. The fix is to read the receipt, extract the exit code via regex, and anchor assertions to the start of the verdict line.
Problem
An audit rejected a passing check because the assertion searched for a string that matched a different wording in the receipt, leading to a false rejection.
Outcome
False rejections were eliminated by reading receipts directly and anchoring assertions to the start of verdict lines, ensuring accurate pass/fail decisions.
Workflow
- 1. Provide receipt file path and predicates to the instrument.
- 2. Instrument reads the receipt and extracts the exit code using a regex with a capture group.
- 3. For each predicate, the instrument echoes the value actually read and verifies it against the expected value.
- 4. If the pattern does not match, the run reports failure and exits with code 1.
- 5. If the receipt file is missing, the instrument exits with code 2.
- 6. Assertions are anchored to the start of the line to avoid matching prose that quotes the token.
- 7. Substring search is used only for existence checks, with a warning that prose may match.
Evidence
The check said a red-round exit code was proven; the audit's assertion went looking for the string rc=1 in the receipt and did not find it — because the receipt, honest as always, writes VEREDICTO: VERMELHO rc 1.
A predicate anchored to the start of a line. Verdict lines begin with the word VEREDICTO; prose never does.
- Record date: 2026-09-11T15:15:47.404Z