Commit 8859206
fix(ci): soundness gate must not assume bare
Greens `main`, which #633 left red.
## Root cause
The soundness gate's property 5 ran `dune build
test/xfail/test_xfail_pins.exe`. CI reaches dune only via `opam exec --
dune`, not bare `dune` on `PATH`, so this failed with *"ERROR (property
5): cannot build test/xfail/test_xfail_pins.exe"* — and the `build` job
exited there (before `@fmt`). It greened locally because my dev box has
`dune` at `/usr/bin/dune`; that environment difference is exactly what a
local-only run can't catch.
## Fix
The harness exe is already built by the `dune build` / `dune runtest`
steps that run *before* the gate, so the gate now prefers the
**pre-built binary** (`_build/default/...`) and only builds — with
whatever dune is available (`dune`, else `opam exec -- dune`) — if it's
missing. Fail-closed if it still isn't there.
## Verified (the actual CI condition, not just locally)
Built the exe, then ran the gate with `dune`/`opam` removed from `PATH`:
```
dune on restricted PATH? NO
OK: soundness ledger — all 5 properties hold (...)
rc=0
```
## Note
#633's `build` died at this gate, so `@fmt` never ran on its `lib/*.ml`
edits (the `return`-fence). With the gate fixed, CI here will reach
`@fmt`; if it flags those lib edits I'll follow up (I can't run
`ocamlformat` in my environment, so I'd apply the diff from the CI log).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01BbxKhXQwTvVgkYDgBMLJoa
---
_Generated by [Claude
Code](https://claude.ai/code/session_01BbxKhXQwTvVgkYDgBMLJoa)_
Co-authored-by: Claude <noreply@anthropic.com>dune on PATH (greens main) (#635)1 parent 874e36c commit 8859206
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
258 | 271 | | |
259 | 272 | | |
260 | 273 | | |
| |||
0 commit comments