Skip to content

op2: pin expected container_measurement + detailed mismatch error - #94

Merged
bitzic merged 1 commit into
RalphLabsAI:mainfrom
karpabot:fix/op2-measurement-pin
Jul 3, 2026
Merged

op2: pin expected container_measurement + detailed mismatch error#94
bitzic merged 1 commit into
RalphLabsAI:mainfrom
karpabot:fix/op2-measurement-pin

Conversation

@karpabot

@karpabot karpabot commented Jul 3, 2026

Copy link
Copy Markdown

Fixes the recurring op2 breakage where running a dev branch / unpushed proof-source code on the validator box silently recomputes a container_measurement no miner can reproduce, rejecting everyone.

  • RALPH_EXPECTED_MEASUREMENT (64-hex) pins op2's expected measurement to the published prooftest image, decoupling it from the box's live tree. Falls back to live compute when unset. Not a security relaxation — op2 still requires a real CC attestation binding to the value. Update only on a deliberate image cutover.
  • Detailed reject error: on a measurement mismatch, op2 now emits got X, expected eee78494… — rebuild inside ghcr.io/ralphlabsai/ralph-prooftest:v0.2.4 + the verify one-liner, instead of an opaque 'mismatch'.
  • Both changes are in validator.py (not a proof source), so they're measurement-neutral — verified main + recipe c813831 still hashes to eee78494.

🤖 Generated with Claude Code

- RALPH_EXPECTED_MEASUREMENT (64-hex) pins op2's expected measurement to the
  PUBLISHED prooftest image, decoupling it from the validator box's LIVE tree.
  Fixes: running a dev branch / unpushed proof-source code on the box silently
  recomputed a measurement no miner could reproduce -> op2 rejected everyone.
  Falls back to live compute when unset. Not a security relaxation (op2 still
  requires a real CC attestation binding to the value); update only on a cutover.
- detailed reject: on a container_measurement mismatch, op2 now names got vs
  expected + the canonical image + the verify one-liner, instead of an opaque
  'mismatch' — miners no longer have to guess the target.
- both live in validator.py (NOT a proof source) so they are measurement-neutral;
  verified main + recipe c813831 still hashes to eee78494.
- RALPH_CANONICAL_SOURCE_COMMITS path already exists for the version-drift message.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@karpabot
karpabot force-pushed the fix/op2-measurement-pin branch from 20e8d0f to e31b1a0 Compare July 3, 2026 12:23
@bitzic
bitzic merged commit cd4e154 into RalphLabsAI:main Jul 3, 2026
4 checks passed
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.

2 participants