Shared configuration, CI and administration for Lean projects using the Tau Ceti workflow. This repository is independent of the example worker harness. Review, Progress and Bors remain separate implementations.
Architecture and manual setup documents the installation from scratch, including repositories, ownership, workflows, Apps, credentials, merge rules and optional services. It does not require doctor.
uv tool install git+https://github.com/TauCetiProject/TauCetiTools
tauceti-tools doctor
tauceti-tools init --repo YOUR_ORG/YOUR_PROJECT --owner-login YOUR_LOGIN
tauceti-tools doctor
tauceti-tools doctor --no-extrasSelect immutable tool versions in the generated configuration before installing workflows.
Doctor reads by default. --fix CHECK_ID previews a repair; adding --apply performs it.
Credential presence and successful use are reported separately.
Optional extras are included by default, after the core checks; --no-extras omits them.
Disabled extras are reported as disabled and do not need setting up.
The human report summarizes successful checks and prints the full repair procedure for
each outstanding item, including service-operator work. --check CHECK_ID selects one
check; it does not change the instructions. --json includes each check's result and repair instructions.
Missing, empty and invalid configuration files produce starter-generation and repair commands.
init fills a missing or empty file, preserves a nonempty file, and defaults to GitHub's
merge queue. Bors is the other supported merger. Administrators override scope blocks with
an admin merge when using the queue, or with bors merge when using Bors.
Doctor checks the merge settings directly rather than scanning PRs.
App-dependent workflows skip with a setup message while credentials are missing; builds still run. Doctor separately reports missing settings, observed credential failures and successful use that has not been checked yet. A successful rerun can verify credentials even when the original workflow run predates the credential update.
Configuration is selected in this order: explicit --conf PATH_OR_HTTPS_URL,
TAUCETI_CONF, tauceti.toml in the current directory, then tauceti.toml at the
current Git checkout's root. This works from subdirectories and Git worktrees too.
Without any project configuration, tauceti doctor checks the worker host.
Worker and engine commands use the same --conf PATH_OR_HTTPS_URL. A worker keeps a local
configuration snapshot for its process tree and adopts online edits only on restart or explicit refresh.
Project data and local worker identities are isolated; provider quotas remain account-wide.
Optional Bors hosted mode supplies a separate operator-funded Neon project. The downstream
still operates Bors, on its own Docker host or Cloudflare account. Hosted state-service access
requires a separate operator grant.
A disposable project supplies separate content and roadmap trees with real immutable tool and Mathlib pins. It does not create repositories or enroll hosted services.
.github/workflow-contract.yml lists each reusable workflow and the TauCeti workflows that call
it. workflow-contract.yml checks every change here, and every three hours, against TauCeti main
and TauCetiFleet main: inputs, secrets and outputs match, no job asks for a permission its caller
did not grant, caller and callee never share a concurrency group, callers keep the triggers and
names the contract lists, and every job that can reach a workflow-restricted runner group is
defined in a file the group's Fleet policy admits. It also runs actionlint on the workflows here.
Run it locally with python3 tests/workflow_contract.py TAUCETI_CHECKOUT FLEET_CHECKOUT.
Moving a workflow here from TauCeti: add it to the contract with its caller marked pending,
merge, convert TauCeti's file to a stub calling it at @main, then drop pending. A job that
runs on a restricted Fleet group needs the Fleet policy and the GitHub runner group to admit the
file here before the stub lands.
Projects that call these workflows and actions at @main (TauCeti does) run every new commit on
main immediately. If a commit breaks their CI, an administrator reverts it directly on main
(git revert <commit> && git push); branch protection does not bind administrators. The revert
takes effect on the next CI run, and on the next deploy for services that install TauCetiTools
(the merge queue, repair workers and fleet hosts). Fix the change and re-land it through a normal PR.
The merge queue applies this repository's policies (self_tested, ci_candidate and others)
when it admits and verifies pull requests, and it installs TauCetiTools main on every deploy.
worker-contract.yml therefore runs TauCetiWorker main's queue_admission and
queue_admission_adapter tests against every pull request and every push to main here. It is not
a required check yet. TauCetiWorker's own CI tests a pinned Tools commit (tools-rev in its
pyproject.toml), so a red worker-contract here does not turn Worker CI red; it says the next
queue deploy would run code those tests reject.
A change that alters a policy those tests assert on purpose, as "honour self-tested from any author" did, lands in two steps:
- Open the TauCetiTools pull request. Then open a TauCetiWorker pull request that updates the
Worker's tests and code, and sets
tools-revto the Tools pull request's head commit. Tools merges with merge commits, so that commit stays on Toolsmainafter the merge. The Worker pull request's CI tests the new policy. - Run
worker-contracton the Tools pull request's branch against the Worker branch (Actions, worker-contract, Run workflow,worker-refset to the Worker branch, orgh workflow run worker-contract.yml --ref TOOLS_BRANCH -f worker-ref=WORKER_BRANCH). When it passes, merge the Tools pull request, then the Worker pull request straight after.
Until both merge, worker-contract against Worker main fails as expected: on the Tools pull
request, and on Tools main in the minutes between the two merges.
Routine reporting uses job webhooks and bounded service-side recovery. The site
can cache the published charts with python3 scripts/ci_report_assets.py --out-dir web/static_files, without GitHub reads or a database download. Historical
collection is an explicit analysis: collector.incremental --analysis enables
optional artifacts, failed-job logs and commit comparisons. Ruleset snapshots
and per-module timing lists are not collected.
Host resource sampling requires the repository variable CI_RESOURCE_EXPERIMENT
to be 1. Otherwise the sandbox command runs directly. Successful PR phase
artifacts are sampled one in twenty; a resource experiment can collect the
additional telemetry explicitly. These observations do not authorize merging or
cache publication.
The trusted build workflow optionally wraps its existing bwrap launcher with
scripts/ci_live_progress.py. The wrapper stays outside the candidate sandbox,
retains the launcher's exit status and forwards cancellation. Its background
reporter samples bounded candidate phase/module counters, Lake's own [done/total]
job counter with its rate over the last ten minutes, and descendant CPU/Lean
process evidence every fifteen seconds. Each sandboxed step's reporter continues
the job's session and sequence from a file in $RUNNER_TEMP, outside the
sandbox, because the receiver accepts one session per job. Candidate text is untrusted telemetry;
only fixed phases, validated module names and numeric counters are sent. The
reporter never sends raw logs, paths, commands or environment values.
Publication uses a short-lived GitHub OIDC grant with audience
tauceti-operations-progress. The CI receiver binds the signed repository,
run/attempt and check-run identity to its existing stored job facts, and treats
these counters as observations only. OIDC request credentials stay outside
bwrap's env -i environment and mounts. Telemetry/authentication/network failure
cannot change the build result. The backend reader must be deployed before the
workflow/tool pin is activated in a consuming repository.
scripts/ci_git.py resolve establishes immutable head/base/merge-base identities
in its separate, bounded resolver store. scripts/ci_checkout.py fetch then
fetches complete, unfiltered histories into a new .ci-source.git at the
canonical workspace root. Same-repository heads and bases share one transfer;
fork heads use a second immutable fetch. Transfers check object integrity and
use three attempts, with a ten-minute deadline per attempt. Failure preserves the
known identities for the existing checkout-failure reporting path.
ci_checkout.py materialize creates fresh, detached pr, base and mergebase
checkouts with private metadata and a stable objects alternate. Candidate config,
hooks and credentials are never reused. Keep the source store for the entire job,
including after integration renames pr to pr-raw-head. Every offline sandbox
which reads these checkouts must bind the stable objects directory read-only,
including frozen-candidate jobs. Normal disposable workspace cleanup owns the
store; it is not a cross-job cache.
The package suite runs the shipped checkout fixtures. With stock Lean/Lake and bubblewrap installed, run the native offline fixture explicitly:
python tauceti_tools/assets/scripts/test_ci_checkout.py --integrationIt verifies that hiding the source store breaks ancestry reads and that exposing only its objects read-only permits native builds in ordinary and frozen modes.