| Field | Value |
|---|---|
| Decision ID | ADR-058 |
| Initiative | unsorry CI scalability and fork-safe verification |
| Proposed By | unsorry maintainers |
| Date | 2026-06-16 |
| Status | Proposed |
ADR-049 makes unsorry safe for untrusted contributors by keeping the load-bearing soundness verdict on a project-controlled central re-check. Issue #1206 then shows the next constraint: non-contributor fork support and larger agent fleets can make verification capacity the bottleneck even when soundness is already safe.
The current Gate A workflow already has the useful split:
ubuntu-latest,namespace-profile-unsorry-prepare,namespace-profile-unsorry-audit,namespace-profile-unsorry-replay.That split should become an explicit policy. GitHub-hosted runners are useful as cheap elastic intake capacity, but they give less control and operational visibility than the namespace lane. Namespace runners provide the better surface for trusted Lean verification because the project controls the profile, cache volume, sizing, and logs around the verifier boundary.
As of this decision, the operating model is:
namespace-profile-unsorry-prepare: small prepare/build profile for cache warming, goal builds,
statement bindings, and archive package validation.namespace-profile-unsorry-audit: axiom-audit profile sized for one resident mathlib image.namespace-profile-unsorry-replay: replay profile sized for leanchecker and full-replay
headroom.In the context of unsorry scaling from trusted same-repo agents toward fork contributors, volunteer agents, and more parallel PRs,
facing the fact that a single PR can consume several minutes of runner time, and that letting fork, agent, generated-artifact, and trusted verifier jobs compete in one capacity pool would create queue starvation and CI denial-of- service pressure,
we decided for explicit runner pool segmentation and verification
capacity governance: GitHub-hosted runners are the cheap/intake lane for
low-trust, low-cost, and non-Lean work; namespace.so runners are the trusted
verification lane for Gate A and any future central re-check that can admit
content to the verified library; namespace-profile-unsorry-prepare, namespace-profile-unsorry-audit, and
namespace-profile-unsorry-replay split the trusted verifier work by job role so the operator can
scale prepare/build, axiom audit, and kernel replay capacity independently,
and neglected a single shared runner pool (rejected because noisy agent and fork work can starve merge-blocking verification), GitHub-hosted runners as the only verifier surface or a direct replacement for the role-specific Namespace verifier lanes (rejected because the trusted Lean lane needs stronger profile control, cache-volume control, and visibility; GitHub-hosted concurrency is useful enough to pilot, but not enough to make the protected verifier lane opaque by default), namespace runners for every cheap job (rejected because that wastes paid verifier capacity), contributor self-hosted runners as a merge-blocking verifier (rejected by ADR-049), and scaling first by making all runners larger (rejected because capacity isolation and queue policy are the first-order problem),
to achieve a CI architecture where cheap checks stay cheap, trusted verification stays protected, fork support can be opened without granting unbounded access to paid verifier minutes, and operator-visible namespace capacity is reserved for the work that actually carries soundness,
accepting that GitHub-hosted runner concurrency and queue visibility are plan-dependent, that namespace capacity costs more per trusted minute, that some comments/specs must be kept in sync with operator-side profile sizing, and that future fork automation must add identity/quota controls before it can freely spend namespace verifier capacity.
| Class | Runner surface | Trust / cost role | Examples |
|---|---|---|---|
| Cheap intake | GitHub-hosted ubuntu-latest |
Low-cost checks before verifier spend | path filters, PR labels, ADR/spec lint, protocol checks |
| Required aggregator | GitHub-hosted ubuntu-latest |
Stable required context wrapper | final gate-a, gate-b aggregation |
| Prepare verifier | namespace-profile-unsorry-prepare |
Trusted build/cache preparation | goal builds, statement bindings, archive package validation |
| Audit verifier | namespace-profile-unsorry-audit |
Trusted axiom-audit verification | serial axiom_audit over changed scope |
| Replay verifier | namespace-profile-unsorry-replay |
Trusted kernel replay | incremental replay and forced full replay |
| Scheduled backstop | namespace profile selected by verifier policy | Defense-in-depth verification | daily full replay with small replay chunk |
| Generated artifacts | GitHub-hosted unless verifier evidence is required | Interruptible maintenance | leaderboard, targets board, visualization refresh |
| Agent exploration | contributor/local or separate agent pool | Noisy advisory work | local proving, retries, candidate generation |
UnsorryLibrary must use the trusted
verifier lane defined by ADR-049.namespace-profile-unsorry-prepare, audit on namespace-profile-unsorry-audit, and replay on namespace-profile-unsorry-replay.This decision is not allowed to assume an empty queue. The repository already has open proof PRs, queued GitHub-hosted checks, queued namespace Gate A jobs, and in-progress verifier runs. Runner segmentation must therefore be adopted as a live operations change.
The transition rules are:
gate-a and gate-b remain the branch
protection contexts during the transition.namespace-profile-unsorry-prepare,
namespace-profile-unsorry-audit, and namespace-profile-unsorry-replay remain stable routing labels.The intended migration is additive: the PR documents and clarifies the routing contract without changing required-check names or the soundness boundary. Future workflow rewrites that materially change routing must carry their own live operations plan.
| Reference ID | Title | Type | Location |
|---|---|---|---|
| REF-1 | Runner pool segmentation spec | Specification | specs/SPEC-058-A-Runner-Pool-Segmentation-And-Verification-Capacity.md |
| REF-2 | Decentralised CI Runner Architecture | Decision | ADR-049-Decentralised-CI-Runner-Architecture.md |
| REF-3 | Verify-on-Ingest | Decision | ADR-048-Verify-On-Ingest.md |
| REF-4 | Gate A Workflow | Specification | specs/SPEC-006-B-Gate-A-Workflow.md |
| REF-5 | Volunteer-Scale Claim Substrate | Decision | ADR-053-Volunteer-Scale-Claim-Substrate.md |
| REF-6 | Agent Identity, Quotas, and Reputation | Decision | ADR-054-Agent-Identity-Quotas-And-Reputation.md |
| REF-7 | Non-contributor proof submission via forks | Issue | GitHub issue #1206 |
| Status | Approver | Date |
|---|---|---|
| Proposed | unsorry maintainers | 2026-06-16 |