Hashed manifest envelopes, paged pulls, history in the quota (#994) #32
Loading…
Reference in a new issue
No description provided.
Delete branch "board/994-e74e21"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Board #994. Stacked on #18 (ticket #979), which this builds on (its quota counting and staged pushes), so it targets
board/979-ebe940. Once #18 merges, retarget it tomain.Bounds a vault's manifest and roster history and pages pulls. DESIGN.md is updated (Servers and accounts, Sync, Wire API, Known limits).
Paged pulls
GET /v1/vaults/{id}sends rosters, then manifests, then items (by id), each in order, up to about 16 MiB per response. Every response carries at least one entry, andmore: truemeans more pages follow.roster,fromandafterset to the last entry of each kind it has, plusatset to the counter its first page showed. If the vault has moved on, the server answers 409 and the client starts over (five tries).Vault::applyonce, so a failure still changes nothing.Refused, not "held back", so no files are collected from stale state.MAX_PUSH(at most 64 MiB of items per push) is gone, along with the import pre-check that relied on it. Any vault can now be pulled by a new device and can change its key (staged), which settles the #979 review comment on this ticket.Hashed manifest envelopes
sealed_hash, and the sealed part travels next to it (VaultPut.sealed,NewVault.sealed, andVaultResponse.sealedfor the latest manifest).x''in a newmanifests.sealedcolumn, so each push adds about 400 bytes of history for good. Envelopes are capped at 512 bytes.android-0.1.0-test.*).Quota counts history
usagecounts every roster version and every manifest envelope, plus the latest sealed part.rosters.countedand NULLmanifests.sealed, both added by migration), since nobody can delete them.narrows). Anything else needs room.Tests
manifests_sign_the_hash_of_their_sealed_part(old form → new form, a tampered or missing sealed part, an envelope with both forms or neither) andpull_query_pages.narrowing_roster_changes.creator_migrationnow also covers the new columns and what counts toward the quota.paged_pulls: 4 KB pages; catching up and fresh pulls; a push landing between pages; restart exhaustion; a server that replays pages; agent audit withat.manifest_history_stays_small: only the latest sealed part is kept; usage counts history; old-form envelopes, envelopes without a hash and over-size envelopes are refused.manifests_from_older_apps: a database whose latest manifest is old-form, with catch-up, a fresh start and an over-quota delete on top.storage_quotais updated for the new rules.cargo test --locked --workspaceandcargo clippy --workspace --all-targets --lockedpass.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.