Skip to content

ci: regenerate.yml, the write recipes on runners - #467

Merged
humuhumu33 merged 4 commits into
release/v0.4from
ci/regenerate-workflow
Nov 12, 2026
Merged

humuhumu33 merged 4 commits into
release/v0.4from
ci/regenerate-workflow

Conversation

@humuhumu33

@humuhumu33 humuhumu33 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Moves the landing regeneration off workstations. A change that moves committed output (the production export, the verification records, golden, fixtures, calculus targets, the model documents) has been regenerated on a contributor's machine: hours per PR, and repeated out-of-disk failures under WSL.

What it does

regenerate.yml (SPEC.md §9.4, new paragraph) is not part of the gate.

  • Started by a push. git push origin <commit>:refs/heads/regenerate/<name>. Use regenerate/atlas/<name> to include Atlas. Once the workflow is on main, gh workflow run regenerate.yml --ref <branch> [-f atlas=true] also works. The push trigger exists because GitHub dispatches only workflows that are on the default branch; I confirmed this on this branch (HTTP 404).
  • Three writer jobs at once, each from a clean checkout of that commit:
    • production-export-write;
    • verify-write, which covers every example but UOR Atlas, or every example with atlas=true;
    • golden-write fixtures-write calculus-write model-write.
  • Same profile as the examples leg. The jobs verify at width 2 with the committed hints and the 12 GiB budget. Per §22.11 this changes no written byte.
  • combine applies the three patches in turn to a clean checkout and fails if two of them write the same path. It uploads regenerated-<commit>, which holds the patch, its path list, the base commit and SHA256SUMS. The step summary prints the two commands to apply it.
  • finish writes everything that follows from the regenerated tree (added in f952ed564):
    • Counts. It runs, under LEXLEAN_COUNTS=fast, the parts of .github/bdd-parts.json that hold a crate::counts! check, then runs cargo xtask counts --write (Bootstrap count cases: report every moved count in one pass, and write them #442). Today those are the nine bootstrap parts, about 5 min.
    • Model documents. It runs validate-model --write.
    • Stack bounds (PD-08). It finds every recursive package (by the recursion effect in its provenance.json) that has no row in tests/stack-bounds.json. For each one, it runs the case whose source names the package's root, in measure mode. That is a whole run of the case, so it also checks the counts just written. Rows of packages no longer exported are dropped.
    • Upload. It uploads regenerated-<commit> with the writer's report in the step summary. Anything the writer could not place is listed there for a reader.
    • Before Bootstrap count cases: report every moved count in one pass, and write them #442 lands, a tree without crate::counts! checks skips the counts step and says so.
  • Writes nothing to the repository. It has contents: read, keeps no credentials, and pins actions by SHA, with the same pins as ci.yml. The patch is reviewed and committed like any written output (§28.3), and the gate then verifies that tree.

Measured effect

Run 43027788154 took 85 minutes from start to finish:

Job Time
Production export 45 min
Records (without Atlas) 83 min
Oracles 27 min
Combine under 1 min

The previous single-job runner writer took 158 minutes (run 42757642108). Local WSL regenerations took longer and ran out of disk. The records job is now the slowest of the three; splitting it by example would be the next cut. A run that includes Atlas has not been measured.

Verified

  • cargo xtask validate-model: documents current, 482 ids.

  • cargo xtask validate-spec-links: passed.

  • cargo test -p repo-conformance --test conformance -- conformance_rp_: 17/17 pass, including RP-08 (deferral audit) and RP-14 (workflow triggers).

  • The test run on GitHub passed with an empty patch. It ran 43027788154 on release/v0.4 plus this workflow. regenerated.patch and regenerated-files.txt are both 0 bytes, so every writer reproduces the committed output byte for byte, including the production export at width 2.

  • Test of the full pipeline, with finish: run 43106639628, on release/v0.4 plus Bootstrap count cases: report every moved count in one pass, and write them #442 plus this workflow, finished with an empty patch.

    • Writers: export 54 min, records 67 min, oracles 24 min.
    • finish (7 min): it chose the nine bootstrap parts that hold a counts! check, all of which exited 0 under LEXLEAN_COUNTS=fast. The writer reported counts: no count moved, and every recursive package already had its row.
    • About 95 min from push to artifact.

Reviewer notes

  • The writers' paths are assumed disjoint. The two record writers write expected/verify and expected/build, which are disjoint. combine checks every overlap rather than assuming it.
  • The stack lookup was tested against real trees. print_tooling_module maps to conformance_bs_27, and print_generic maps to conformance_bs_24 (each file's first //! line names its own case). A package whose root no case names fails the step with a message to measure it by hand.

🤖 Generated with Claude Code

humuhumu33 and others added 2 commits November 11, 2026 13:16
A dispatch on a ref runs the production export, the verification records and
the other oracle writers as three jobs from clean checkouts of that commit, and
a final job combines their patches into one, refusing two that write one path.
It reads the repository and writes nothing to it; the patch is reviewed and
committed like any other written output (§28.3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub dispatches only a workflow its default branch carries, so a push to a
branch under regenerate/ starts it from any commit; regenerate/atlas/ includes
UOR Atlas's records.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@afflom afflom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bounded source review of a66bd0c against bc71b33.

P2 — enforce the promised shared-path rejection in .github/workflows/regenerate.yml:128–132. The writer saves each .files manifest, but combine never reads or intersects them: it only applies the three patches sequentially. Two patches changing distant hunks of the same existing file both pass git apply --index; I confirmed this in an isolated Git fixture. Thus a successful combine does not establish the path disjointness promised by the workflow comments and SPEC §9.4. Please reject duplicate paths across the parts before applying them, preserving binary-patch support.

The official write recipes and separate final gate remain intact. The current smoke run is still pending, and draft CI skips the required host/Atlas groups; neither establishes final acceptance. Also, verify-write checks existing locks rather than producing them, so this workflow still requires correctly prepared inputs when identity or configuration changes. This is review feedback for the existing owner; no competing writer or qualification run was launched.

afflom commented Nov 11, 2026

Copy link
Copy Markdown
Member

The project owner has made PrismPM's Prism/factory integration an explicit LexLean v0.5 release requirement, now tracked in #468 and #128. I inspected published PrismPM v0.4.0 at b48ee2: it ships modeled source/build evidence reuse; the broader certified scheduler in PrismPM#586 remains unmerged.

This preserves your ownership of #467's writers, collision repair and qualification. Root will own the separate LexLean factory model/evidence-contract integration and coordinate the exact adapter/file boundary before overlapping changes. #467 is the producer lane to reuse, not a reason to launch another regeneration workflow. The eventual supported developer path must use the model's routing and retire duplicated orchestration while retaining all proof/full-head/host/Atlas/repro requirements. Current producer runs and their evidence remain untouched.

humuhumu33 and others added 2 commits November 11, 2026 21:04
…bounds

A fourth job, after combine, applies the regenerated tree, runs the parts
that hold a crate::counts! check under LEXLEAN_COUNTS=fast, writes the moved
counts (cargo xtask counts --write) and the model documents, and measures the
stack bound of each recursive package the record lacks with a whole run of
the case that names its root. The patch it returns is the whole landing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@humuhumu33
humuhumu33 merged commit dc4434e into release/v0.4 Nov 12, 2026
16 checks passed
humuhumu33 added a commit that referenced this pull request Nov 12, 2026
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