feat(eval): Phase 4 scaffolding — self-healing agent-quality guard - #369
Merged
Conversation
Stands up the EVAL machinery (HARNESS_TRUST_HARDENING §4) — everything buildable ahead of the one irreducibly-human step (the operator answer-key signature): - corpus.py: append-only, hash-chained case ledger. Editing/deleting any past entry breaks the chain → tamper-evident (verified by a required CI check). - signing.py: Ed25519 operator signatures. A case is *graded* only when its signature verifies against the constitution public key; asymmetric so no compute inside the trust boundary can forge a label. Private key stays offline. - replay.py: deterministic BLOCKING gate — replays input.checks through the pure code-computed verdict (pr_review_watcher.verdict.compute_verdict) and exact- matches the committed answer. No model → zero flakiness; catches a #313-style verdict-bypass regression. Only operator-signed cases count toward the gate. - critic.py: non-blocking, different-model-family N-of-M drift monitor (the model extractor is an injected seam; production wires a different-family adapter). - constitution.py: monotonic baseline floor + report-only→blocking graduation (D-EVAL-3). The gate can never block before the answer key is seeded (§0.1). - verify.py + eval-corpus-integrity.yml: the required check tying chain + signatures + floor together. CODEOWNERS pins corpus + constitution + workflow to the operator (D-EVAL-2). Seeds 7 unsigned candidate cases (#313/#337 classes); all pass replay and the gate is correctly report-only (0/15 signed). The exam/answer-key split: the fleet may append candidate cases, but only an offline operator signature makes one count toward the gate. 33 unit tests (hash-chain tamper-evidence, signature non-transfer, replay gating, graduation, drift majority-vote, end-to-end verify). ruff/ty clean. Deferred (irreducibly human): operator generates the Ed25519 key offline, commits the pubkey, signs >=15 seed cases → gate graduates to blocking. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CI surfaced two gaps in the Phase 4 scaffolding: - cryptography was used by eval.signing but not declared, so the test/ty jobs failed to import it (it was only transitively present locally). Added it to [project] dependencies. - the monotonic baseline-floor check lived only in the workflow's inline Python heredoc, so constitution.is_monotonic_successor_of was "tested but never called in production" (D12). Moved the enforcement into verify.py (--base-floor) and simplified the workflow to call it — de-stringifies the check and clears D12. 35 unit tests (added monotonic raise/lower cases); ruff/ty/D12 clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 21, 2026
ProtocolWarden
added a commit
that referenced
this pull request
Jun 21, 2026
Records the merged EVAL machinery (#369 + #370) in HARNESS_TRUST_HARDENING.md's Phase-4 section — corpus hash-chain tamper-evidence, Ed25519 answer-key signing + offline CLI, deterministic replay blocking gate, different-family drift monitor, monotonic constitution + required integrity check, 7 seeded candidates — and spells out what is still deferred (the operator key-anchor, the Component-2 outcome flagger, D-EVAL-4 over-flag attribution, the live drift-monitor model adapter) so the doc reads scaffolding-done, not phase-complete. Docs-only. Co-authored-by: ProtocolWarden <ProtocolWarden@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Stands up the Phase 4 (EVAL) machinery from
HARNESS_TRUST_HARDENING§4 — everything that can be built ahead of the one irreducibly-human step (the operator answer-key signature). The fleet can now grade its own reviewer/worker quality, while being structurally unable to grade its own answer key.The design in one line
The fleet grades itself, but cannot grade its own answer key. Everything self-heals with no human in the per-correction loop except an operator signature on each ground-truth label — encoded once, offline.
Modules (
src/operations_center/eval/)corpus.pysigning.pyreplay.pyinput.checksthrough the pure code-computed verdict (pr_review_watcher.verdict.compute_verdict) and exact-matches the committed answer. No model → zero flakiness → safe to block. Catches a #313-style verdict-bypass regression.critic.pyconstitution.pyverify.py.github/workflows/eval-corpus-integrity.yml) tying chain + signatures + floor together.The exam / answer-key split
What's seeded
7 unsigned candidate cases (#313 verdict-bypass + injection classes, #337 over-flag, plus legitimate concerns). All pass replay; the gate is correctly report-only (0/15 signed).
CODEOWNERSpinseval/corpus,eval/constitution, and the workflow to the operator (D-EVAL-2).Verification
33 unit tests (hash-chain tamper-evidence, signature non-transfer to a swapped input, replay gating, graduation modes, drift majority-vote, end-to-end verify incl. signed blocking + tamper detection). ruff/ty clean; Custodian T7 cleared.
Deferred — the one human step
The operator generates the Ed25519 key offline, commits the public key to
eval/constitution/operator_pubkey.ed25519(currently a placeholder), and signs ≥15 seed cases. At that point the gate graduates from report-only to blocking. Nothing else in EVAL needs a human.🤖 Generated with Claude Code