GeezerVison is showing github.com — id: group-encryption sessions consume keyset device sets (#2380 packet 3) by developing-today-fleet[bot] · Pull Request #15030 · developing-today/code
Conversation
Refs #2380, Refs #13955 — packet 3 of the keyset ADR (§7): group-encryption per-device sessions consume the folded keyset device set.
Summary
The DataScheme adapter's roster is no longer the group view's raw member keys. Membership binds to an identity (its genesis admin key, ADR Decision 1); the roster is the expansion of each member identity into its active keyset device keys — one session per device, enrolment and revocation living in the keyset log, not in the encryption layer (ADR §6).
- id-groups (
encryption): new DeviceSets — member identity → its folded active device keys, with the single-key fallback (a member with no recorded set is its own only device; a member recorded with an empty set holds no session). Session::create / add / add_with_history / add_from_join / remove / recover take &DeviceSets; the preconditions and the roster check in change work on the expansion. No new crate dependencies: id-groups' design-map dependencies (id-core, id-store, id-events) are unchanged — the adapter consumes plain key sets.
- id-directory (
keyset): KeysetState::active_device_keys() — the folded active (unrevoked) device keys as raw key bytes.
- id-cli (
commands::keyset): device_sets() builds the adapter's DeviceSets from folded keysets keyed by member identity — the composition a session host calls.
Evidence
Test-first: a0662f679 lands the tests with the API threaded but not yet consumed; 3e3512a69 consumes it; b881b39a7 is rustfmt only; f72e167f7 fixes a delivery mistake in one new test (below).
- Red, id-groups (run 45590234701, Linux, ref
a0662f679): encryption suite 84 passed / 3 failed / 1 ignored — the failures are exactly the three new session tests, at their create/add/remove expectations: test_keyset_create_gives_every_device_of_a_member_a_session, test_keyset_newly_enrolled_device_is_added_without_a_membership_change, test_keyset_revoked_device_is_removed_while_its_member_stays. The DeviceSets expansion unit test already passed (the type was complete; the adapter ignored it).
- Red, id-directory + id-cli (run 45599479970, macOS, ref
a0662f679): keyset suite 26 passed / 1 failed — active_device_keys_excludes_revoked_devices; cli filter 0 passed / 1 failed — device_sets_cut_each_member_to_its_active_devices. (These legs cannot build on the Linux executor image — it cannot execute the ring/aws-lc build scripts, known defect fleet-command executor: ring/aws-lc-sys build-script binary fails to execute (os error 2) — native build-script dependency trees unbuildable dezren39/fleet#111 — so they run on the macOS target.)
- Green, id-groups (run 45601129836, Linux, ref
f72e167f7): 87 passed / 0 failed / 1 ignored, GROUPS_EXIT=0; all four keyset tests ok by name. First green attempt (run 45597499857, 86/1) failed only the enrolment test: the test had not delivered the create envelope to the joining device, which the cast convention requires ("a joiner needs the control history to take the welcome") — a test delivery fix, no adapter change.
- Green, id-directory + id-cli (run 45606537652, macOS, ref
f72e167f7): keyset suite 27 passed / 0 failed (DIRECTORY_EXIT=0, active_device_keys_excludes_revoked_devices ok); cli filter 1 passed / 0 failed (CLI_EXIT=0, device_sets_cut_each_member_to_its_active_devices ok).
- No new test files — all tests live in existing suites (
id.rust.unit venue: cargo test --lib in pkgs/id), so no registry row is owed.
- Evidence level: not built on the seat; verified on GitHub Actions via the fleet-command workflow (remote-only build rule).
Merge danger
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…acket 3, red)
New tests name the packet-3 behaviour: a group session's roster is the
expansion of member identities into their folded keyset device sets.
- id-groups encryption: DeviceSets type added and threaded through
Session create/add/add_with_history/add_from_join/remove/recover;
the adapter still cuts the roster from the raw view in this commit,
so the three new session tests fail by assertion.
- id-directory: KeysetState::active_device_keys added; it does not yet
exclude revoked devices, so its test fails by assertion.
- id-cli: commands::keyset::device_sets added; it does not yet read the
folded states, so its test fails by assertion.
All pre-existing call sites pass DeviceSets::new() (the single-key
fallback), so existing behaviour is unchanged.
…t 3)
The DataScheme adapter now cuts its roster from the folded keyset
device sets: Session create/add/add_with_history/add_from_join check
the target device key against the expansion of the view's members,
remove checks it is gone from the expansion, and the roster check in
change compares against the expansion. A member identity with no
recorded set is its own only device, so single-key behaviour is
unchanged. KeysetState::active_device_keys now excludes revoked
devices, and commands::keyset::device_sets builds the adapter's
DeviceSets from folded keysets keyed by member identity.
coderabbitai
Bot
commented
Nov 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
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:
059d5a65-90ec-404f-8405-aa52db836008
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- 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.
…t test (#2380 packet 3)
A joiner needs the control history to take its welcome (the tests.rs
module convention): device 12 must hear the create before the add, or
its session takes no roster from the welcome. The adapter was right;
the test's delivery was not.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 27, 2026
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.
|