fix(ci): repair never-green Coq kernel build gate (opam root + t27c path) - #2321
Merged
Merged
Conversation
The 'build' check owned by .github/workflows/coq-kernel.yml has failed on every master run since it was added (run #3, 2026-04-06 .. run #173). Steps 5-9 of the job have never executed once. This is a different check from cli-tri.yml's 'build', which shares the name and masks it in the check-runs API. Cause 1: the job runs coqorg/coq:8.19 with --user root, but the image's initialised opam root belongs to the coq user at /home/coq/.opam. As root HOME=/root has no .opam, so opam exited 50. Set job-level OPAMROOT rather than running opam init, which would rebuild Coq into an empty root while coqc/coqchk on PATH still came from the image switch. Cause 2, latent behind cause 1: 'cd bootstrap && cargo build --release' then './target/release/t27c' resolves to bootstrap/target/release/t27c, but bootstrap is a member of the root cargo workspace, so the binary lands in the repo-root target/. Build with -p t27c from the root. The step is not weakened: coq-flocq is still installed and no failure is suppressed. coq/Kernel/PhiFloat.v has a hard Flocq import. Closes #2320
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Contributor
PR DashboardGenerated at: 2026-08-21 09:08:31 UTC
Summary
Seal Status
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2320
Which
buildthis isTwo workflows in this repo emit a check named
build.cli-tri.yml's was repaired earlier today; this is the other one —.github/workflows/coq-kernel.yml, workflowCoq kernel, jobbuild, stepInstall Flocq (opam). The check-runs API returns only the newest run per check name, so one has been masking the other.Never green
All 12 runs on
masterconcludedfailure, from run #3 (2026-04-06) to run #173 (2026-08-21). The gate was added broken; it is not a regression. The failing step moved once, which disguises that:actions/checkout@v4skippedInstall Flocq (opam)skippedSteps 5 through 9 have never executed once.
Cause 1 — opam root is not root's
The job runs
coqorg/coq:8.19-ocaml-4.14-flambdawithoptions: --user root. That image does ship an initialised opam root, but it belongs to the image'scoquser at/home/coq/.opam. Under--user root,HOME=/root, so bareopamfinds no.opamand exits 50 withOpam has not been initialised.Two downstream steps,
Build coq/ (T27 + Flocq)andcoqchk PhiFloat (consistency), botheval $(opam env)and depend on that same root and switch.Fix — a job-level
OPAMROOT: /home/coq/.opam.Deliberately not
opam init --disable-sandboxing -y: a fresh root has no Coq in it, soopam install coq-flocqwould rebuild the entire compiler, and thecoqc/coqchkalready onPATHwould still resolve to the image's switch. Reusing the image's root also inherits its already sandbox-disabled config, which is the thing--disable-sandboxingexists to arrange.No official setup action (
ocaml/setup-ocaml,coq-community/docker-coq-action) appears anywhere in this repository, so there was no demonstrably-working in-repo configuration to copy.Cause 2 — wrong binary path, latent behind cause 1
Since steps 5-9 never ran, the next failure was never observed.
Build t27c and validate phi f64 parametersdid:The root
Cargo.tomlis a workspace whosemembersincludebootstrap, so cargo writes the binary to the workspace target directory at the repo root. Line 2 resolves againstbootstrap/, i.e.bootstrap/target/release/t27c— a path that cannot exist. That is an exit 127 which reads like a compiler failure.Fixed to
cargo build --release -p t27cfrom the repo root, then./target/release/t27c validate-phi.The step is not weakened
No
|| true, nocontinue-on-error, no dropped dependency.coq-flocqis still installed, and it has to be:coq/Kernel/PhiFloat.vcarriesFrom Flocq Require Import IEEE754.Binary. Two diagnostic lines (opam var root,opam switch list) andset -euxwere added so a residual failure names itself rather than exiting 50 mutely.Verification
I could not run this locally — opam and the Coq container are not available to me in this environment, and I did not test it. CI is the verification. Because the workflow's own
paths:filter includes.github/workflows/coq-kernel.yml, this PR does trigger the gate, so the check runs rather than being silently absent.Known sibling, not touched
.github/workflows/coq-proofs.yml(jobcompile-proofs, stepInstall Coq Interval) has the identical--user rootopam defect. Its check name iscompile-proofsso it masks nothing, and itspaths:filter (proofs/trinity/**.v) means a change there could not be verified by this PR's run.