Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
f48535d
Write long literals as balanced halves and keep a guarded row's binde…
claude Nov 15, 2026
617d85d
Pin the SDK that reads a feature's lists as balanced appends
claude Nov 16, 2026
1faa47e
Merge main, which counts the route table against the translator's routes
claude Nov 16, 2026
c35a96c
Export, take in, ratchet and agree for any workspace under its own pr…
claude Nov 16, 2026
3dc64cf
Write the work queue into the register and the frontier, and the lift…
claude Nov 16, 2026
d9f563a
Name the leaf of a type outside the lift and read the type forms unde…
claude Nov 16, 2026
5af585b
Bound a package's name, adapt any workspace's functions and run every…
claude Nov 16, 2026
75267ff
State why a name that reads as no one type stays outside the lift
claude Nov 16, 2026
baef8db
Write a module beyond the stated file limit in parts where its record…
claude Nov 16, 2026
8b685d7
Lift trait implementations' methods and read out-of-line test modules…
claude Nov 16, 2026
2dc8a75
Expect a three-item list of the fixture in the balanced form
claude Nov 16, 2026
94c41be
Merge remote-tracking branch 'origin/main' into claude/project-thread…
claude Nov 16, 2026
3651397
Merge branch 'lane/production' into claude/project-thread-hboh76
claude Nov 16, 2026
376f1ab
Merge branch 'lane/iris' into claude/project-thread-hboh76
claude Nov 16, 2026
65e50f0
Resolve calls and imported types by the language's name resolution be…
claude Nov 16, 2026
5de28cb
Merge the signatures lane with the types lane
claude Nov 16, 2026
381d2c7
Merge the work-queue lane
claude Nov 16, 2026
9aaabaf
Merge the name-resolution lane
claude Nov 16, 2026
81afd20
Regenerate the fixture's projection with the merged lanes
claude Nov 16, 2026
b4e61b2
Keep the tool's own lifted functions lifted across the merged lanes
claude Nov 16, 2026
cdb05f0
Rewrite the workspace's lift register for the merged lanes
claude Nov 16, 2026
5e4d9b9
Report a register's misstated totals and an unparsed file without an …
claude Nov 16, 2026
9b548a6
Regenerate the self-model for the merged lanes' source lines
claude Nov 16, 2026
3154978
Read a register's rows apart from the totals it states
claude Nov 16, 2026
7ac726d
Regenerate a pull request's generated files on its own branch
claude Nov 16, 2026
ae5584a
Estimate the translator ratchet before a push, without the MIR dump
claude Nov 16, 2026
e4354df
Repair the branch regeneration after review
claude Nov 16, 2026
00e2795
Merge main: the certified translator landed there, and its workflow
claude Nov 16, 2026
e86170d
Regenerate the generated files
github-actions[bot] Nov 16, 2026
cad281e
Start a branch's writers and export on purpose, never by a push
claude Nov 16, 2026
cc3a151
Carry every certified root whose export identity is unchanged, and bu…
claude Nov 16, 2026
fd5148f
Regenerate the self model
claude Nov 16, 2026
b4eceb3
Install the upstream Prism factory with the tool's graph
claude Nov 16, 2026
f8bbf97
Declare the cargo configuration as a manifest and fail a run that lea…
claude Nov 16, 2026
4621d40
Carry a certified root only under every input its build reads
claude Nov 16, 2026
08bd2ff
Regenerate the self model
claude Nov 16, 2026
ad3b0b9
Declare what each obligation reads, give a closure its base, and keep…
claude Nov 16, 2026
4f0d357
Merge the factory into the keyed export
claude Nov 16, 2026
972a9c6
Lift the translator's own unit-value, library-path and field-name rea…
claude Nov 16, 2026
9bf3030
Rebuild the certified translator, recording each root's export identity
claude Nov 16, 2026
eb9e680
Regenerate the self model
claude Nov 16, 2026
3845f38
Merge the first keyed export
claude Nov 16, 2026
831acd1
Merge the lifted readers of the translator
claude Nov 16, 2026
cd4711e
Certify the nine translator functions that now lift
claude Nov 16, 2026
3ddfec0
Merge main's closure-keyed carry into the keyed export, leaving one m…
claude Nov 16, 2026
40144df
Regenerate the generated files
claude Nov 16, 2026
6c5e211
Merge main and the one carry of certified roots
claude Nov 16, 2026
a9db62a
Regenerate the self model and the lift register after the merge
claude Nov 16, 2026
0556c1c
State the compiler each keyed test builds with, so the suite agrees w…
claude Nov 16, 2026
edf8e69
Record the export of the merged tree: 140 roots carried, 27 built
claude Nov 16, 2026
eb4de1f
Merge commit '0556c1c' into out6
claude Nov 16, 2026
12bc312
Merge main: the core register as main regenerated it, the certified m…
claude Nov 16, 2026
0359180
Read a call in the lift as admission resolved it, and give UE-03 a ca…
claude Nov 16, 2026
c6b5259
Read the frontier's refusal and residue rows, not reason texts
claude Nov 16, 2026
945f9ee
Count the product code of the workspace's members, as cargo does
claude Nov 16, 2026
1b67b4d
Hold the plan's whole line, with the counts it now prints
claude Nov 16, 2026
41952ae
Merge branch 'fix6/amb' into out6
claude Nov 16, 2026
01bfe03
Merge branch 'fix6/tests' into out6
claude Nov 16, 2026
b9e88fa
Keep the closure value in the manifest's round-trip test
claude Nov 16, 2026
87c8d82
Bind every module a root's imports reach into its identity, not only …
claude Nov 16, 2026
6967ebe
Regenerate the lift register and record the export of this tree
claude Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "UOR PrismPM SDK",
"image": "ghcr.io/afflom/prismpm-sdk-patched@sha256:c74e492aeac97208f83cfdddf40e1a43592b2280bd95f217255ac6bfbf7f8cd0",
"image": "ghcr.io/afflom/prismpm-sdk-patched@sha256:c1bfe8d5d3b3473a2c2ca6fdd417158a3e9f5fff3b24dcbf587fe21d6fd9b635",
"containerUser": "root",
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"workspaceFolder": "${localWorkspaceFolder}",
Expand Down
41 changes: 35 additions & 6 deletions .github/workflows/certified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
# commits (`just ratchet`), and the differential and fixpoint (`just
# certified-gate`), whose outputs are compared by their κ, never by an exit
# code. The last job requires both architectures' κ to be equal.
#
# On a branch, generate.yml dispatches this with land_branch only when it was
# itself dispatched there with `export` and the branch's translator has more
# uncertified functions than main's (no push to a pull request starts it):
# the export runs on the branch's head, the land takes it onto the branch
# merged onto main (scripts/ci/merge-main.sh) and pushes that merge to the
# branch (scripts/ci/push-branch.sh), never to main, then dispatches
# generate.yml on the branch, which regenerates and gates it.
name: certified

