Skip to content

Config recovery glue: expose current group config bytes for re-store - #65

Merged
Bilb merged 1 commit into
session-foundation:mainfrom
mpretty-cyro:config-recovery-group-serialise
Aug 5, 2026
Merged

Config recovery glue: expose current group config bytes for re-store#65
Bilb merged 1 commit into
session-foundation:mainfrom
mpretty-cyro:config-recovery-group-serialise

Conversation

@mpretty-cyro

Copy link
Copy Markdown
Collaborator

Desktop's config recovery needs to put a group config back on the swarm after it expired from there. push() returns null for a sub-config with nothing to send, so there was no way to ask for the bytes of a config that is already clean.

  • pushForRecovery(): the current serialised GroupInfo and GroupMembers, whether or not they need pushing. groupKeys is deliberately absent — a stored keys message cannot be re-emitted, only replaced by an admin rekey. It still drains the obsolete-hash list as push() does, so the caller must issue the delete for the hashes it hands back.
  • activeHashesByConfig(): the same hashes as activeHashes() but kept per sub-config, so a caller can tell a re-storable GroupInfo/GroupMembers hash from a groupKeys hash that only a rekey can replace.

Both additive; no existing behaviour changes.

Desktop's config recovery needs to put a group config back on the swarm after it
expired from there. push() returns null for a sub-config with nothing to send, so
there was no way to ask for the bytes of a config that is already clean.

- pushForRecovery(): the current serialised GroupInfo and GroupMembers, whether
  or not they need pushing. groupKeys is deliberately absent — a stored keys
  message cannot be re-emitted, only replaced by an admin rekey. It still drains
  the obsolete-hash list as push() does, so the caller must issue the delete for
  the hashes it hands back.
- activeHashesByConfig(): the same hashes as activeHashes() but kept per
  sub-config, so a caller can tell a re-storable GroupInfo/GroupMembers hash from
  a groupKeys hash that only a rekey can replace.

Both additive; no existing behaviour changes.
@mpretty-cyro
mpretty-cyro requested a review from Bilb August 5, 2026 05:53
@mpretty-cyro mpretty-cyro self-assigned this Aug 5, 2026
Comment thread types/groups/metagroup.d.ts
@Bilb
Bilb merged commit fb63405 into session-foundation:main Aug 5, 2026
4 checks passed
@mpretty-cyro
mpretty-cyro deleted the config-recovery-group-serialise branch August 5, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants