GeezerVison is showing github.com — Reuse ID build dependencies and avoid duplicate checks by dezren39 · Pull Request #12605 · developing-today/code
Conversation
dezren39
commented
Nov 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
What changed
- Pass the root flake's pinned Crane input into the ID outputs. NixOS runtime packages build Cargo dependencies through a separate
buildDepsOnly derivation, then reuse those artifacts for the ID package.
- Keep runtime native libraries to OpenSSL; native-shell checks retain their GUI libraries.
- Give ID checks only the setup they use: Cargo, Bun dependencies/assets, and the Roc WASM host are no longer prepared for unrelated formatting, web-only, or shell checks.
- Give the NixOS integration and Playwright check derivations focused native inputs.
- Turn the ID
default output into a link farm over the named checks in just ci. The full flake check also builds named checks, so it now reuses those results rather than running the aggregate CI recipe a second time. Debug and release builds remain in the ID default check without adding extra root-flake checks.
- Turn
test, test-int, and test-web into aggregates of their existing named test outputs. The test shard script documents that test-unit plus the four shards cover the sandbox Rust suite; web tests remain in their separate unit and typecheck checks.
Test coverage
No assertions or test commands were removed. The default CI entry point, unit tests, integration shards, shard argument regression, web tests, and NixOS VM checks remain available. Aggregate checks reuse named derivations instead of recompiling and rerunning the same suites.
Validation
Builds and tests have not run. This session's repository executor failed to start and the connected AMD terminal reports its monthly remote-call allowance is exhausted. The repository disables PR CI and requires focused manual verification before merging.
On an available build host, verify with:
cd pkgs/id
nix flake check --no-build
nix build -L .#checks.x86_64-linux.default
cd ../..
nix build -L .#packages.x86_64-linux.id-web
The default check covers the just ci commands once. The full nightly nix flake check additionally builds all named checks and NixOS VM tests.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-23T06:15:42.401612Z |
234db53 |
New commits |
ℹ️ 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" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 22, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 6 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
7ac8bb6c-9d1a-4454-a962-5e5813dbc75e
Commits
-
Reviewing files that changed from the base of the PR and between 8f5692e and 6f220e3.
Files selected for processing: 2
-
lib/default.nix
pkgs/id/flake.nix
Walkthrough
-
The ID flake now receives an optional Crane input and can use separate Cargo dependency artifacts for runtime builds. Check derivations select setup stages by check type, and integration-test and E2E derivations declare native tools explicitly.
Changes: ID flake builds and checks
| Layer / File(s) |
Summary |
Crane runtime build support lib/default.nix, pkgs/id/flake.nix |
The root flake passes Crane to the ID flake. The ID flake creates a Crane library and adds a helper that builds Cargo dependency artifacts separately from a package. |
Runtime package build selection pkgs/id/flake.nix |
id-web and id-lib use the Crane helper when Crane is available and runtime checks are disabled. Otherwise, they use buildRustPackage. |
Configurable check derivations pkgs/id/flake.nix |
mkCheckWith gains switches for Cargo, Rust, build inputs, web setup and assets, and Roc host compilation. Focused constructors configure those stages for different check types. |
Check selection and test tools pkgs/id/flake.nix |
Checks select focused constructors or disable unused setup stages. Integration-test and E2E derivations declare native tools directly. |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Refactor
Sequence Diagram(s)
sequenceDiagram
participant RootFlake
participant IDFlake
participant CraneLibrary
RootFlake->>IDFlake: Pass inputs.crane as self.crane
IDFlake->>CraneLibrary: Build Cargo dependency artifacts
CraneLibrary-->>IDFlake: Return dependency artifacts
IDFlake->>CraneLibrary: Build runtime package using dependency artifacts
CraneLibrary-->>IDFlake: Return runtime derivation
Loading
Possibly related issues
developing-today/code#8574 — The changes add a separate Cargo dependency derivation and reuse its artifacts for the ID package build, addressing the issue’s core request.
developing-today/code#3195 — The Crane dependency reuse and focused check setup address part of the build-time reduction objective; release-profile and LTO separation and before/after measurements are not included.
Suggested reviewers: claude
Merge Risk: Moderate · previous review 8f569
-
The default CI check no longer has Biome available, so the full ci check fails when it reaches the web format step. Add Biome to that check's inputs before merging. The runtime build changes otherwise look consistent with the stated intent but have not yet been evaluated on a build host.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Title check |
 |
