Skip to content

fix(claims): a nonzero exit does not refute an observation the claim promised - #193

Merged
drewstone merged 1 commit into
mainfrom
fix/grade-refusal-claims-192
Sep 7, 2026
Merged

fix(claims): a nonzero exit does not refute an observation the claim promised#193
drewstone merged 1 commit into
mainfrom
fix/grade-refusal-claims-192

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Summary

  • gradeFor read the exit code before the expectation, so a refusal gate that correctly refuses, exits nonzero, and prints the promised REFUSED=1 was graded contradicted; expect was dead code for every negative control.
  • When the output contains the expectation the claim is now verified whatever the exit status. An unreached-input signature in the output still grades unrunnable, and an expectation that itself names a signature keeps the existing refutation rule (the still refutes a claim that PREDICTED the error test is unchanged).

Closes #192

Verification

  • vitest run src/claim-evidence.test.ts: 57 passed, 1 failed. The failure (grades a check that finishes in budget) fails identically on main on macOS because wc -c pads its output; it passes on Linux CI.
  • tsc --noEmit, biome check

…promised

`gradeFor` consulted the exit code before the expectation, so a negative
control that correctly refuses, exits nonzero, and prints the refusal it
promised was graded `contradicted` and `expect` was dead code on every such
claim (#192, two refusal gates in one director run).

When the output contains the expectation, the claim is verified whatever the
exit status. Two guards keep their precedence: an unreached-input signature in
the output still grades `unrunnable`, and an expectation that itself names a
signature keeps the existing refutation rule, so a run that never happened is
not rescued by a coincidental substring.

Verification: vitest src/claim-evidence.test.ts (57 passed; the one failure,
'grades a check that finishes in budget', fails identically on main on macOS
because `wc -c` pads its output); tsc --noEmit; biome.

Closes #192
@drewstone
drewstone merged commit 61e3dae into main Sep 7, 2026
2 checks passed
@drewstone drewstone mentioned this pull request Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(knowledge): gradeFor refutes a refusal claim because a correct refusal exits nonzero

1 participant