Skip to content

ci: run each formal obligation once per content identity - #114

Merged
afflom merged 2 commits into
mainfrom
claude/project-thread-xjkn5o
Nov 9, 2026
Merged

afflom merged 2 commits into
mainfrom
claude/project-thread-xjkn5o

Conversation

@afflom

@afflom afflom commented Nov 9, 2026

Copy link
Copy Markdown
Member

Requested by Alex · project thread

Why

Every PR, including a one-line workflow change (#113), paid ~80 min of CI: three full LexLean verifies (artifacts leg + two offline roots), the integrity runtime (~43 min), and the xtask suite (~26 min inside rest, on both hosts). Any fix commit or rerun paid it all again.

PrismPM's Factory route (PrismPM #566, #579) establishes each obligation once per content identity κ of its inputs and reuses the receipt otherwise. This applies the same idea here, with no new legs.

What

  • scripts/ci-receipt.sh: κ = SHA-256 of git ls-tree -r HEAD minus the paths no formal leg reads: client/, crates/uorc*, generated/, web/, Cargo.toml/Cargo.lock, README.md, scripts/bench.mjs, scripts/client-export.mjs, release.yml, and the script itself. A passing obligation uploads a tiny receipt-<obligation>-<κ> artifact (90-day retention). lookup finds an unexpired one from a same-repository run through the Actions artifacts API; any lookup failure means "not proved", so the work runs.
  • bootstrap: every leg except rest is receipted. rest (lexlean check, template/model, fmt, clippy, tests, features, bdd, deny) checks the product and runs on every revision on both hosts. Job names and the required acceptance / * checks are unchanged.
  • Justfile: test excludes xtask; the xtask suite becomes formal-tests, added to vv and run in the receipted claims leg. rest drops from ~32/44 min to a few minutes.
  • offline validation: a route job skips the whole workflow when κ is proved (receipt uploaded by the two-root comparison).
  • Both workflows cancel superseded pull-request runs.
  • template.lock records the new bootstrap.yml digest and policy tree hash; the preflight workflow test pins the new conditions.

Effect

Checks

  • tests/sdk-preflight/run.py: 17 OK. claims, varint, offline, integrity-transcript/stream/vectors node suites pass. cargo test -p xtask bootstrap: 14 pass.
  • This PR changes κ (it edits bootstrap/Justfile), so its own run is a full establishing run; the next run on an unchanged κ shows the skip.

Generated by Claude Code

Following PrismPM's Factory route (establish each obligation once per content
identity κ of its inputs, reuse the receipt otherwise):

- scripts/ci-receipt.sh computes κ, the SHA-256 of the tracked tree minus the
  product client and release plumbing (client/, crates/uorc*, generated/,
  web/, Cargo.toml/lock, README, bench/export scripts, release.yml). A passing
  obligation uploads a receipt artifact named by obligation and κ; a later run
  with the same κ from this repository finds it and skips the work.
- bootstrap: every leg except `rest` is receipted. `rest` checks the product
  and runs on every revision.
- `just test` excludes xtask; its suite (product runtimes, ~26 min) is the new
  `formal-tests` recipe in the receipted claims leg, so `rest` drops from
  ~32/44 min to a few minutes.
- offline validation: a route job skips the whole workflow when κ is proved.
- Both workflows cancel superseded pull-request runs.
- template.lock records the new bootstrap.yml digest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3MxBFWUvmvRUeURG8o
@afflom afflom self-assigned this Nov 9, 2026
@afflom
afflom merged commit ce4422c into main Nov 9, 2026
15 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