The title "Reuse ID build dependencies and avoid duplicate checks" matches the main changes in the changeset. The summary shows Crane dependency artifacts are built separately and reused for the ID pa… |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
Full details: Title check
-
Explanation
The title "Reuse ID build dependencies and avoid duplicate checks" matches the main changes in the changeset. The summary shows Crane dependency artifacts are built separately and reused for the ID package, which covers the "Reuse ID build dependencies" part. The flake changes also select setup steps per check type so each check sets up only what it needs, which covers the "avoid duplicate checks" part. The title is specific and describes the primary change from a developer's perspective. It does not mention the native-input narrowing or the Crane input plumbing, but that detail is not required.
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f5692eae9
ℹ️ 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".
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
348
to
+350
|
|
nativeBuildInputs =
|
|
|
nativeBuildInputs
|
|
|
++ extraNativeBuildInputs
|
|
|
++ [
|
|
|
bun2nixPkg.hook
|
|
|
pkgs.rustPlatform.cargoSetupHook
|
|
|
];
|
|
|
inherit cargoDeps;
|
|
|
checkBaseNativeBuildInputs
|
|
|
++ pkgs.lib.optionals needsRustToolchain [ rustToolchain ]
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Include Biome in the aggregate CI check's tool closure
The aggregate checks.default still uses mkCheck "ci" "ci", but this replacement tool closure no longer includes Biome, which previously came from nixCommon.nativeBuildInputs. In pkgs/id/justfile:39, ci depends on web-fmt-check and web-lint, whose recipes invoke biome format and biome lint. Adding Biome only to the separate mkCheckBiome derivations does not make it available to the aggregate derivation, so the default flake check now fails with biome: command not found. Include Biome explicitly in the aggregate check's inputs.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 22, 2026
dezren39
changed the title
Reuse ID Nix dependencies and slim check setup
Reuse ID build dependencies and avoid duplicate checks
Nov 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 234db53215
ℹ️ 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".
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
+548
to
+550
|
|
test = mkCheckAggregate "id-test" [
|
|
|
"test-unit"
|
|
|
"test-shard-0"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserve workspace integration tests in the aggregate
When building checks.test, checks.test-web, or checks.default individually, this aggregate no longer covers the suite previously run by test-sandbox. test-unit selects only libraries, while scripts/test-shard-sandbox.sh enumerates root tests/ targets and passes explicit --test flags; the nextest documentation defines this flag as “Test only the specified test target.” Workspace-member targets such as id-caps/tests/roc_import_policy.rs and id-web/tests/web_router_security.rs are therefore omitted. Although the full flake check still builds test-crate-integration separately, these aggregate entry points can now pass with failures in those previously covered tests. Include the workspace integration targets in the aggregate dependencies.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
# below continue to compile and run their own test targets.
|
|
|
doCheck = false;
|
|
|
};
|
|
|
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disable CMake configuration in the dependency derivation
For root-flake runtime builds, commonArgs includes pkgs.cmake but lacks dontUseCmakeConfigure. The CMake setup hook sets configurePhase=cmakeConfigurePhase when that flag and an explicit configure phase are absent, and Crane's builder does not supply a configure phase. Consequently, buildDepsOnly attempts to configure its dummy Rust source as a CMake project and fails before compiling dependencies. A repository-wide filename search found no CMakeLists.txt. Both package callers set dontUseCmakeConfigure in buildArgs, but those attributes reach only buildPackage, not this dependency derivation. Move the flag into commonArgs so both runtime packages can build.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Resolution: keep PR's check-dedup rewrite (specialized mkCheck
variants + aggregates), restore main-only test-tui-shell/test-hw-shell,
fix stale rustc pin comment (1.99.0 -> 1.99.1)
|
Named blocker: Codex P1 “Disable CMake configuration in the dependency derivation” is confirmed by inspection of the current PR head. mkCraneRuntime.commonArgs includes pkgs.cmake but does not set dontUseCmakeConfigure; that flag appears only in each caller’s buildArgs, which are applied to buildPackage after buildDepsOnly commonArgs has already created the dependency derivation. Thus the dependency derivation can select the CMake configure hook without a CMake project and fail before building dependencies. I did not run the heavy dependency build. Verification in a fresh detached worktree from origin/main, after a local --no-ff merge of PR head 30e448a113ef144545eaafa9898f70093210f844: nix-instantiate --parse pkgs/id/flake.nix and nix-instantiate --parse lib/default.nix both passed; worktree status is clean. I did not confirm duplicate attribute keys. The separate Codex P1 Biome concern is not present in the current source: web-fmt-check and web-lint use mkCheckBiome, and both are included in the default linkFarm. Codex P2 integration-test aggregation concern is recorded as follow-up, not a blocker. Not merging until the dependency-derivation CMake issue is addressed and reverified.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
buildDepsOnly only compiles Cargo dependencies; running the CMake
configure hook there is wasted work and diverges from main's
dontUseCmakeConfigure discipline. Stamped by the runtime compile via
buildArgs already; this makes the shared derivation skip it too.
Uh oh!
There was an error while loading. Please reload this page.
|
Batch A merge record (lane code-i, task 21622): merged c639355 via --merge. In-merge fix on PR branch: 6f220e3 adds dontUseCmakeConfigure=true to mkCraneRuntime.commonArgs (buildDepsOnly must skip the CMake configure hook; matches main's discipline). Verification in fresh worktree off origin/main: local merge conflict-free; nix-instantiate --parse clean; Codex P2 integration-test coverage recorded as follow-up. Progress on #13903 to follow.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
dezren39
added a commit
that referenced
this pull request
Nov 24, 2026
Reconcile with #12605 (merged 2026-11-24T06:21Z: crane dep reuse incl.
mkCheckBiome fix) and #12732-superseding crane split (03fe0c2), per
PR #12740 validation plan. No conflicts.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|