Skip to content

Key every CI and release obligation on its own inputs (factory route) - #128

Merged
afflom merged 3 commits into
mainfrom
claude/project-thread-lnqf2y
Nov 10, 2026
Merged

afflom merged 3 commits into
mainfrom
claude/project-thread-lnqf2y

Conversation

@afflom

@afflom afflom commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Requested by Alex · project thread

Adopts the PrismPM factory route (PrismPM #566, #579-#581, #586) for uorc's CI and release. This is the release-velocity lane of v0.4. It adds no new validation legs, only routing, receipts and reuse.

What changes

  • factory/graph.json + scripts/factory.mjs: 15 obligations, each declaring its own inputs.
    • Identity is PrismPM's prism-factory/obligation/1 text: name, kind, environment, run, inputs, the identities of what it needs, and a closure hash.
    • Routes are proved, refuted, blocked or observe.
    • Each obligation has a 16-level weight: a failure raises it, a pass lowers it, and plan orders the remaining work by it.
    • Tests: node --test scripts/factory.test.mjs.
  • bootstrap / offline: each leg routes by its own identity.
    • A rerun of the same tree skips every leg, including rest. Squash-merging an up-to-date PR produces the same tree.
    • A hermetic formal leg that already failed on unchanged inputs is refuted in seconds. Re-running the job observes it again.
    • The SDK pull retries up to 4 times.
    • Legs upload only an outcome artifact.
    • The formal scope is unchanged from ci: run each formal obligation once per content identity #114.
  • factory.yml (new; workflow_run, runs from the default branch): turns outcomes into receipts on the factory-receipts branch.
    • Only runs from this repository are recorded, never forks.
    • No PR job gets a write token, and bootstrap stays read-only.
    • A receipt that carries an artifact expires a day before the artifact does.
  • release.yml:
    • Publishing refuses a tag that is not v<workspace version>. That stops the v0.2.0 trap, where the binaries reported 0.1.0.
    • Publishing is blocked unless all seven bootstrap legs passed on exactly that tree.
    • Native, wasm and bench are skipped when proved, and their artifacts are downloaded from the run that proved them.
    • A new dispatch mode, rehearsal, builds, benchmarks and packages without publishing. A tag of a rehearsed commit then only packages, publishes and dispatches Pages.
    • When a publish or Pages step fails, the next run re-runs only what is left.
    • Pages still deploys from main, because the github-pages environment refuses tags.
  • Export: client-export.mjs records the export identity in generated/rust/factory.identity.
    • The identity covers the import closure of Uorc.Client, the LexLean project files and the export scripts.
    • export-check and the script itself skip the ~95 min export when those inputs are unchanged. A registry edit does not touch that closure.
    • The record was written from history, not from a fresh export: no closure input has changed since uorc: ncm-only compress, ncm window frames, x86 filter, parallel block decode #125's export.
  • scripts/ci-receipt.sh is removed, and template.lock is updated for bootstrap.yml.

Checked locally

  • node --test scripts/factory.test.mjs: 6 pass. They cover the coverage rule, refuting vs observing again, the gate, receipt expiry, and weights staying in 1..16.
  • python3 -B tests/sdk-preflight/run.py: 17 pass.
  • cargo xtask validate: passes up to audit-bootstrap, which runs only in the SDK. audit-bootstrap passed in CI.
  • actionlint: clean.
  • Receipt publication was tested against a local bare remote over two runs: receipts append, duplicates are dropped, and weights update.

Not testable before merge

  • factory.yml and release dispatch only run from the default branch.
  • This PR's own runs observe everything and upload outcomes. The first receipts are written by the first run after merge.
  • Suggested check after merge: dispatch release with mode: rehearsal, ref: main.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Asa3LdDSxZc5dyuEbM7w7

Adopts the PrismPM factory route (PrismPM #566, #579-#581, #586) for uorc:
factory/graph.json declares each obligation's inputs; scripts/factory.mjs
computes its prism-factory/obligation/1 identity, routes it from receipts on
the factory-receipts branch (proved, refuted, blocked, observe) and keeps a
16-level weight per obligation.

- bootstrap and offline legs route by their own identities, refute a hermetic
  failure on unchanged inputs (a manual re-run observes it again), retry the
  SDK pull, and upload only their outcome.
- factory.yml (workflow_run, default branch) turns outcomes into receipts, so
  no pull-request job holds a write token.
- release.yml: refuses a tag that does not name the workspace version, requires
  the bootstrap gate on the tag's tree, reuses native/wasm/bench artifacts from
  the run that proved them, and gains a rehearsal mode, so a tag of a
  rehearsed commit only packages and publishes.
- client-export.mjs records the export identity (the Uorc.Client import
  closure and the LexLean project files) and skips an export whose inputs are
  unchanged.
- scripts/ci-receipt.sh is replaced.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3LdDSxZc5dyuEbM7w7
@afflom afflom self-assigned this Nov 10, 2026
…y outside prose files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Asa3LdDSxZc5dyuEbM7w7
@afflom
afflom merged commit 2800109 into main Nov 10, 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