Skip to content

chore(proof): run the documented gates and leave a receipt - #82

Merged
TusanHomichi merged 5 commits into
mainfrom
claude/lucid-edison-6m38xa
Oct 14, 2026
Merged

TusanHomichi merged 5 commits into
mainfrom
claude/lucid-edison-6m38xa

Conversation

@TusanHomichi

@TusanHomichi TusanHomichi commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Primary Issue

Closes #80

Problem And Outcome

Each session re-derived the gate sequence from CONTRIBUTING.md and wrote its own chain and receipt by hand. After merge, one command runs the documented sequence fail-fast and leaves a receipt, and a tool-neutral skill routes a change to its focused proof before that run.

Changes

  • scripts/proof.py (Python 3 stdlib + git): reads the gate block under "Build and verification" in CONTRIBUTING.md and runs each line from the repository root; it holds no copy of the commands. --chromium PATH (or CONSOLEBOOK_E2E_CHROMIUM) swaps the browser step for the documented system-browser line. It refuses to run (exit 2) when the block's shape drifts, including when there is not exactly one npm run e2e step. --list prints the parsed sequence.
  • Receipts go in a new directory under the ignored .proof/; failed and interrupted runs keep theirs. Each holds receipt.json, receipt.md, per-step logs, and the web asset manifest. Recorded: candidate SHA/tree/dirty state, whether the candidate changed during the run, per-step exit/duration/log SHA-256, browser kind/path/version, toolchain, host privilege, and the binary and asset-manifest hashes. The binary and manifest are recorded only when the step that produces them passed in this run.
  • Privilege is judged by the effective capability set (CAP_DAC_OVERRIDE/CAP_DAC_READ_SEARCH), not uid alone. The skill documents setpriv for root-only containers.
  • --self-test: positive/negative controls for fail-fast, receipt retention, crash-is-never-a-pass, the artifact rule, and the parser's fail-closed cases.
  • .agents/skills/consolebook-proof/SKILL.md: focused proof by area (from docs/development.md's index), the full run, and how to read and report a receipt.
  • One-paragraph routes in CONTRIBUTING.md (also warns that the block is now executable input), docs/workflow.md (receipt rules name the script), docs/development.md, and AGENTS.md.

Correction rung: 1 (codebase) for skill/CONTRIBUTING drift, which is unrepresentable because the script reads the block, plus 2 for the script's own behavior via --self-test with negative controls.

Scope

Verification

Review And Merge Notes

  • Review focus: the CONTRIBUTING-block parsing contract (what makes it refuse), and whether the receipt fields match docs/workflow.md's receipt rules.
  • Review performed: self-review plus one automated review (finding fixed); no independent human review.
  • User or operator impact: none at runtime; contributors get scripts/proof.py.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts

Add scripts/proof.py and the tool-neutral consolebook-proof skill. The
script reads the gate sequence from CONTRIBUTING.md's Build and
verification block instead of keeping a copy, runs it fail-fast from the
repository root, names the browser, and writes a receipt (candidate,
dirty state, per-step exit, duration, log hashes, binary and web asset
hashes) under the ignored .proof/. Failed and interrupted runs keep
their receipts. --self-test holds the runner's own positive and
negative controls and the parser's fail-closed cases.

Refs #80

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
The first failed receipt reported the server binary's hash although the
build step never ran: the file was left from an earlier build. Record
the binary and web asset manifest only when the step that produces each
passed in the run, and cover the rule in --self-test.

Refs #80

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
The runner started from "passed" and only downgraded on a non-zero exit
or an interrupt, so any other exception during a step left a receipt
saying passed. Start from "error", set "passed" only after every step
exits 0, mark the crashed step "error", and tolerate a step whose log
was never created. --self-test injects a crashing step as the control.

Refs #80

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
The permission tests fail when the process can bypass file permissions,
not merely when its uid is 0. Read CAP_DAC_OVERRIDE and
CAP_DAC_READ_SEARCH from the effective set on Linux (falling back to the
effective uid elsewhere), record euid and the source in the receipt, and
document dropping those capabilities with setpriv where only root is
available.

Refs #80

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T15:50:26.652579Z 6a26e38 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3586f57a72

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/proof.py Resolved
Only the --chromium path checked for the e2e step, so a CONTRIBUTING.md
edit that dropped or duplicated `npm run e2e` would still let a default
run write a passed receipt without the browser suite, and a
system-browser line that did not run the suite would replace it. Check
both in the parser, and add the three cases to --self-test.

Refs #80

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6a26e38ecb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/proof.py Resolved
Comment thread scripts/proof.py Resolved
Comment thread scripts/proof.py Resolved
Comment thread scripts/proof.py Resolved

Copy link
Copy Markdown
Member Author

Local proof receipt: passed (6a26e38)

Produced by this PR's own scripts/proof.py against a clean worktree of the head commit. Local evidence: the hosted pr-gate run is separate.

  • Candidate: 6a26e38ecb35d00545bce1b2d69edd742828a10a, tree 2d40028684aa6dde303c35bcedfe671860011199, clean; unchanged during the run: True
  • Command: setpriv --inh-caps=-dac_override,-dac_read_search,-fowner --bounding-set=-dac_override,-dac_read_search,-fowner scripts/proof.py --chromium /opt/pw-browsers/chromium
  • Started 2026-10-14T15:43:35Z, finished 15:55:01Z (686.6 s)
  • Browser: system Chromium 141.0.7390.37
  • Host: Linux, euid 0 with the permission-bypass capabilities dropped. The receipt records can bypass file permissions: False, so the doctor_read_only permission tests ran meaningfully.
  • Binary sha256 70757c894931da2ddf55b74a6bde1dd7164f5ce86c0189a9f321f4bbd7ba02f0; web build manifest (46 files) sha256 aa79096f370b35fbd1773fd1e6f5f8af43da695e498b200bd6da9396101b2e83
  • receipt.json sha256 a3a1885c2cb1d2b22c0b23c429279f79337906195c53ae357bea49fa17a78dcb
# Step Result Seconds
1 scripts/check-guidance-names.sh passed 0.1
2 (cd web && npm ci && npm run check && npm run build) passed 21.7
3 cargo fmt --check passed 0.6
4 cargo clippy --workspace --all-targets -- -D warnings passed 52.6
5 cargo test --workspace passed 243.1
6 cargo build -p consolebook-server passed 0.2
7 npm run e2e (system Chromium) passed (56) 368.4

Earlier receipts are kept as evidence, not erased:


Generated by Claude Code

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.

skills: a tool-neutral consolebook-proof skill that runs the gates and leaves receipts

2 participants