Skip to main content

Module integrity

Module integrity 

Source
Expand description

The integrity audit of an attempt’s diff.

Line-based and deliberately suspicious: it errs on flagging. Any finding fails the verdict with an integrity: reason; a person looks.

Structs§

Drift
A judge input that changed between two snapshots.
JudgeSnapshot
The judge, intent and agent context inputs of a worktree by content hash, git-ignored files included (.claude/settings.local.json is ignored by default, and an agent still loads it).

Functions§

asserts_crlf_as_text
Whether a Python test asserts \r\n in output it reads as text (text=True, universal_newlines=True): text mode turns \r\n into \n, so it fails whatever the code writes (the example’s US1, 2026-11-03).
audit
Findings for an attempt: changes and patch between its checkpoints, frozen the test files that existed when it started. With additions_ok, a frozen test whose diff only adds lines is no finding (removed tests and skip markers still are). An agent context file (AGENTS.md, …) changed without a person’s grant in approved is one.
audit_in
audit against the protected set of the project’s format.
has_placeholder
Whether text is a placeholder: it fails by raising “not implemented” (raise NotImplementedError, todo!(), unimplemented!(), …) — red that no implementation can turn green.
has_skip_marker
Whether text holds a marker that skips a test.
invalid_escape
Python’s warning of an invalid escape in one of paths’ own string literals, from a run’s output (test_x.py:15: SyntaxWarning: "\\|" is an invalid escape sequence): the string holds what its author did not write (the example’s US3-2, 2026-11-04).
never_passes
Why a test can never pass, whatever the code, when speccoder can tell: the words a ruling on it gives.
only_additions
Whether every line of old survives, unchanged and in order, in new: the change only adds lines ([tests] frozen = "additions").
removed_tests
The tests before defines that after no longer does, in order.
sha256_hex
Lowercase hex SHA-256 of bytes: the content hash of a judge input or a task list, as the format adapters’ write guards compare it.