GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pkgs/id: split the monolith crate into sub-crates along module seams (prioritized by Drew 2026-11-01) · Issue #3447 · developing-today/code

pkgs/id: split the monolith crate into sub-crates along module seams (prioritized by Drew 2026-11-01) #3447

New issue
Copy link
New issue
Copy link
Closed
7 / 77 of 7 issues completed
Closed
pkgs/id: split the monolith crate into sub-crates along module seams (prioritized by Drew 2026-11-01)#3447
7 / 77 of 7 issues completed
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)design/id-crate-splitDesign: id-crate-split - all issues of this effort carry iteffort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)epic/id-crate-splitEpic: id-crate-split - all issues of this effort carry itepic/id-programReprioritization program epic (2026-11-12)expediteImportant - do this very soon, before anything not expeditedkind/enhancementpriority/highImportant and time-sensitivequeue/blockedQueue or user escalation statesource/creatorFiled by the new-issue-creator jobstatus/blockedQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Nov 1, 2026
Issue body actions

Order

Drew, 2026-11-01 (~03:23 CST, main chat): "prioritize the crate splitting work."

This elevates the crate-shape work out of #3195's sequencing. #3195 scoped splitting as "only if the above is insufficient" (after profile separation, release audit, build hygiene). Drew's order makes the split a first-class work item now, in parallel — the profile work in #3195 continues on its own track and is not a precondition.

Why

pkgs/id is one giant compilation unit and the cost is now gating production work:

  • pkgs/id: build-time review — runtime performance first, then build time (cold check build ~16 min, tests run 12 s) #3195's table: 150 src .rs files, 125,722 lines (2026-10-31), up from 71,723 lines on 2026-10-11 — compile time tracks the crate's own size, superlinearly under LTO with codegen-units = 1.
  • pkgs/id: build-time review — runtime performance first, then build time (cold check build ~16 min, tests run 12 s) #3195 measured a cold nix build of the package at ~16 min under shared load (2026-10-31).
  • 2026-11-01: the NixOS switch that deploys the fleet-feed collector (pm-stack NixOS module: fleet-feed collector units are hand-written — fold service + timer into nixos/services/pm-stack #3363) sat behind this compile for over an hour of wall time — the id release build (cargo, ~200-crate dependency graph, LTO) ran 53+ minutes under fleet load, and two stale/duplicate builds of the same package were found competing with it and had to be killed by hand.
  • Every check/test build recompiles the one crate end-to-end for any change anywhere in it. Splitting along the existing module seams makes most changes recompile only the touched sub-crate and lets the graph build in parallel.

Scope

  • Identify the split seams from the crate's existing module structure and dependency directions (the program's areas — artifact, world, sandbox, web, dht/ssh, core types — are the starting hypothesis; the triage verifies against real import graphs).
  • Sequence the extraction into phased, independently mergeable packets (one sub-crate per packet), each keeping the full test suite green.
  • Keep the public surface of the resulting top crate/binary unchanged for consumers (the NixOS module, mcpx, and the flake checks build the same binary).

