You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pkgs/id: split dependency compilation out of the Nix build with crane (code#8392 follow-up) #8574
Follow-up to code#8392 (build efficiency). pkgs/id is the one remaining Nix-built Rust package in the repo still compiling monolithically: pkgs/id/default.nix is a single buildRustPackage over src = ./., so any source change recompiles the whole dependency tree in the Nix build (its dependency set is heavy — a cold local cargo test for this workspace measured ~1024s in the 2026-11-10 build-efficiency pass).
The conversion pattern is proven twice over and documented in the two landed PRs: atlas-search (PR #8560 — craneLib ? null arg, two-tier source with fixtures in the package tier only) and fleet (PR #8572 — per-variant deps layers). pkgs/id's shape is the easy case (lockfile at the source root, single package output), with two things to check while converting: the build.rs at the package root, and the separate custom check derivation in default.nix (~line 82) which should keep working unchanged.
Done when: a one-line source change rebuilds only the package derivation (dry-run shows the deps derivation untouched), with before/after times recorded here.
The target is untouched: on origin/main, pkgs/id/default.nix line 29 is still a single pkgs.rustPlatform.buildRustPackage — no craneLib, buildDepsOnly, or cargoArtifacts anywhere in the file.
Work kind: task/small_fix. Priority: priority/normal. Effort: effort/m (the conversion follows a proven pattern; the long pole is Nix build verification, not design).
Acceptance check (the issue's own done criteria): a one-line source change rebuilds only the package derivation — nix build --dry-run shows the deps derivation untouched — with before/after times recorded on this issue.
Plan: add the craneLib ? null tier split to pkgs/id/default.nix (deps tier keyed on manifests/lock/crate sources; build.rs reads web/dist, which the split must tolerate), wire crane into pkgs/id/flake.nix at the fleet's pinned rev and expose the crane build as a flake package, then prove: build passes, a one-line source change leaves the deps derivation untouched (dry-run), before/after times recorded here.
Agent note (task 20171, oc-code-03 lane): opened PR #12732 on branch queue/20171-8574-id-crane-fresh from current main b20d539. It adds the crane-based id-crane package, mirroring pkgs/atlas-search (#8560). Local nix build was not completed within the lane budget, so CI on #12732 is the verification path.
Lane BE (archer) claiming this task (queue task 20171). Plan: convert pkgs/id/default.nix from the single buildRustPackage to the crane two-tier shape proven by #8560 (atlas-search) and #8572 (fleet) — separate deps derivation so a source-only change rebuilds only the package derivation. Working in a laptop worktree on branch archer-lane-be/8574-crane. Oracle: nix build --dry-run showing the deps derivation untouched after a one-line source change; the custom check derivation keeps working unchanged; before/after build times recorded here.
No live owner found: the archer-lane-be session is not running, and branch archer-lane-be/8574-crane is a local-only worktree at main with no commits. Its queue claim is not live. I am not opening a parallel PR; PR pkgs/id: split dependency compilation out of the Nix build via crane #12732 is canonical for task 20171.
Verification in flight: nix build .#id-crane running on the laptop under fleet-build-lock with timing; next is the source-only nix build --dry-run (deps derivation untouched) plus before/after timings recorded here before any merge decision.
Monolithic-baseline reference on record: ~1024s cold local cargo test for this workspace (2026-11-10 build-efficiency pass, per task brief).
Done — PR #12863 merged (ced8e85f3553360b63329c8246dcca7fee376456).pkgs/id/default.nix is now the crane two-tier shape from #8560/#8572: an id-deps derivation (buildDepsOnly over a manifests+lockfile+crates+vendor fileset, workspace sources stubbed) and the package derivation built against those artifacts from the full tree. Details and design notes are in the PR body; the points that matter here:
Acceptance evidence
Deps split + dry-run oracle: deps output built at /nix/store/wmij8f8panyay1i9bfmp5npb5x2ffsgr-id-deps-0.1.0. After appending a one-line comment to crates/id-core/src/lib.rs, nix-build default.nix -A default --dry-run listed exactly one derivation to build — the package derivation /nix/store/bi9i2vm860kypv03hq01lxv2lwqn9knx-id-0.1.0.drv — and the id-deps derivation (apk69i991fy2sk2n760j14i0xm9x7521-…) was not in the list. Probe reverted.
Check derivation + build.rs: the standalone check derivation block is byte-identical to the pre-change file (verified by section diff) and still instantiates (id-check-0.1.0.drv in a dry run). The root build.rs is stubbed by crane in the deps tier (deps build green) and runs for real in the package tier, whose source is the full tree exactly as the monolith saw it.
Timings (reference laptop, both builds under concurrent load): monolith baseline 45m16s; first crane build 94m40s — the first build pays the deps tier's build+check+test passes and release-profile test compilation (the crane path runs tests under the release profile instead of the monolith's ci-check checkType; recorded in the file header). The split's payoff is in rebuilds, per the oracle: source changes no longer touch the deps derivation at all.
One caveat, pre-existing: both builds fail on exactly one test — cli::tests::test_command_lists_cover_all_clap_subcommands ("README CLI Commands table omits walk", id-cli 743 passed / 1 failed) — a defect on main itself, filed as #12772. The failure set is identical before and after this change; when #12772 lands, this build goes green with no further change here.
Activity
developing-today commentedon Nov 11, 2026
CODE-2562
dezren39 commentedon Nov 17, 2026
state: triaged
lane: any-b, worker: repo-worker-code, task 18692
Triage verdict for #8574 (checked fresh this shift, 2026-11-17): real, ready, patterned work — routed as a scoped follow-on.
pkgs/id/default.nixline 29 is still a singlepkgs.rustPlatform.buildRustPackage— nocraneLib,buildDepsOnly, orcargoArtifactsanywhere in the file.craneLib ? nullarg, two-tier source) onto pkgs/id, checking the two things the issue names — the package-rootbuild.rsand the custom check derivation (~line 82), which should keep working unchanged.nix build --dry-runshows the deps derivation untouched — with before/after times recorded on this issue.repo-health:v1:fix:developing-today/code:issue:8574, status queued).dezren39 commentedon Nov 17, 2026
Agent note — task 20171 picked up (lane any-k, 2026-11-17)
pkgs/idto the crane two-tier build (pkgs/id: split dependency compilation out of the Nix build with crane (code#8392 follow-up) #8574, Build performance: fleet cargo builds pile up — lock orphaned, per-worktree target dirs, GNU ld storm (measured 2026-11-10) #8392 follow-up).pkgs/id/default.nixline 29 is still a singlerustPlatform.buildRustPackage(checked on current main); the standalonecheckderivation (~line 82) is the rustup-based one the acceptance says must keep working unchanged. Patterns on main:pkgs/atlas-search(PR pkgs/atlas-search: split dependency compilation out of the package build with crane (code#8392) #8560) andpkgs/fleet(PR pkgs/fleet: split dependency compilation out of the glibc variant builds with crane (code#8392) #8572) — optionalcraneLib ? null, two source tiers, monolithic fallback when no craneLib is passed.craneLib ? nulltier split topkgs/id/default.nix(deps tier keyed on manifests/lock/crate sources;build.rsreadsweb/dist, which the split must tolerate), wire crane intopkgs/id/flake.nixat the fleet's pinned rev and expose the crane build as a flake package, then prove: build passes, a one-line source change leaves the deps derivation untouched (dry-run), before/after times recorded here.dezren39 commentedon Nov 23, 2026
Agent note (task 20171, oc-code-03 lane): opened PR #12732 on branch queue/20171-8574-id-crane-fresh from current main b20d539. It adds the crane-based id-crane package, mirroring pkgs/atlas-search (#8560). Local nix build was not completed within the lane budget, so CI on #12732 is the verification path.
dezren39 commentedon Nov 23, 2026
Agent note — task 20171 picked up (lane oc-code-08).
queue/20171-8574-id-crane-freshatc8252536fae3c6efff1d44d660fea0d69ba741bc.dezren39 commentedon Nov 23, 2026
Lane BE (archer) claiming this task (queue task 20171). Plan: convert
pkgs/id/default.nixfrom the singlebuildRustPackageto the crane two-tier shape proven by #8560 (atlas-search) and #8572 (fleet) — separate deps derivation so a source-only change rebuilds only the package derivation. Working in a laptop worktree on brancharcher-lane-be/8574-crane. Oracle:nix build --dry-runshowing the deps derivation untouched after a one-line source change; the custom check derivation keeps working unchanged; before/after build times recorded here.dezren39 commentedon Nov 23, 2026
Agent note: task 20171 picked up (lane code-i, scheduled), resuming from PR #12732 (branch
queue/20171-8574-id-crane-fresh, head c825253)..github/ci-policy.md, PR CI is not a merge gate, so the verification is manual: a focusednix buildof the crane package, the source-onlynix build --dry-runcheck, and before/after timings recorded here.archer-lane-be/8574-craneis a local-only worktree at main with no commits. Its queue claim is not live. I am not opening a parallel PR; PR pkgs/id: split dependency compilation out of the Nix build via crane #12732 is canonical for task 20171.pkgs/id: split dependency compilation out of the Nix build via crane
dezren39 commentedon Nov 23, 2026
Agent note: task 20171 picked up (lane any-o, scheduled), resuming from PR #12732.
queue/20171-8574-id-crane-fresh, rebased onto current mainf8e14e0a86aas491030e9703(force-pushed). The 3 touched files are unchanged on main since the old base, so the rebase is a clean replay; no competing PR for this work.pkgs/id/flake.lockequals the rev the root lock already carries. All threedefault.nixoutputs evaluate: monolithic fallback, cranedefault, and the untouched customcheckderivation.nix build .#id-cranerunning on the laptop underfleet-build-lockwith timing; next is the source-onlynix build --dry-run(deps derivation untouched) plus before/after timings recorded here before any merge decision.Merge pull request #12863 from developing-today/archer-lane-be/8574-c…
dezren39 commentedon Nov 23, 2026
Done — PR #12863 merged (
ced8e85f3553360b63329c8246dcca7fee376456).pkgs/id/default.nixis now the crane two-tier shape from #8560/#8572: anid-depsderivation (buildDepsOnly over a manifests+lockfile+crates+vendor fileset, workspace sources stubbed) and the package derivation built against those artifacts from the full tree. Details and design notes are in the PR body; the points that matter here:Acceptance evidence
/nix/store/wmij8f8panyay1i9bfmp5npb5x2ffsgr-id-deps-0.1.0. After appending a one-line comment tocrates/id-core/src/lib.rs,nix-build default.nix -A default --dry-runlisted exactly one derivation to build — the package derivation/nix/store/bi9i2vm860kypv03hq01lxv2lwqn9knx-id-0.1.0.drv— and theid-depsderivation (apk69i991fy2sk2n760j14i0xm9x7521-…) was not in the list. Probe reverted.id-check-0.1.0.drvin a dry run). The rootbuild.rsis stubbed by crane in the deps tier (deps build green) and runs for real in the package tier, whose source is the full tree exactly as the monolith saw it.ci-checkcheckType; recorded in the file header). The split's payoff is in rebuilds, per the oracle: source changes no longer touch the deps derivation at all.One caveat, pre-existing: both builds fail on exactly one test —
cli::tests::test_command_lists_cover_all_clap_subcommands("README CLI Commands table omitswalk", id-cli 743 passed / 1 failed) — a defect on main itself, filed as #12772. The failure set is identical before and after this change; when #12772 lands, this build goes green with no further change here.