on:
Expand All @@ -23,6 +31,11 @@ on:
- 'Justfile'
- '.github/workflows/certified.yml'
workflow_dispatch:
inputs:
land_branch:
description: On a branch other than main, land the export on that branch as its merge onto main.
type: boolean
default: false

permissions:
contents: read
Expand All @@ -31,8 +44,9 @@ permissions:
# One run at a time, never cancelled: an export takes longer than main stays
# still, so cancelling in progress meant no export ever finished. GitHub keeps
# the newest waiting run; it runs next, on the newest main (as generate.yml).
# Each branch is its own queue, so a branch's export (which lands nothing) is
# never replaced by main's newer runs, nor holds them back.
# Each branch is its own queue, so a branch's export (which lands nothing
# unless it was dispatched with land_branch) is never replaced by main's
# newer runs, nor holds them back.
concurrency:
group: certified-${{ github.ref }}
cancel-in-progress: false
Expand Down Expand Up @@ -166,9 +180,11 @@ jobs:
land:
name: take the shards in and land the certified translator
needs: [plan, export]
# Only main lands: a dispatch on another branch exports its shards for a
# local `just certified-sync` of that branch, and pushes nothing.
if: ${{ !cancelled() && needs.plan.result == 'success' && github.ref == 'refs/heads/main' }}
# main lands on main. A dispatch on another branch exports its shards for
# a local `just certified-sync` of that branch and pushes nothing, unless
# it was dispatched with land_branch: then it lands on that branch only
# (never a tag, never main).
if: ${{ !cancelled() && needs.plan.result == 'success' && (github.ref == 'refs/heads/main' || (inputs.land_branch && startsWith(github.ref, 'refs/heads/'))) }}
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
Expand All @@ -192,6 +208,16 @@ jobs:
with:
pattern: shard-*
path: target/uorust-certified
- name: Merge the branch onto main's head, where the sync takes the shards
if: github.ref != 'refs/heads/main'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
BRANCH: ${{ github.ref_name }}
# A conflict in crates/certified takes main's: the sync rewrites it.
TAKE_CERTIFIED: '1'
# Status 2: the branch holds nothing main lacks, and nothing lands.
run: scripts/ci/merge-main.sh || [[ $? == 2 ]]
- name: Take the shards into crates/certified through the locked SDK
shell: bash
run: scripts/ci/sdk.sh 'just certified-sync'
Expand Down Expand Up @@ -220,14 +246,17 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
REBASE: '1'
BRANCH: ${{ github.ref_name }}
INPUTS: 'crates/uorust/src/** crates/uorust/assets/** crates/uorust/Cargo.toml frontier.toml lift-verdicts.toml Cargo.lock rust-toolchain.toml prismpm.lock Justfile .github/workflows/certified.yml'
run: scripts/ci/land-certified.sh "$((STARTED + LAND_BY_MINUTES * 60))"

