Repository navigation
Reuse CI switches across compatible native library changes - #88
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be6291a3bf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| undefined = capture(['nm', '-u', path]).splitlines() | ||
| groups = {name: sorted({line.strip()[1:] for line in undefined if pattern.match(line.strip()[1:])}) | ||
| for name, pattern in SYMBOL_GROUPS.items()} |
There was a problem hiding this comment.
Parse nm output before accepting native reuse
When a fallback cache contains zlib/zstd stubs, the macOS nm -u output has the form U _ZSTD_…; removing only its first character leaves a leading space and Mach-O underscore, so none of these regular expressions match and native_link_checks silently returns no checks or rebuild roots. Apple's nm documentation confirms that the default output places a symbol-type character before the name and that -j is required for name-only output. Consequently, a provider change that removes a required zlib/zstd symbol bypasses the intended repair and can instead fail the later build/test; parse the symbol column or invoke nm -uj and normalize the Mach-O underscore.
Useful? React with 👍 / 👎.
CI rebuilt OCaml and 170 dependencies when hosted image metadata or SQLite changed despite an unchanged OCaml/Xcode/SDK stack. The v4 cache now restores within an exact toolchain/locked-dependency family and validates native-provider changes with receipt/file hashes, actual compiler smoke builds, required symbols/install names, native/bytecode SQLite operations and GMP arithmetic. Compatible SQLite changes keep installed stubs; incompatible packages alone trigger an opam reverse-dependent rebuild.
Logs report specific cached/current input and critical-file hashes, distinguish audit-only/native changes and explicitly report when no prior comparison is available. Environment values are hashed and personal home names redacted. A newer PR head cancels only that workflow/PR's older run; main and controlled runs stay isolated. Locked install, full build, full regression and final sealing remain mandatory.
Real controlled comparison
Both jobs used head and actual checkout
e54a1cf5ed51443d12dd15d6e95090b9a8ec2072in run 38901040422.The warm job also prepended an empty PATH directory. It restored the cold variant by the same family prefix (
source: compatible, raw exactcache-hit: false), retained identical compiler and SQLite stub SHA256 values, resolved pins and all 181 package versions, and actually loaded SQLite 3.49.2 in both native and bytecode probes. No installed package was rebuilt. The measured job saving is 17:11; warm dependency wait for the seed is excluded from runner queue.Final integrated head
Head
f35f1d6725651a20adf7d45c68656ad58a29143fincludes main/PR873a7a6e6004ac956322505991899f06e30d10e17c. Final CI 38903964936 passed in 6:27 (8s queue), including the complete regression suite. It naturally reused the normal cold run's compiler/stubs across ImageVersion 20260907.0351.1 → 20261013.0424.1 and actual SQLite 3.53.4 → 3.54.0: zero installs/recompiles/repair roots, setup 64s, locked install 5s. This pair includes PR87 source changes and is not the controlled performance A/B above.Automatic cancellation was observed on old head run 38898843552 and superseded run 38898896171, without manual cancellation. The push experiment continued through subsequent PR synchronize events.
Validation: 34 helper boundary tests pass locally and in CI; real offline opam tests verify selective reverse-dependent repair; actionlint passes; independent exact-head journal-code-review has no remaining findings.
spec-dev-tool check --allstill reports three existing decision-document formatting issues outside this diff. The temporary experiment caller has been removed; its reproducible provider helper and instructions remain in journal-build. No business, spec, Dune, lock, Apple provenance or repository security settings changed relative to main. Not merged.Compatibility remains bounded by the exact compiler recipes, locked sources, selected Xcode/SDK/clang, architecture/OS major, effective tools/flags and absolute prefixes. Missing archives, changed families or failed probes still rebuild safely; GitHub cache scope and immutability still apply.