Repository navigation
feat(core-sync): personal records go up sealed under the personal key at keyed wire ids - #4815
Merged
Merged
Conversation
… at keyed wire ids
# Conflicts: # core/crates/sync/tests/engine/approvals.rs # core/crates/sync/tests/engine/rules.rs
This was referenced Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
tablepro-keys:record.rsseals a personal record whole under PK with AES-256-GCM. The subkey and the AAD bind origin, account, kind, wire id andkv; the plaintext holds the local id,rvand the fields or a deletion.record_id_keyderives NK from the PK root andwire_idgives~and 52 Base32 symbols. Labelsrecord-key,recordandrecord-id.vectors/records.json.tablepro-records:kind::is_personal_data.tablepro-sync, the pass:idagainst its wire id, and judges it by key version and the per-record floor. A taken copy merges against the floor's copy, not the base.usertombstones, refills, policies back on). Seals again after a rotation only copies it wrote.sentdigest.sealed_idsmaps wire ids back for tombstones and held copies. A new PK root, as after a kind 3 reset, starts the scope over.TablePro-Sealed-Records: 1on every/v2/synccall. Withoutsealed_recordsthe personal scope syncs key objects only and the status sayssync.server_too_old.sealed_marksrow starts the personal scope over before it pushes.tablepro-sync, the state file: schema 4 addssealed_floors,sealed_idsandsealed_marks; oldest reader 4.tablepro-sync, secrets: a pull that moves a record's destination takes its synced secrets out of the store before the record lands, and holds the record when the store cannot. The envelope is held back, not deleted, and a move back lands it again.tablepro-ffi: a connect gets no stored secret once the connection points elsewhere than when the connect read it, and asks.sync/testing: the capability, the header,sealed_required,bad_record_idfor a personal id that is not a wire id, the currentkvcheck, plaintext rows skipped and a sealed create over one.tests/engine/*read and write personal records sealed, through the harness'sstored_personalandpush_sealed; the harness serves the account's personal key version 1.pass.rs:a_batch_sent_again_keeps_its_key_until_the_server_forgets_itandthe_queue_survives_a_restartuse a team record, since a sealed retry seals again under a new nonce; the envelope refusal tests start with no personal key.keys.rsserves no personal key record, as its tests push their own;stop.rscounts only non-key bases;rules.rsholds a store-refused copy sealed.sync/testingservice/tests.rs: the generic record rules run on a team's plaintext.account_keys/personal.rs:a_rewritten_destination_is_the_approval_caseis nowa_rewritten_destination_holds_the_secret_back.Test plan
tests/engine/sealed.rsandtests/engine/destinations.rs: each case of ADR 0114's Tests fortablepro-syncbut the approval ones, which feat(core-sync): only a team's changes wait for approval, and rows older builds left settle #4812 covers.sync/testingservice/tests.rs: the fake server'ssealed_required,bad_record_id, key version, header and capability rules.tests/state_integrity: the sync digest frames the three tables, and a build of format 3 is no reader of this build's file.vectors/records.jsonchecked byevery_committed_case_holds.verify.sh corefor keys, records, sync, sync-testing and ffi.