Repository navigation
Restore CI compiler and dependencies before setup with stable inputs - #85
Merged
Merged
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. |
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.
CI created OCaml before restoring the installed switch and keyed the restore with that newly generated compiler binary. This change identifies exact build inputs before setup, restores the workspace switch plus opam metadata, validates the saved compiler/state receipt, and lets setup reuse the compiler. Rejected restored state is quarantined on the disposable hosted runner for clean cold setup.
The key retains absolute-path, runner image, Apple SDK/clang, native-library ABI, lock and resolved-pin matching. A fixed opam-repository commit binds compiler source checksums, patches and build configuration. Re-pin, system requirement checks, locked install, full build/native embed and complete regression tests stay unconditional. The shared Apple builder still hashes the actual compiler binary for native provenance.
Controlled measurement at head
22cb26610650d3ae9d0b0aad01c27b34a81ff389: cold attempt 1, hot attempt 2. Both checked out the same merge commit2322e97b79922ccd62cc3984d113e3fe38d99262, with identical imagemacos26 / 20261013.0424.1, complete input identity, resolved pins, compiler configuration/hash and all 181 installed package versions.Nothing to do.)Observed job saving: 856 s (14:16), 70.98%, excluding queue. The hot action log has
CI_CACHE_HIT: true, the receipt is accepted, and setup has no compiler installation group, switch-create or installed/recompiled package actions. Both attempts pass the complete build/tests.Exact key:
journal-opam-v3-macOS-ARM64-6ec349f2d60af43970feecf6d093c205753c26255cbfd75c03e5ad7bad066d51. Cached paths are/Users/runner/work/logseq_journal/logseq_journal/_opamand/Users/runner/.opam. Compiler SHA-256 in both receipts:39817c9cbca6b75d35d019dca63eb741f02234926d404f9b1aca54e4cbc64f83.Final source is synchronized with main
1e38f64644cdd49081004722cd9dd43759b2aaafat headb6da1a58b2fc1f75614bc417f01d8b83f6bea995; the same four CI/skill file blobs are unchanged from the measured head. Final integrated verification: run 38880280772 passed in 343 s (5:43), with queue 9 s, the same exact cache key, accepted receipt, unchanged compiler, zero package installs/recompiles, and full build/tests passing.Validation: all 30 build-boundary tests pass at final head; actionlint and diff checks pass. Test-first cases cover pre-setup identity and invalid inputs, exact receipt acceptance, missing/corrupt compiler/switch metadata, partial/missing restore rejection and owned-runner quarantine guards. Read-only journal-code-review found no evidence-backed issue in scope. No business/spec/Dune/lock change appears in the diff against current main. Three pre-existing unrelated decision documents still fail spec-dev-tool section validation; they were not changed.
This is one controlled pair, not a guaranteed future duration. Image, SDK, library, lock, recipe or resolved-pin changes correctly select another cold cache. GitHub PR merge-ref caches remain scoped to their PR, so a sibling PR cannot inherit this PR's cache until a matching default-branch cache exists. Corrupt immutable entries are rejected and require an authorized namespace bump/removal for persistent recovery. No merge or security-policy change is requested.