Skip to content

Add a migration-only SPI to restore a member's own Update proposal - #109

Merged
germ-mark merged 1 commit into
mainfrom
llm/migrated-own-update-proposal
Sep 23, 2026
Merged

germ-mark merged 1 commit into
mainfrom
llm/migrated-own-update-proposal

Conversation

@germ-mark

Copy link
Copy Markdown
Contributor

Adds Group.insertMigratedOwnUpdate, behind @_spi(Migration): a narrow way to restore a member's own outstanding Update proposal when it was carried over from another implementation without the signed framing bytes that ProposalStore.insert requires. Without it, a peer that commits such a proposal by reference after migration leaves the migrated member unable to process that commit.

Every non-SPI path still requires a verified proposal. Before storing, the SPI checks:

  • the leaf is one of this group's own memberships;
  • the group id and epoch are the current ones;
  • the leaf node's own signature verifies;
  • the Update validity policy passes, using the same member roster as incoming Updates (now a shared currentMemberRoster(); the receive path is unchanged);
  • the membership holds a current-epoch pending secret for the leaf's encryption key, and an HPKE round trip proves that secret opens under it.

It never overwrites an existing entry. A mis-paired ref never mis-applies: the commit fails closed. The docs say it must only ever be fed the member's own local archive data, never network input.

Tests: a happy path, including after a snapshot round-trip; one isolated rejection per check (removing any one check makes that test's insert succeed); swapped-ref, overwrite and multi-membership scoping cases.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 66ba6c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@germ-network/swift-mls Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

A migrated consumer may have a member's outstanding Update proposal
only as {proposal, sender, ref}, without the signed framing bytes
ProposalStore.insert normally requires to re-verify. Group.insertMigratedOwnUpdate
(@_spi(Migration)) restores it under strict, narrower checks in place
of that framing signature: the proposal must be for the local
membership that proposed it, current epoch and group, the leaf's own
signature and §7.3 validity policy must hold, and that membership's
own retained pendingUpdate must both name this exact encryption key
for the current epoch and, by an HPKE seal/open round trip, prove the
paired secret genuinely opens what it seals to that key — a name
match alone (e.g. from a snapshot restore, which also stamps
pendingUpdate without cross-checking secret against public key) is
not proof of possession. The store-level write refuses to overwrite
an existing entry, verified or migrated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@germ-mark
germ-mark force-pushed the llm/migrated-own-update-proposal branch from a15c0a3 to 66ba6c4 Compare September 23, 2026 14:59
@germ-mark
germ-mark merged commit 810186b into main Sep 23, 2026
4 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 23, 2026
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.

1 participant