Skip to content

Commit cba2193

Browse files
committed
docs(proof): record the head each proof run describes
1 parent 57a5d2a commit cba2193

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

‎docs/proof/record-front-matter-literal-write/README.md‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,19 @@ crabbox run --provider local-container --local-container-image node:24 --no-hydr
4949
bash docs/proof/record-front-matter-literal-write/run-proof.sh
5050
```
5151

52-
Recorded run:
52+
Proof contract — what a passing run must show. The **observed run for the current
53+
head (lease, run id, artifact, redacted output) lives in the PR body**, which is
54+
where AGENTS.md requires current proof to sit. No lease id is pinned here on
55+
purpose: editing this file changes the head, which would immediately make a pinned
56+
run describe a different commit than the one under review.
5357

5458
| | |
5559
|---|---|
56-
| provider | `local-container` (runtime `docker`) |
57-
| image | `node:24` → `v24.19.0`, `Linux aarch64` |
58-
| lease | `cbx_cae984baa97f` (`quick-crayfish`) |
59-
| run | `run_26f52fe84002` |
60-
| base staged | `5439582b` · `src/clawsweeper-record-metadata.ts` · sha256 `df480a1e…83f1` |
61-
| exit | `0` |
60+
| provider | Crabbox `local-container` (runtime `docker`) |
61+
| image | `node:24`; the script refuses to run below Node 24 |
62+
| result | **PROOF PASSED** (all fixtures); focused suite `4/4`; exit `0` |
63+
| head | echoed from `PROOF_HEAD`, forwarded with `--allow-env` |
64+
| tracked state | unchanged at every checkpoint; identical `package.json` and `pnpm-lock.yaml` digests at sync and at end of run |
6265

6366
`stage-before.sh` exists because container images carry no `.git`: it writes the
6467
base version of the changed file into `before/` on the host, where rsync picks it up

‎docs/proof/record-front-matter-literal-write/run-proof.sh‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ echo "== tracked state at sync =="
2020
TRACKED_BASELINE="$ARTIFACT_DIR/tracked-state-before.txt"
2121
capture_tracked_state() {
2222
{
23-
echo "head: $(git rev-parse HEAD 2>/dev/null || echo unavailable)"
23+
echo "head: ${PROOF_HEAD:-$(git rev-parse HEAD 2>/dev/null || echo unavailable)}"
2424
echo "package.json sha256: $(sha256sum package.json | cut -d' ' -f1)"
2525
echo "pnpm-lock.yaml sha256: $(sha256sum pnpm-lock.yaml | cut -d' ' -f1)"
2626
echo "porcelain:"
@@ -49,7 +49,11 @@ if [ "$NODE_MAJOR" -lt 24 ]; then
4949
echo "FAIL: repository requires Node >= 24, got $(node --version)"
5050
exit 1
5151
fi
52-
echo "head: $(git rev-parse HEAD 2>/dev/null || echo 'unavailable')"
52+
# A container image carries no .git, so `git rev-parse` cannot name the commit under
53+
# test from inside the lease. PROOF_HEAD is computed on the host and forwarded with
54+
# --allow-env so the recorded output states which head it describes; the host must
55+
# verify the tree is clean before the run for that to mean anything.
56+
echo "head: ${PROOF_HEAD:-$(git rev-parse HEAD 2>/dev/null || echo 'unavailable (pass PROOF_HEAD)')}"
5357
echo
5458

5559
echo "== build =="

0 commit comments

Comments
 (0)