Acceptance (inherited from #3195, non-negotiable)

  • Shipped-binary runtime performance unchanged-or-better, with evidence: the deterministic fuel baselines in src/sandbox.rs identical after each phase; runtime spot benchmark before/after.
  • Cold check-build time materially reduced, before/after timings recorded on this issue from the laptop.
  • No test coverage removed and no check weakened to buy speed.

Program context: #3195 (build-time review), Drew's 2026-10-28 id program directive. Sibling storage/duplication problem: the fleet target-dir duplication issue filed alongside this one.

{
  "pm_meta": 1,
  "direct_parent": {
    "repo": "developing-today/code",
    "number": 3195,
    "kind": "sub-issue"
  },
  "links": [],
  "provenance": {
    "actor": "dezren39",
    "ingested_by": "metadata-sweeper",
    "ingested_at": "2026-11-24T03:22:45.619Z"
  },
  "ascertained": {
    "title": "pkgs/id: split the monolith crate into sub-crates along module seams (prioritized by Drew 2026-11-01)",
    "state": "CLOSED",
    "labels": [
      "task/triage",
      "status/blocked",
      "source/creator",
      "priority/high",
      "app/id",
      "epic",
      "queue/blocked",
      "effort/l",
      "kind/enhancement",
      "expedite",
      "epic/id-program",
      "epic/id-crate-split",
      "design/id-crate-split"
    ],
    "milestone": null,
    "created_at": "2026-11-01T09:25:05Z",
    "updated_at": "2026-11-14T06:23:18Z",
    "closed_at": "2026-11-13T08:55:54Z"
  }
}

Sub-issues

Collapse Sub-issuesSub-issues

7 of 77 of 7 Issues completed
Loading 7 sub-issues

Activity

Next
  1. dezren39
    added
    priority/highImportant and time-sensitive
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 1, 2026
  2. developing-today commented on Nov 1, 2026

    @developing-today
    developing-todayBot
    on Nov 1, 2026 – with developing.today
    Contributor
    More actions

    CODE-1315

  3. dezren39
    added
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  4. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    Prioritized by Drew in main chat 2026-11-01 ~03:23 CST. Triage task 5366 queued at priority 10 (top band) on repo-health-code-pilot, DB-verified. The triage maps the seams and routes phased extraction packets; #3195's acceptance (fuel baselines identical, runtime perf neutral-or-better, no coverage loss) binds every phase.

  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane E shift
    • Session / ID: queue task 5366 (triage)
    • Found via: queue claim
    • Task: Triage pkgs/id: split the monolith crate into sub-crates along module seams (prioritized by Drew 2026-11-01) #3447 — map pkgs/id module seams at current main, pin the split sequence, route phased sub-crate extraction packets
    • Expectation: effort s; done = seam map + phase order posted on pkgs/id: split the monolith crate into sub-crates along module seams (prioritized by Drew 2026-11-01) #3447 + first phase packet(s) enqueued
    • Links: n/a yet
  7. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (triage)

    • Agent: queue worker (repo-worker-code), Lane E shift
    • Session / ID: queue task 5366 (triage) → Phase 1 fix task 5371
    • Found via: queue claim
    • Task: Triage pkgs/id: split the monolith crate into sub-crates along module seams (prioritized by Drew 2026-11-01) #3447 — seam map + phase sequence below; Phase 1 routed
    • Expectation: met — map and sequence recorded here; Phase 1 = queue task 5371
    • Links: Phase 1 packet: hidden_files/packets/task-3447-phase1.json (goal workspace)

    Module map at current main 70c206250 — pkgs/id/src: 150 .rs files, 126,981 lines, single crate (no workspace yet). Cross-reference counts are files in area A referencing crate::<module> of area B (laptop count, this run):

    Area Lines out → in ← Reading
    web/ 19,038 32 1 top-of-stack consumer; almost nothing depends on it
    commands/ 10,626 81 35 the binary's workhorse; depends on everything
    world/ (dir) 9,037 28 0 world cluster core
    event_store/ 8,066 21 9 sync/event cluster core
    groups/ 5,948 7 19 identity/groups cluster
    world_session/ 5,271 41 19 world cluster
    encryption/ 4,901 9 1 near-leaf; feeds groups
    cli.rs 4,401 2 6 shell
    world_ssh.rs 3,163 13 3 world cluster
    repl/ 2,934 0 0 self-contained (talks to commands via the binary surface)
    directory.rs + directory_view.rs 5,693 10 28 mid-layer, widely used
    tags.rs 2,698 1 12 near-leaf core type
    sandbox.rs 2,290 2 8 near-leaf
    membership/ 2,059 0 4 leaf
    world_net/store/compile/hub/fixture/doctor/native/records/manifest/line/caps/limits/presentation.rs ≈15,500 low caps 14, limits 14, presentation 7 world cluster + its leaf types
    protocol.rs 1,731 6 7 mid
    store.rs / store_traits.rs 1,734 4 8 mid
    leaves (out ≈ 0, in high): waiting 814 (0/14), connectivity 439 (0/15), discovery 1122 (0/6), tuple 1245 (0/2), access 237 (0/4), petname 751 (1/4), qr 102, sync_method 239, time 11 (2/8) foundation

    Pinned sequence (each phase one independently mergeable packet, full suite green, binary surface unchanged; each phase's worker enqueues the next phase on completion, reusing the standard fix dedupe key once the prior task is terminal):

    1. Phase 1 — id-core (foundation): workspace conversion + extract the leaf modules (time, waiting, connectivity, discovery, tuple, petname, qr, access, sync_method, membership/, world_caps, world_limits, world_presentation) into a sub-crate; main crate re-exports at existing crate:: paths. → task 5371 (enqueued).
    2. Phase 2 — id-world: the world cluster (world/, world_session/, world_ssh, world_net, world_store, world_compile, world_hub, world_fixture, world_doctor, world_native, world_records, world_manifest, world_line — ≈33k lines with Phase-1 leaves as its base).
    3. Phase 3 — id-sync: event_store/ + chain, tag_claims, tag_index, log_sync, local_events, event_sync, store_traits (≈13k lines; tags.rs/tuple stay-or-move decided by Phase 1's re-export shape — tuple already in id-core).
    4. Phase 4 — id-groups: groups/ + encryption/ + invites/ + blob_gate, rejection (≈12k lines; encryption is near-leaf at 9 out / 1 in and groups consumes it).
    5. Phase 5 — id-web: web/ (19k lines, 1 in-reference — the cleanest big extraction) once its world/tags dependencies live in sub-crates.
    6. Remainder: commands/, cli, repl, main, store, protocol, directory — the binary crate, now a shell over the sub-crates.

    Timing method (from #3195, required in every phase packet): cold nix build of pkgs/id (flake check phase) wall time on the laptop, before/after, plus cold cargo check with an empty CARGO_TARGET_DIR; record both on this issue. #3195 baseline: ~16 min cold nix build under shared load, 1,963 lib tests executing in 12.4 s — the cost is this one unit's compilation.

    Explicitly NOT in scope for any phase: behavior/API/CLI/wire changes, test weakening, profile work (#3195's track).

  8. dezren39
    added
    work/assignedQueue worker lifecycle state
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 1, 2026
  9. 373 remaining items

    Load more actions
  10. dezren39
    added sub-issues on Nov 12, 2026
    • pkgs/id crate split — step 1: extract id-caps (workspace + leaf foundation already landed as id-core) #4403
    • pkgs/id crate split — step 2: extract id-store, then id-events #4405
    • pkgs/id crate split — step 3: extract id-sync (log_sync + wire layer; artifact lands here) #4406
    • pkgs/id crate split — step 4: extract id-groups (groups/membership/encryption) #4407
    • pkgs/id crate split — step 5: extract id-worlds #4408
    • pkgs/id crate split — step 6: extract id-directory, then id-web #4409
    • pkgs/id crate split — step 7: extract id-cli; facade slimming #4411
  11. dezren39
    added
    epicMeta-issue grouping multiple items (org Project Type=Epic)
    epic/id-programReprioritization program epic (2026-11-12)
    epic/id-crate-splitEpic: id-crate-split - all issues of this effort carry it
    design/id-crate-splitDesign: id-crate-split - all issues of this effort carry it
    on Nov 12, 2026
  12. dezren39 commented on Nov 12, 2026

    @dezren39
    dezren39
    on Nov 12, 2026
    MemberAuthor
    More actions

    Lineage fix (2026-11-12, per Drew's directive that all work link to epics/boards/labels):

    • This issue is now a native sub-issue of pkgs/id: build-time review — runtime performance first, then build time (cold check build ~16 min, tests run 12 s) #3195 (its stated parent track), and pkgs/id: build-time review — runtime performance first, then build time (cold check build ~16 min, tests run 12 s) #3195 is now a native sub-issue of the ID epic epic: ID platform expansion — apps, comms, currency, hosting, boards (2026-10-28 directive, LIST 6–15) #2056.
    • All seven step issues (pkgs/id crate split — step 1: extract id-caps (workspace + leaf foundation already landed as id-core) #4403, pkgs/id crate split — step 2: extract id-store, then id-events #4405, pkgs/id crate split — step 3: extract id-sync (log_sync + wire layer; artifact lands here) #4406, pkgs/id crate split — step 4: extract id-groups (groups/membership/encryption) #4407, pkgs/id crate split — step 5: extract id-worlds #4408, pkgs/id crate split — step 6: extract id-directory, then id-web #4409, pkgs/id crate split — step 7: extract id-cli; facade slimming #4411) are now native sub-issues of this issue.
    • Labels unified across the chain: app/id, epic/id-program, epic/id-crate-split, design/id-crate-split (the latter two created today mirroring the existing epic/* and design/* label families); this issue also carries epic.
    • Board: org Project Bump build/buck/preludes/buck2-prelude from 3a02ea3 to 9530656 #4 membership/fields could not be set or verified from automation — the available gh token lacks the project/read:project scopes (INSUFFICIENT_SCOPES from the API). Needs gh auth refresh -s read:project,project interactively, then add epic: ID platform expansion — apps, comms, currency, hosting, boards (2026-10-28 directive, LIST 6–15) #2056/pkgs/id: build-time review — runtime performance first, then build time (cold check build ~16 min, tests run 12 s) #3195/pkgs/id: split the monolith crate into sub-crates along module seams (prioritized by Drew 2026-11-01) #3447 + steps with Area=ID.

    Full register: lineage manifest filed in pm-stack (lineage-manifest-2026-11-12).

  13. dezren39 commented on Nov 13, 2026

    @dezren39
    dezren39
    on Nov 13, 2026
    MemberAuthor
    More actions

    The pkgs/id crate split is complete — all seven steps landed, and this umbrella closes.

    What shipped

    Step Issue PRs
    1 id-caps #4403 #8611
    2 id-store / id-events #4405 #8641, #8656
    3 id-sync #4406 #8664, #8703
    4 id-groups #4407 #8730, #8747
    5 id-worlds #4408 #8754, #8762, #8768, #8772
    6a seams (WorldScopes → id-caps, hex → id-core) #4409 #9153
    6b id-directory #4409 #9181
    6c id-web #4409 #9298
    7a downward prep (seed_phrase, key_envelope, consts → id-core) #4411 #9340
    7b id-cli; facade slimming #4411 #9362

    Final shape: the facade id package is re-exports + main.rs + its retained feature modules; implementation lives in crates/: id-caps, id-cli, id-core, id-directory, id-events, id-groups, id-native-shell, id-store, id-sync, id-web, id-worlds. Two deviations were recorded on the step issues as they were made: id-worlds depends downward on id-directory (WorldCore owns a Directory as persisted state — #4409 close-out), and the facade's re-export surface is kept whole rather than pruned in step 7 (per-name retirement deferred to an API-tightening pass — PR #9362).

    Acceptance evidence

    • Fuel: FUEL_BUDGETS byte-identical after every step, including the last (verified by cmp against the pre-split snapshot at each PR).
    • Runtime spot benchmark (before/after, this laptop, debug builds, fresh scratch store per run, 10× 256 KiB put + 10× get + 5× list, medians of 3 runs): before = the baseline anchor 6741fc50a4 (steps 1–5 in, 6–7 not yet): put batch 1.36 s, get batch 0.37 s, list batch 0.37 s. After = current main 335ca94918: put 1.38 s, get 0.34 s, list 0.34 s. Parity within noise; get/list marginally better. (Steps 1–5's own runtime effect is covered by their step records plus fuel identity across all steps.)
    • Build times: full cold-ish cargo build -p id on this laptop (fresh target dir, broker lock, current fleet load): ~3–4 minutes both for the anchor tree and the final tree — the dependency graph dominates a from-scratch build, and pkgs/id: build-time review — runtime performance first, then build time (cold check build ~16 min, tests run 12 s) #3195's ~16-minute figure was a cold Nix build under the heavier shared load of 2026-10-31, so the two are not directly comparable. The split's build win is the incremental shape the monolith made impossible: per-crate cargo check on the extracted crates runs in seconds to ~1 minute warm (e.g. id-cli ≈ 8–45 s, id-web similar in this run's logs), and a change in one member no longer recompiles the whole application layer. The Nix gating derivation (id-web package) went from failing to compile its check phase on pre-split main (the suite-B visibility breakage) to compiling fully and stopping only at the pre-existing id: frames byte-refusal test fails on main (RequestTooLarge vs BudgetExhausted) — blocks id build + nixos-integration check #8354.
    • Coverage: no test deleted and no check weakened at any step; totals rose across the split (final: facade 973, id-cli 677 + 7 narrowed aliases tests, workspace members chunk 3,532, suite B 988 — deltas per PR are test-code moving with its implementation, each accounted on its PR). Remaining red is pre-existing and tracked: id: frames byte-refusal test fails on main (RequestTooLarge vs BudgetExhausted) — blocks id build + nixos-integration check #8354 (frames accounting), serve_tests web/iroh world test: forged join not refused with "join denied" (pre-existing, hidden by suite-B compile break) #9274 (serve world-presentation test, hidden for weeks by the suite-B compile break the split repaired), and the web/dist-manifest test that only passes with the bun-built assets (as in the Nix package build).

    One design-protocol item was not re-run in this final pass: benches/world_bench.rs criterion medians against the step-0 record. Fuel identity (the deterministic runtime gate) plus the spot pair above stand as the runtime evidence; a canary re-measure is a small follow-up if wanted.

  14. dezren39
    closed this as completedon Nov 13, 2026
  15. dezren39 commented on Nov 14, 2026

    @dezren39
    dezren39
    on Nov 14, 2026
    MemberAuthor
    More actions

    Packet-defect disposition under Drew's 2026-11-13 unblock-all order: task 13975 was cancelled (packet defect verified unchanged — see the task record) and replaced by fresh triage task 16472, now queued. Worker main-unblock-all-2026-11-13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)design/id-crate-splitDesign: id-crate-split - all issues of this effort carry iteffort/lLarge: multi-day or open-ended; expect staged check-insepicMeta-issue grouping multiple items (org Project Type=Epic)epic/id-crate-splitEpic: id-crate-split - all issues of this effort carry itepic/id-programReprioritization program epic (2026-11-12)expediteImportant - do this very soon, before anything not expeditedkind/enhancementpriority/highImportant and time-sensitivequeue/blockedQueue or user escalation statesource/creatorFiled by the new-issue-creator jobstatus/blockedQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.