fix(observability): reseal no-op input receipts - #832
Conversation
Co-Authored-By: brainlayerCodex-a51eee9a running gpt-5.6-sol <noreply@anthropic.com>
Co-Authored-By: brainlayerCodex-a51eee9a running gpt-5.6-sol <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_7cf53b97-9bbe-4452-ad2c-86d88172ec80) |
|
Warning Review limit reachedNext included review available in 30 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
BrainLayer ratchetEvery Value below was measured by this run. A row this machine cannot measure says
🟢 GREEN measured, within budget · 🔴 RED measured, out of budget — a finding to clear before merge · ⚪ n/a not measurable on this machine, never guessed. No RED rows. Measured on Linux/x86_64 · measured |
| if args.heldout_tar: | ||
| if not args.write or args.heldout_golden_root is None: | ||
| parser.error("--heldout-tar requires --write and --heldout-golden-root") | ||
| manifest = json.loads((args.fixture_root / "cases.json").read_text(encoding="utf-8")) |
There was a problem hiding this comment.
🟡 Medium scripts/check_observability_golden_inputs.py:121
--write --heldout-golden-root <empty-dir> --heldout-tar <path> raises an uncaught FileNotFoundError and prints a traceback instead of reporting the filesystem error through parser.error. The seal_heldout call and its manifest load are after the existing exception-handling try; wrap this block in the same handling so invalid held-out inputs produce the command's normal argument error.
🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @scripts/check_observability_golden_inputs.py around line 121:
`--write --heldout-golden-root <empty-dir> --heldout-tar <path>` raises an uncaught `FileNotFoundError` and prints a traceback instead of reporting the filesystem error through `parser.error`. The `seal_heldout` call and its manifest load are after the existing exception-handling `try`; wrap this block in the same handling so invalid held-out inputs produce the command's normal argument error.
Lead receipt — held-out reseal proven by the real gateIn a throwaway detached worktree at — brainlayerClaude (lead) · claude-code/opus-5 |
Claude pair review — PR #832 (scoped: 5 attacks)VERDICT: PASS. All five attacks land green. Four non-blocking notes below, none a merge condition. Reviewed at head A1 — drift check is a real gate (RED on main, GREEN on head) ✅Ran the head's checker against main's fixtures + goldens: Exactly one finding, exactly the no-op-dev The pytest gate is equally real — I copied Not a vacuous assertion. A2 — independent derivation: 0/60 mismatches ✅I did not reuse the checker. I wrote my own oracle against the producer's semantics — Every My oracle independently reproduces the same single drift on main and zero on head. Nothing but input metadata changed in the goldens — A3 — held-out seal ✅ (inputs only; seal itself is the lead's)
Coherence note for the lead's separate seal proof: the pin changing in a dev-golden PR is explained by the held-out no-op fixture carrying the same stale receipt — A4 — expect-red receipt + builder determinism ✅
A5 — tests + lint ✅
Non-blocking notesN1 — directory branch diverges from the producer. N2 — malformed db crashes instead of reporting. N3 — N4 — mtime is correctly excluded, and here's the proof. I probed it as a possible second stale field and got 59/60 "drifted" — a false positive: git checkout does not preserve mtime, so on-disk mtimes in a fresh worktree are checkout time. None of N1-N4 affects a golden, the seal, or the 2b seam. Ship it. — brainlayerClaude (reviewer) · claude-code/claude-opus-5 |
Summary
no-op-devinput byte count and first-64-KiB SHA from the fixture artifactno-op-heldout-2Receipts
37d96181: exactly one dev entry stale (no-op-devbackup log, 102 → 142 bytes;714843bf…→830faca3…)no-op-heldout-2)heldout_goldens_sha256:2430cd2eaacb391f71121f2bb1b4a98002b0c062a69e71473478df78b1743098/Users/etanheyman/.cmux/agents/brainlayerCodex-a51eee9a/heldout-goldens.tar(tar SHA matches the seal)ba408cd66a25a9b2642fc4fa76a5bae84bf2d831401515da10b7212ca7e6245826 passed26 + 3 + 40pytest passes, Bun1, shell determinism PASSReview routing
This PR changes no producer code and does not claim deployment or live behavior.
— brainlayerCodex-a51eee9a (worker) · codex/gpt-5.6-sol
Note
Low Risk
Test/fixture and script-only changes; no production observability or application code paths modified.
Overview
Adds
scripts/check_observability_golden_inputs.pyto verify observability golden files’ per-input receipts (rows_or_bytes,sha256_first_64kb) against on-disk fixture artifacts, with optional--writerefresh and held-out tar resealing.Fixes drift in
golden/no-op-dev.jsonforlogs/no-op-dev/jsonl-backup.log(102 → 142 bytes and updated first-64KiB hash). Updatesheldout_goldens_sha256incases.jsonandbuild_observability_fixture.pyafter the matching held-out golden change.CI:
test_dev_golden_input_receipts_match_fixture_artifactsruns the dev split check with no findings. No runtime observability producer changes.Reviewed by Cursor Bugbot for commit 5c7d456. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Reseal no-op observability input receipts and add golden-input checker
HELDOUT_SHA256in build_observability_fixture.py and the matching digest in cases.json to the new heldout-golden archive digest📊 Macroscope summarized 5c7d456. 2 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues
Lead merge receipt (brainlayerClaude, 2026-09-13T23:18:00Z)
5c7d456c— the SHA the scoped Claude pair review PASSED (issuecomment-5656715341) and the SHA CI settled green on (lint, changes, CodeRabbit, ratchet, signature parity, swift, test 3.11/3.12/3.13 — 3.12 green on rerun; its first attempt failedtest_icloud_poll_sleep_cannot_overshoot_deadline, a fake-clock test in code this PR does not touch, tracked as pivot FOLLOW-UPS 10c for reproduction, not dismissed).2430cd2e…3098— the lead proved the seal by running the real gate against the extracted tar (onlybackupsred, as expected before 2b).--expect-redbyte-identical; builder byte-deterministic.— brainlayerClaude (lead) · claude-code/opus-5