Repository navigation
chore(proof): run the documented gates and leave a receipt - #82
Conversation
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
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
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
There was a problem hiding this comment.
💡 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".
Local proof receipt: passed (
|
| # | 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:
b2b42e8-dirty: the deliberate fmt-break negative control. It stopped at step 3.4c8aa83: run as privileged root. It failed step 5 only on the two permission tests that require an unprivileged user.3586f57: step 7 had one failure indraft-recovery.spec.ts:2367. That test is not touched by this PR, and the failure did not reproduce in 16 isolated runs. Filed as test(e2e): intermittent failure in "a failed ordinary save cannot silently leave by SPA navigation" #83 with the snapshot evidence.
Generated by Claude Code
Primary Issue
Closes #80
Problem And Outcome
Each session re-derived the gate sequence from
CONTRIBUTING.mdand 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" inCONTRIBUTING.mdand runs each line from the repository root; it holds no copy of the commands.--chromium PATH(orCONSOLEBOOK_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 onenpm run e2estep.--listprints the parsed sequence..proof/; failed and interrupted runs keep theirs. Each holdsreceipt.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.CAP_DAC_OVERRIDE/CAP_DAC_READ_SEARCH), not uid alone. The skill documentssetprivfor 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 (fromdocs/development.md's index), the full run, and how to read and report a receipt.CONTRIBUTING.md(also warns that the block is now executable input),docs/workflow.md(receipt rules name the script),docs/development.md, andAGENTS.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-testwith negative controls.Scope
.gitignoreentry.Verification
6a26e386a26e38, using its own script. The run had the permission-bypass capabilities dropped and used system Chromium 141; all 7 steps passed, including 56 browser tests. Receipt: chore(proof): run the documented gates and leave a receipt #82 (comment)pr-gatepassed on6a26e38: https://github.com/FieldmouseWorks/consolebook/actions/runs/38591786509/job/115948249739--self-testpasses. Mutation checks:b2b42e8-dirty) stopped at step 3;4c8aa83failed only the 2 permission tests that require an unprivileged user;3586f57run had one browser failure, unrelated and filed as test(e2e): intermittent failure in "a failed ordinary save cannot silently leave by SPA navigation" #83 with evidence.6a26e38, and resolved.--self-test)Review And Merge Notes
docs/workflow.md's receipt rules.scripts/proof.py.🤖 Generated with Claude Code
https://claude.ai/code/session_01TsvZjbz8dTRM8A1NqAP5ts