This file records how releases of this repository are meant to work, and the one-off
clean-up steps that have to be done through the GitHub web interface or the gh CLI
(they cannot be done from inside the repository).
The repository used to contain .github/workflows/create-release.yml, taken from the
Lean community CI template:
on:
push:
paths:
- 'lean-toolchain'It runs leanprover-community/lean-release-tag, which creates a GitHub release named
after the Lean toolchain version every time lean-toolchain changes. That is
appropriate for an application that users download per toolchain, not for a library:
it produced a release tagged v4.33.0 with the body "Automated release for Lean version
v4.33.0", which is a Lean version, not a version of this library.
The workflow has been deleted. update.yml (automatic dependency-bump PRs) and
lean_action_ci.yml (CI build) are kept — those are useful.
# 1. delete the toolchain-named release and its tag
gh release delete v4.33.0 --cleanup-tag --yes
# 2. create the first real library release
gh release create v0.1.0 \
--title "v0.1.0" \
--notes-file docs/release-notes/v0.1.0.md
# 3. repository metadata (currently empty)
gh repo edit \
--description "Computability theory and algorithmic information theory, formalized in Lean 4 (sorry-free)" \
--add-topic lean4 \
--add-topic mathlib \
--add-topic lambda-calculus \
--add-topic computability \
--add-topic kolmogorov-complexity \
--add-topic algorithmic-information-theory \
--add-topic church-turing-thesisThe same three things can be done from the web interface: Releases → v4.33.0 → Delete,
then Tags → v4.33.0 → Delete; Releases → Draft a new release with tag v0.1.0; and
the About gear on the repository front page for description and topics.
The tree that is delivered is the one git archive produces, and it is not the working
tree: the working tree carries .lake/, so lake never has to re-resolve dependencies
there and a lake-manifest.json that disagrees with lakefile.toml stays invisible in it
while breaking every fresh clone. That is exactly the failure that shipped four times.
The packaging step therefore has its own gate, to be run after git archive and
before the archive is handed over:
scripts/pack_gate.sh # or: scripts/pack_gate.sh <revision>It packs the given revision (default HEAD), unpacks it into a scratch directory, and
runs, inside the unpacked copy:
scripts/check_manifest.py— the shipped manifest agrees with the shippedlakefile.toml: every[[require]]is present, itsinputRevis the pinned revision, every entry has a resolvedrev, and the manifest names the package that the lakefile declares;scripts/check_sorry.py— nosorry/admitinStart.leanorStart/, comments and string literals excluded (a plaingrepfails on the documentation, which discussessorryin prose);scripts/goal_state.py validateandscripts/check_closure.py— the task board is well formed and every module is in the import closure;scripts/check_unification.py --strict— the import graph ofStart/is connected (the aggregatorsStart.lean,CapstonesandDemoexcluded): no development is an island linked to the rest only through an aggregator.
Shipping the gate is not the same as running it, and the gate was shipped, documented and
not called: the fifth delivery again carried a manifest naming the wrong package, pinning
the wrong Mathlib revision and omitting cslib. So the call is now automatic:
scripts/install_hooks.sh # once per clone: git config core.hooksPath .githooks.githooks/pre-commit runs scripts/pack_gate.sh "$(git write-tree)", i.e. the gate on
the staged tree. Nothing can enter history without passing it, and what git archive
ships is exactly what is in history. A packaging step that tars the repository therefore
needs no extra discipline; a delivery that bypasses git should still run
scripts/pack_gate.sh immediately before the tar.
The build-from-archive job of .github/workflows/lean_action_ci.yml runs the same gates
and then builds the archive, so it also catches what an offline gate cannot. But CI
only reports after a push: a delivery that does not go through CI must run
scripts/pack_gate.sh itself.
The gate and the archive must be computed from the same tree. A delivery once listed
check_manifest.py among the gates it had run, yet the archive it shipped failed that very
check: the gate had run on one tree and the archive had been made from another. Remembering to
run the gate does not prevent that; tying the two to the same revision does. The packaging
command is therefore fixed:
scripts/pack_gate.sh HEAD && git archive --format=tar.gz HEAD -o delivery.tar.gzdelivery.tar.gz is ignored by git.
- The library version lives in
lakefile.toml(version = "0.1.0") and is independent of the Lean toolchain version. - Releases are cut by hand: bump
versioninlakefile.toml, add a file underdocs/release-notes/, tagvX.Y.Z, and create the release from that tag. - Bumping
lean-toolchain(and the pinned Mathlib/cslibrevisions inlakefile.toml) no longer creates a release.
lakefile.toml declares name = "lambda_computability", matching the repository name
lambda-computability (Lake package names must be Lean identifiers, so the hyphen is
written as an underscore). The Lean library target is still called Start, so all
import Start.… lines are unaffected.