gate:
name: ratchet, differential and fixpoint / ${{ matrix.runner }} / run ${{ matrix.run }}
needs: land
# A shard that failed fails only its roots: the gate runs on what landed.
if: ${{ !cancelled() && needs.land.result == 'success' }}
# main's only: a branch's land is gated by the bootstrap run generate.yml
# dispatches on it, and its packages here when they land on main.
if: ${{ !cancelled() && needs.land.result == 'success' && github.ref == 'refs/heads/main' }}
strategy:
fail-fast: false
matrix:
Expand Down
58 changes: 56 additions & 2 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@
# run re-decides the MIR path's translations (`uorust prove`) and publishes the
# lift's honesty report: how many functions lifted, and the residue by the MIR
# kind or obligation that stopped it.
#
# A branch of this repository gets the same writers only when a person
# dispatches this workflow on it (scripts/ci/generate-branch.sh): they run on
# the branch merged onto main, and what changed is pushed to the branch as
# that merge (first parent main), never to main or to a fork; the gate is
# dispatched on it, and the certified export too when `export` is given and
# the translator's uncertified functions outnumber main's. No push to a pull
# request starts it: these runs repeat every writer and every export whatever
# changed, so until each is an obligation keyed on its own inputs they are
# started on purpose, never by a push.
name: generate

on:
Expand All @@ -17,7 +27,16 @@ on:
# Hourly, so the brand follows uor.foundation without a push here.
schedule:
- cron: '41 * * * *'
# A dispatch on a branch (a person's, or certified.yml's land): gh workflow
# run generate.yml --ref <branch>, with -f export=true to also dispatch the
# certified export when the ratchet grows; the merge takes main's side of
# the generated files.
workflow_dispatch:
inputs:
export:
description: On a branch other than main, also dispatch the certified export when the ratchet grows.
type: boolean
default: false

permissions:
contents: read
Expand All @@ -26,18 +45,39 @@ permissions:
# and only the newest of the pushes that land meanwhile runs next (GitHub
# keeps one pending run per group). Cancelling in progress meant a steady
# stream of pushes starved every run and nothing was ever regenerated.
# A pull request's branch is a queue of its own (its pushes and the runs
# dispatched on it), so it neither waits for main's nor replaces them. A
# pull request the job skips (from a fork, into another base, Dependabot's)
# gets a group of its own run, so it never replaces a branch's pending run.
concurrency:
group: generate
group: >-
${{ github.ref == 'refs/heads/main' && 'generate' ||
(github.event_name == 'pull_request' &&
(github.event.pull_request.head.repo.full_name != github.repository ||
github.event.pull_request.base.ref != 'main' ||
github.event.pull_request.user.login == 'dependabot[bot]')) &&
format('generate-skipped-{0}', github.run_id) ||
format('generate-branch-{0}', github.head_ref || github.ref_name) }}
cancel-in-progress: false

