GeezerVison is showing github.com — pkgs/id crate split — step 4: extract id-groups (groups/membership/encryption) · Issue #4407 · developing-today/code
pkgs/id crate split — step 4: extract id-groups (groups/membership/encryption) #4407DescriptionCrate split step 4 of 7 — from the merged design
Design: doc/2026-11-01T16-53-00Z_design_id_crate_split/2026-11-01T16-53-00Z_design_id_crate_split.md (merged as PR #3824, 2026-11-01). Tracking issue: #3447. Program: #3195 (build-time review; Drew's priority order — shipped-binary runtime performance first, build time second).
Scope (design, verbatim intent)
Design step 4: id-groups. Groups/membership/encryption extract; seam 5 (encryption's session leak) is cut, and seam 6's bridge file leaves for its future home in id-worlds.
Current state
Not started.
Dependency — do not start early
Step 3 (id-sync) merged. If this step's queue task is claimed before the dependency lands, park it with that reason.
Fuel canary (non-negotiable, every step): the FUEL_BUDGETS tables in pkgs/id/src/sandbox.rs must be byte-identical after this step; the fuel-tables diff is committed in the step PR. Any drift means behaviour changed and the step stops. Full verification protocol: design note §"Verification protocol".
Verification protocol (design, every step): one PR; main green throughout; the shipped binary is built by the same Nix derivations at every point (all three entry points: the sub-flake's id-web and id-lib, and default.nix); test count matches or exceeds the step-0 baseline with any delta named; cold check-build timing recorded on #3447 and #3195 with the laptop load noted. Heavy builds run under ~/tools/fleet-build-lock on the laptop (max 2 concurrent, CARGO_BUILD_JOBS = half the cores) — there is no load gate (Drew, 2026-11-02).
Acceptance criteria
- The extraction lands as its own PR off current main, sequenced after its predecessor step (see Related).
- The id facade re-exports the extracted crate so existing call sites compile unchanged in behavior.
- CI green on the PR (workspace build + the id test suites), including the F11.10 production-line guard.
- This issue closes with the merge; the next step's issue is unblocked in sequence.
{
"pm_meta": 1,
"direct_parent": {
"repo": "developing-today/code",
"number": 3447,
"kind": "sub-issue"
},
"links": [],
"provenance": {
"actor": "dezren39",
"ingested_by": "metadata-sweeper",
"ingested_at": "2026-11-24T03:22:26.277Z"
},
"ascertained": {
"title": "pkgs/id crate split — step 4: extract id-groups (groups/membership/encryption)",
"state": "CLOSED",
"labels": [
"kind/performance",
"task/small-fix",
"status/blocked",
"source/creator",
"priority/high",
"app/id",
"queue/blocked",
"work/assigned",
"effort/l",
"meta/enriched",
"expedite",
"epic/id-program",
"epic/id-crate-split",
"design/id-crate-split"
],
"milestone": null,
"created_at": "2026-11-02T15:23:14Z",
"updated_at": "2026-11-12T18:43:55Z",
"closed_at": "2026-11-11T18:23:07Z"
}
}
Activityadded app/idPackage/app: id (pkgs/ or apps/ in this repo) effort/lLarge: multi-day or open-ended; expect staged check-ins and removed on Nov 2, 2026dezren39 commented on Nov 2, 2026 Pickup by repo queue worker lane C for task 6301 (crate split step 4 of #3447). Sequence revalidation at 2026-11-02T15:52Z: step 3 (#4406, extract id-sync) is still OPEN and no merged PR for it was found, so step 4 does not start early. Task 6301 parks until #4406 lands.
dezren39 commented on Nov 2, 2026 Parked by repo queue worker lane C (task 6301): sequence gate not met at 2026-11-02T15:52Z — step 3 (#4406) still OPEN, not merged. Resume condition: #4406 closed/merged; then start the id-groups extraction per task 6301 (canary: FUEL_BUDGETS byte-identical; builds under ~/tools/fleet-build-lock per the packet's build policy).
dezren39 commented on Nov 8, 2026 🤖 Agent note · handed off
developing-today commented on Nov 8, 2026 dezren39 commented on Nov 11, 2026 Step-4 consequence from step 2b (landed, see #4405 close-out):
Under the coordinator's design ruling recorded on #4405, the group model and groups::fold are group-projection vocabulary owned by the events layer and now live in id-events (id_events::groups: model types, policy, fold, delegation, friendship, event, wire), along with idset, pull_policy, world_access::WorldAccess and local_claims. PRs #8656 (merge b8be94f) and #8664 (merge 33bad1e); the facade's id::groups is a shim re-exporting them.
So when step 4 runs, id-groups = the policy/enforcement remainder over id-events, depending on it: what is still in the facade's src/groups/ is actions, log (GroupLog), warnings, worlds — plus the wider step-4 scope named in this issue's title (membership logic, encryption, access, blob_gate and the pull-policy enforcement side; blob_gate already re-exports WorldAccess from id_events::world_access, and pull_policy's implementation already lives in id-events with only facade test fixtures remaining in the shim). The model/fold do not move again in step 4. dezren39 commented on Nov 11, 2026 Step 4 landed — closing.
PR: #8754 — merged with merge commit 850f2fce3150d27c3262deec6a8dc2e0515f3d0b (branch crate-split-step4-id-groups, commit 965984f18f).
What moved — implementation exists only in the new pkgs/id/crates/id-groups crate (deps per the design map: id-core, id-store, id-events):
- groups remainder:
actions.rs, log.rs (GroupLog), warnings.rs. id_groups::groups re-exports the id_events::groups model at the same paths, so moved files' references resolve unchanged; the dead pub(crate) wire re-export in log.rs (no consumer at HEAD) was dropped. Per the consequence recorded here from step 2b, the model/fold/policy/friendship did not move again.
encryption/ whole (scheme, history, notice, ordering, roster, welcome, tests).
blob_gate gate logic (BlobPolicy, Request, decide, decide_with_blocks, blob_events*, the WorldAccess re-export).
- NOT this step, as scoped:
groups/worlds.rs stays in the facade (seam 6 → id-worlds, step 5). The facade src/groups/ now holds only the shim + worlds.rs, re-exporting actions/log/warnings from id-groups, so step 5 lifts worlds.rs straight out.
Facade paths id::groups::*, id::encryption, id::blob_gate compile unchanged; the facade's now-unused p2panda-encryption dependency moved to id-groups with identical features.
Seam 5 resolution: already cut by step 3a — MAX_FRAME_BYTES is defined in id_core::frames (1024 * 1024); world_session only re-exports it. The leak in the moved code was encryption/welcome.rs (+ one test line) naming it via crate::world_session; both now name id_core::frames::MAX_FRAME_BYTES. Same constant, same value, no relocation, no behaviour change. Also: scheme.rs names id_core::rejection::Reason; history.rs names id_store::policy::History (its home since 2a).
blob_gate treatment: split, mirroring step 2a's store_traits pattern. FoldedWorlds (the WorldAccess impl over groups::worlds::Worlds) genuinely needs the step-5 world-fold type, so it stays in the facade src/blob_gate.rs (re-exports + adapter + its four folded tests) and moves together with worlds.rs in step 5. The gate's table/proptest tests moved; the blocked-member test uses a small local BlockList stub in id-groups (the facade pull_policy::testing stub folds through worlds and cannot live below it).
Verification (laptop, fresh CARGO_TARGET_DIRs — the cargo-target-broker is broken fleet-wide):
- Baseline on unmodified main (
05354175d2) taken first. Note main gained a pre-existing breakage today: full cargo test --no-fail-fast stops at tests/probe_attestation_sign.rs E0061 ×2 (sign_claim gained a &GenesisAgreement parameter in f998d27 without updating the salvaged probe). Counting run (all targets except that probe + the feature-gated dht_testnet): 3,670 passed, 1 failed, 8 ignored, 62 suites — the one failure is the known frames::tests::byte_refusal_… (pkgs/id: frames byte_refusal test fails deterministically on main (RequestTooLarge vs BudgetExhausted) #8620). Doc tests 19 passed.
- After: identical counts — 3,670 passed, 1 failed (same test), 8 ignored, 63 suites; the delta is an exact redistribution (facade lib 2,090 → 1,975 passed / ignored 4 → 3; new id-groups suite 115 passed / 1 ignored; every other suite identical). Doc tests 19 passed / 0 failed. Full unfiltered run fails with the identical probe error only.
- Fuel canary:
src/sandbox.rs sha256 db88ec8d…80b5 unchanged; print_fuel_baseline byte-identical (72 lines, sha256 59cfad49…32c both runs).
- Nix:
nix build ./pkgs/id#id-lib on this branch and on unmodified main both pass the build phase and fail the check phase on the same probe compile error (explicitly run both) — parity. The known cli_tests Roc-sandbox failure sits behind that compile error and is unreachable until the probe is fixed upstream.
- Feature shapes:
--no-default-features and +world-only checks fail identically on main and this branch (identical error-location sets, minus one diagnostic on the removed dead re-export).
- Completeness grep: no groups/encryption/blob_gate implementation remains in facade
src/ (only shims + the FoldedWorlds adapter).
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|