Repository navigation
chore: ci: tag-build dispatch, no fork release assets, tests without LEAN_GITHASH - #6
Conversation
…THASH
This member changes only `.github/`.
A dispatch of `ci.yml` with the new input `release_tag` builds as the run on
that tag would, before the tag exists:
gh workflow run ci.yml --ref <branch> -f release_tag=v4.36-machcsl-r21
The step "Check for custom releases" of `configure` gives the input as its
output, so the run has check level 3, `stamped` builds, the job matrix and
target stage of the tag's run, and the same CMake options: a fork's tag gives
the build no `RELEASE_TAG` and no special version, so in both runs the version
stamp is the commit's githash. "Pack" compresses as on a tag. `IS_NIGHTLY` is
false whenever `release_tag` is set: the `action` input defaults to "release
nightly", and a dispatch with `release_tag` must take no nightly path.
The `release` job runs only on a tag push to leanprover/lean4. On a fork it
attached the CI's build artifacts to the tag's release. A fork's release holds
only the files that are published by hand (on theorem-labs/lean4, the measured
tarball and its `.sha256`), so the job no longer runs there. A dispatch is no
tag push, so it publishes nothing.
The steps "Test" and "Check rebootstrap" run the tests without `LEAN_GITHASH`.
The step "Build Stage 0 & Configure Stage 1" writes it to `GITHUB_ENV` (line
158 of build-template.yml at the trunk, line 163 in v4.36-machcsl-r20) from
`build/stage1/lake-githash`: the stage0 tree hash. `stdlib.make` passes that
value to the core build itself; the Lake cache steps (Download, Upload and
Verify Lake Cache, which run `build/stage0/bin/lake`) take it from the job's
environment (leanprover#14486). A stamped build runs none of these cache
steps (`lake-cache` is `!stamped`).
The tests of stage 2 (and of stage 1) do not need it: they run that stage's own
Lake and Lean, and with no override Lake takes the githash of that Lean (`lean
--githash`), as it does outside CI. Both stages are built with `USE_GITHASH`,
so that githash is the commit's, and the override names another Lean. Under
it, Lake scopes its remote cache by the override and queues, claims and reads
nothing remote (`remoteCacheQueueService?` in `Lake/Config/Env.lean`). That
failed the Lake tests inputLockClaims (cases 9a and 9b), remoteCacheClaim,
remoteCacheRead, remoteCacheRefused, remoteCachePush and usageCutoffRemote in
the job "build / Linux release" on the tag v4.36-machcsl-r20. Outside CI, the
runner's value of the variable gives the same failures, and without it the
tests pass (remoteCachePush's failing check needs a CMake build to reach). The
tests ran without the variable before leanprover#14486. "Check
rebootstrap" (which the Linux release job runs at check level 1 and up, so on a
tag, after "Test") exported the new stage0 hash for its stage 1 tests as a
defensive measure against stale builds (leanprover#14575). Without the
override Lake still keys every trace by the githash of the Lean it runs, which
the update-stage0 commit changes, so no test reuses a stale build.
Part of LINUX-1736.
Omp-Session: 01a21fea-50cc-71ef-b840-72b8c7ab62bb
Legion-Role: implementer
…ntegration The heads of the pull requests that make r21's CI member and its -r21 copies, merged on the first integration commit: #6 (the CI member, on the trunk), #7 (remoteExec, usageCutoffCrossTree and cacheInsertPartial in the service-mode member), #8 (cacheInsertPartial in the cache-insert member), #9 (ccIdentity), #10 and #11 (usageCutoffCrossTree in the two pack members) and #12 (the Windows declaration in the lazy-import-names member). The merge needs no resolution: its tree is the first integration commit's tree with each pull request's change, and where two of them make the same change (usageCutoffCrossTree's writable lakefile, cacheInsertPartial's preload) that change once. Refs: LINUX-1736 Omp-Session: 01a21fea-50cc-71ef-b840-72b8c7ab62bb Legion-Role: implementer
Review of the previous commit found that the `release_tag` input reached `GITHUB_OUTPUT` as typed, and that "Set check level" put that output into its Bash source: a line break could change the step's outputs, and shell metacharacters could change what Bash runs. "Check for custom releases", the only step that reads the input, now takes it as environment data and refuses it unless it is a tag name: `v` and then letters, digits, `.`, `_` or `-` (`^v[0-9A-Za-z._-]+$`). The error names the rule and prints the refused value escaped with `printf %q`, on one line. "Set check level" no longer reads the tag text: it reads whether that step gave a tag, as the Boolean `CUSTOM_RELEASE`. This also covers a fork's tag push, whose name the step passed into Bash source in the same way. The other places that read the input (`IS_NIGHTLY` in `configure`, "Pack" in build-template.yml) use it only in a Boolean expression. The input is for forks. On leanprover/lean4 the step refuses it with an error, where before such a dispatch silently built at check level 1; the input's description says so. A dispatch with `release_tag` has a concurrency group of its own (the group gets the suffix `-release-tag`), so that it and a nightly re-release dispatch on the same ref no longer cancel each other. Part of LINUX-1736. Omp-Session: 01a21fea-50cc-71ef-b840-72b8c7ab62bb Legion-Role: implementer
…tion The new heads of three pull requests after their review, merged on the previous integration commit: #6 (the CI member: `release_tag` is checked in the one step that reads it and later steps read a Boolean), #7 and #8 (cacheInsertPartial's preload forwards `syscall` without reading its arguments and holds the C library's stat entry points too). The merge needs no resolution: its tree is the previous integration commit's tree with the two changed files of these pull requests. Refs: LINUX-1736 Omp-Session: 01a21fea-50cc-71ef-b840-72b8c7ab62bb Legion-Role: implementer
|
Review pass by a reviewer of another model family (openai/gpt-6.2-sol), read-only, against the change's rules: CI changes only under
|
… on 64 GB The decision on the jobs of the fork's tag build other than Linux release (LINUX-1736, E3(5)), applied in the build matrix of `configure`. "The fork's tag build" is a fork's tag push or a dispatch with `release_tag`: the runs in which "Check for custom releases" gives a tag, which the matrix script now reads as the Boolean `forkTag`. On every other event (pull_request, merge_group, a push to master, schedule, a nightly, leanprover/lean4's own tags) the matrix is unchanged. - macOS aarch64 and Windows: not tested in the fork's tag build; they still build there, as a compile check. With `test` false their Test step does not run, nor the steps that only read its results (Protect and Unprotect Source Tree, Check Source Tree Clean, Embed Test Output, Test Summary, Check Test Binary, all conditioned on `matrix.test` or on the Test step's conclusion in build-template.yml, which is unchanged). The fork publishes no macOS or Windows build. On r20's tag 27 Lake tests and elab/openssl.lean failed on macOS aarch64: the fork's Lake tests assume GNU tools and a newer bash than macOS's bash 3.2, and the runner's OpenSSL is 4. The fork's tests assume a POSIX system, so Windows failed 40 tests in a rehearsal of r21's tag build; #12 keeps its build working. - Linux tsanitize: in theorem-labs/lean4's tag build it runs on the GitHub larger runner `ubuntu-24.04-16core` (16 CPUs, 64 GB). On ubuntu-latest the runner was lost about 39 s into elab/async_http_h1_incremental.lean, on r20's tag and on the rehearsal; upstream gives this job 32 CPUs and 64 GB. A probe run on theorem-labs/lean4 (run 46126841398, 2026-11-28) got that label in the organization's runner group `proofs`, with 16 CPUs and 62 GiB as `free -g` counts. Elsewhere (sjawhar/lean4, where the label does not exist) the job keeps ubuntu-latest. Its `-j2` stays: the bound is the memory of the TSAN tests, and 64 GB is upstream's memory too. The job has no `timeout-minutes` of its own (GitHub's 360 minutes); it built in about 54 minutes on the 4-CPU hosted runner. - Linux aarch64 and Linux fsanitize are unchanged. Part of LINUX-1736. Omp-Session: 01a21fea-50cc-71ef-b840-72b8c7ab62bb Legion-Role: implementer
Review of the previous commit found that a `workflow_dispatch` from a tag ref without `release_tag` (for example a nightly re-release, the `action` input's default) also counted as the fork's tag build: "Check for custom releases" runs on any tag ref of a fork and gives the ref's tag name, so `forkTag` was true, and that dispatch lost the tests of macOS aarch64 and Windows and, on theorem-labs/lean4, moved Linux tsanitize to the larger runner. `forkTag` now also requires a tag push (`push` of a `refs/tags/` ref) or a dispatch whose `release_tag` is not empty. The check level is selected as before. The comment on Linux tsanitize now says only what is known: on ubuntu-latest the runner was lost about 39 s into elab/async_http_h1_incremental.lean (on r20's tag and on a rehearsal of r21's), the larger runner is for its memory, the probe run 46126841398 got `ubuntu-24.04-16core` on theorem-labs/lean4, so the workflow selects it only there, and the job keeps upstream's `-j2`, which upstream uses on 64 GB, the same memory. It no longer says that the label exists nowhere else, nor that memory bounds the tests. Rendered with the matrix script of `configure`: a tag push on theorem-labs/lean4, a `release_tag` dispatch on sjawhar/lean4 and a pull request give the same matrix as with the previous commit; a dispatch from a tag ref without `release_tag`, on either repository, gives the matrix of the commit before it again. Part of LINUX-1736. Omp-Session: 01a21fea-50cc-71ef-b840-72b8c7ab62bb Legion-Role: implementer
|
Review pass, rounds 5 and 6 (openai/gpt-6.2-sol, a reviewer of another model family, read-only) of the fork tag build's job changes (LINUX-1736, E3(5)).
|
…tegration The new head of #6 (two commits after its review: in the fork's tag build macOS aarch64 and Windows build without tests, and Linux tsanitize runs on the larger runner on theorem-labs/lean4; only a tag push or a dispatch with `release_tag` is such a build), merged on the previous integration commit. It needed no resolution: the change is ci.yml alone. Part of LINUX-1736. Omp-Session: 01a21fea-50cc-71ef-b840-72b8c7ab62bb Legion-Role: implementer
The pull requests within the fork failed at `Upload Lake Cache`, before their tests ran. The step's condition leaves out only pull requests from other repositories, but the fork has neither the secret LAKE_CACHE_KEY nor the variable LAKE_CACHE_ENDPOINT. So `lake cache put` ran with an empty key and the endpoint `/a1`, and stopped with "curl produced invalid JSON ... Enter host password" and "URL using bad/illegal format", exit 1. The step now also needs `vars.LAKE_CACHE_ENDPOINT != ''`. Where the variable is set, as on leanprover/lean4, nothing changes. `Verify Lake Cache` and `Restore Build` run only after a successful upload, so they are skipped too. `Download Lake Cache` stays as it is: it reads Reservoir, not that endpoint, and it is `continue-on-error` (on the fork it stops in about two seconds with "no outputs found for any revision"). Part of LINUX-1736. Omp-Session: 01a21fea-50cc-71ef-b840-72b8c7ab62bb Legion-Role: implementer
|
Review pass, round 9 (openai/gpt-6.2-sol, a reviewer of another model family, read-only) of head |
… integration The new head of #6: build-template.yml's `Upload Lake Cache` also needs the repository's cache endpoint, which the fork lacks, so a pull request within the fork no longer fails there before its tests. Tag builds never ran that step. Merged on the previous integration commit with no resolution. Part of LINUX-1736. Omp-Session: 01a21fea-50cc-71ef-b840-72b8c7ab62bb Legion-Role: implementer
|
Release rehearsal: run 46160867934 passed on integration commit |
4d03d61
into
fork/v4.36-ci-tag-r21
This member changes only
.github/.A dispatch of
ci.ymlwith the new inputrelease_tagbuilds as the run onthat tag would, before the tag exists:
The step "Check for custom releases" of
configuregives the input as itsoutput, so the run has check level 3,
stampedbuilds, the job matrix andtarget stage of the tag's run, and the same CMake options: a fork's tag gives
the build no
RELEASE_TAGand no special version, so in both runs the versionstamp is the commit's githash. "Pack" compresses as on a tag.
IS_NIGHTLYisfalse whenever
release_tagis set: theactioninput defaults to "releasenightly", and a dispatch with
release_tagmust take no nightly path.The
releasejob runs only on a tag push to leanprover/lean4. On a fork itattached the CI's build artifacts to the tag's release. A fork's release holds
only the files that are published by hand (on theorem-labs/lean4, the measured
tarball and its
.sha256), so the job no longer runs there. A dispatch is notag push, so it publishes nothing.
The steps "Test" and "Check rebootstrap" run the tests without
LEAN_GITHASH.The step "Build Stage 0 & Configure Stage 1" writes it to
GITHUB_ENV(line158 of build-template.yml at the trunk, line 163 in v4.36-machcsl-r20) from
build/stage1/lake-githash: the stage0 tree hash.stdlib.makepasses thatvalue to the core build itself; the Lake cache steps (Download, Upload and
Verify Lake Cache, which run
build/stage0/bin/lake) take it from the job'senvironment (leanprover#14486). A stamped build runs none of these cache
steps (
lake-cacheis!stamped).The tests of stage 2 (and of stage 1) do not need it: they run that stage's own
Lake and Lean, and with no override Lake takes the githash of that Lean (
lean --githash), as it does outside CI. Both stages are built withUSE_GITHASH,so that githash is the commit's, and the override names another Lean. Under
it, Lake scopes its remote cache by the override and queues, claims and reads
nothing remote (
remoteCacheQueueService?inLake/Config/Env.lean). Thatfailed the Lake tests inputLockClaims (cases 9a and 9b), remoteCacheClaim,
remoteCacheRead, remoteCacheRefused, remoteCachePush and usageCutoffRemote in
the job "build / Linux release" on the tag v4.36-machcsl-r20. Outside CI, the
runner's value of the variable gives the same failures, and without it the
tests pass (remoteCachePush's failing check needs a CMake build to reach). The
tests ran without the variable before leanprover#14486. "Check
rebootstrap" (which the Linux release job runs at check level 1 and up, so on a
tag, after "Test") exported the new stage0 hash for its stage 1 tests as a
defensive measure against stale builds (leanprover#14575). Without the
override Lake still keys every trace by the githash of the Lean it runs, which
the update-stage0 commit changes, so no test reuses a stale build.
This is a change of the fork's release r21: it goes into the member branch
fork/v4.36-ci-tag-r21, which r21 merges in place of the member it copies. It merges as a squash after its review, when r21 is cut.After its review, a second commit checks
release_tagin the one step that reads it (a tag name, forks only), has later steps read only a Boolean, and gives arelease_tagdispatch its own concurrency group.The release's reviewer decided the other jobs of the fork's tag build (a tag push, or a dispatch with
release_tag): macOS aarch64 and Windows still build there but run no tests, since the fork publishes neither and its tests assume GNU tools and a POSIX system; on theorem-labs/lean4, Linux tsanitize runs on the larger runnerubuntu-24.04-16core(16 CPUs, 64 GB), where the hosted runner was lost; Linux aarch64 and Linux fsanitize stay as they are. Every other event keeps the matrix it had.Dispatch: LINUX-1736