jobs:
generate:
name: run every writer and push what changed
runs-on: ubuntu-24.04
timeout-minutes: 120
# Main; a pull request into main from a branch of this repository that a
# person (not Dependabot, whose token is read-only) opened; a dispatch.
if: >-
github.event_name != 'pull_request' ||
(github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.base.ref == 'main' &&
github.event.pull_request.user.login != 'dependabot[bot]')
permissions:
contents: write
actions: write
env:
# What the writers write, which both steps commit.
WRITTEN: CONFORMANCE.md README.md app model brand crates xtask frontier.toml lift-verdicts.toml
steps:
- name: Check out the exact event revision
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
Expand All @@ -49,14 +89,28 @@ jobs:
# main in this job (decided verdicts carry over), so what lands is
# always the output of the tree it lands on and no push is lost.
- name: Run every writer on main as it is, and push what changed
if: github.ref == 'refs/heads/main'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GENERATE_BUDGET: '4200'
run: |
scripts/ci/generate-loop.sh "Regenerate the generated files" \
"CONFORMANCE.md README.md app model brand crates xtask frontier.toml lift-verdicts.toml" \
"$WRITTEN" \
bootstrap.yml pages.yml certified.yml
# Never main: the scripts refuse BRANCH main, and push only to it. A
# dispatch on a tag runs neither step.
- name: Run every writer on the branch merged onto main, and push the merge to the branch
if: github.ref != 'refs/heads/main' && (github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/'))
shell: bash
env:
GH_TOKEN: ${{ github.token }}
BRANCH: ${{ github.head_ref || github.ref_name }}
EVENT: ${{ github.event_name }}
EXPORT: ${{ inputs.export == true }}
run: |
scripts/ci/generate-branch.sh "Regenerate the generated files" \
"$WRITTEN"
- name: Publish the lift's honesty report
if: always()
shell: bash
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/translator-pin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ concurrency:
jobs:
pin:
name: pin the translator holo app/ builds
# Not after a pull request's generate run: its head branch may be a
# fork's named main, which the branch filter above lets through.
if: github.event_name != 'workflow_run' || github.event.workflow_run.event != 'pull_request'
runs-on: ubuntu-24.04
timeout-minutes: 90
permissions:
Expand Down
6 changes: 6 additions & 0 deletions CONFORMANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ model does not sanction.
| `UE-18` | `build` | The translator certifies itself: every function of uorust::mir, lift and lex the self register records as lifted is a production root of the self projection, `uorust certify production` exports them with `lexlean production build` (each root the compiler finds ineligible refused with its diagnostic) and replays the bundle with verify-artifact, `uorust certify sync` takes every certified package source into crates/certified byte for byte as the bundle records its SHA-256 with a manifest keying each root by the κ of the Rust function it certifies and the share of the translator reachable from the translate entry that is certified, a hand-written function runs its certified package in place of its body unless `--translator hand` is given, the core register and the self projection and register the certified and the hand-written translator write are required to have equal κ on amd64 and arm64, twice each, and a commit under which more translator functions are uncertified than under its parent is refused, naming each new one with its cause |
| `UE-19` | `build` | Every body of core's MIR is embedded in LexLean: `uorust embed` writes each body, never refusing one, as a value of the MIR datatype that one fuel-indexed small-step evaluator over frames of values runs, with calls the linker resolves as data and a callee a trait bound leaves abstract named for the caller's dictionary; the constructs the evaluator does not define are read from its own source and every register row carries its embedding's digest and the constructs blocking it, ranked by the bodies they block; and core's stable scalar methods whose closure the evaluator defines are run on inputs drawn from their types' widths both by rustc's build of core and by the evaluator, a theorem per case that `lexlean verify` decides, so a disagreement fails naming its body |

## factory

| ID | Level | Statement |
| --- | --- | --- |
| `UE-20` | `build` | The gate, the writers and the certified export are obligations of the upstream Prism factory installed under prism-factory/: its engine, standard library and identity protocol are upstream's at the revision prism-factory/upstream.toml names and an installed file that differs from what that record states is refused, the graph's one source is prism-factory/graph.toml with the Justfile's recipe bodies and a model text or table that differs from what graph.py writes from them is refused, no obligation reads the whole tree, one run in the SDK declares the lock that pins the image and the launcher, the certified plan routes each obligation proved, observe, refuted or blocked from receipts of its identity, a test target that names or a compiled source that embeds a tracked file its obligation does not declare is refused before the plan, each obligation runs in a closure that is its own repository whose parent holds exactly the base entries it declares, under a work directory no cargo or rustup configuration sits above, a command stopped by a signal leaves no receipt, and one run at a time holds the receipt store |

## self-model

| ID | Level | Statement |
Expand Down
48 changes: 45 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,23 @@ certified-project:
lexlean production targets --diagnostic-format json >crates/certified/targets.json

# One export of the projection's roots, all of them or shard `I-N` (every Nth
# from the Ith), kept in target/uorust-certified for `certified-sync`.
# from the Ith), kept in target/uorust-certified for `certified-sync`. A root
# the prior manifest certified at its identity (the root's closure, the
# compiler, the descriptor, the project's configuration and linked packages)
# is carried from crates/certified byte for byte and never built again, once
# the project verifies: a build of this export that published verified it, or
# one verification with a single root marked does when none did.
certified-export shard="" within="":
rm -rf target/uorust-certify target/uorust-certified
cargo run -q --locked -p uorust -- certify production --projection target/uorust-self --register frontier.toml --targets crates/certified/targets.json --out target/uorust-certify --kept target/uorust-certified --prior `ls target/certified-prior/manifest.toml 2>/dev/null || echo crates/certified/manifest.toml` --carry crates/certified {{ if within == "" { "" } else { "--within " + within } }} {{ if shard == "" { "" } else { "--shard " + replace_regex(shard, "-.*", "") + " --shards " + replace_regex(shard, ".*-", "") } }}

# The shards a sharded export builds within `budget` seconds each, and the
# roots to diagnose, as JSON (certified.yml's plan job).
# roots to diagnose, as JSON (certified.yml's plan job), with the counts of
# roots carried, to build and refused. Without the self projection (the plan
# job has none) no identity is known: `carried` is null and every root not
# refused is planned as built.
certified-plan budget:
cargo run -q --locked -p uorust -- certify plan --register frontier.toml --prior `ls target/certified-prior/manifest.toml 2>/dev/null || echo crates/certified/manifest.toml` --budget {{budget}}
cargo run -q --locked -p uorust -- certify plan --register frontier.toml --prior `ls target/certified-prior/manifest.toml 2>/dev/null || echo crates/certified/manifest.toml` --budget {{budget}} --carry crates/certified `test -d target/uorust-self && echo --projection target/uorust-self --targets crates/certified/targets.json || true`

# Build one root alone and keep all lexlean prints of it in
# target/certified-diagnose/build.log (certified.yml's diagnose job).
Expand Down Expand Up @@ -294,6 +302,40 @@ certified-gate out="target/certified-gate":
hooks:
git config core.hooksPath scripts/hooks

# The factory (prism-factory/, the upstream Prism factory with this tool's
# graph): every part of the gate, every writer and the certified export is an
# obligation keyed on its declared inputs, and the certified core decides what
# is proved, what to run, what is refuted and what waits. These run on the
# machine that launches the SDK (prism-factory/sdk.sh), never inside it.
# FACTORY_RECEIPTS names the receipt store, a directory outside the worktree
# and the target directory, so receipts outlive both.

# The factory-model obligation: the factory checks itself.
factory-model:
bash prism-factory/check.sh

# The factory-upstream obligation: every installed file of prism-factory/ holds
# to upstream's at the revision prism-factory/upstream.toml names (it fetches it).
factory-upstream:
bash prism-factory/upstream.sh

# Each obligation's route (proved, observe, refuted, blocked) and how many are left.
factory-plan:
prism-factory/factory.sh routes

# Plan and run to the fixed point; a second run on the same tree runs nothing.
factory *only:
prism-factory/factory.sh run {{only}}

# The same, detached: its log and its one-line status are kept beside the receipts.
factory-start *only:
prism-factory/factory.sh start {{only}}

# The status of the last detached run: `running`, then `done <exit code>` or
# `interrupted <signal>` and the counts; `stale` when its process is gone.
factory-status:
prism-factory/factory.sh status

# The content standard (scripts/content/standard.json) on an assembled site.
content site="site":
node scripts/content/enrich.mjs {{site}}
Expand Down
Loading
Loading