A vault no longer listed: its unsent changes are reported and can be dropped (#1000) #27
Loading…
Reference in a new issue
No description provided.
Delete branch "board/1000-7093ac"
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?
Ticket: https://agentboard.icefish-betta.ts.net/#1000
Merge order: stacked on PR #25 (#999), which is stacked on PR #24 (#997), which waits on PR #18 (#979). Merge those first. Then run
git merge origin/main --no-edithere and the diff shrinks to this ticket. Until then, review againstboard/999-5d4440.When the server stops listing a vault (you were removed, or it hides the vault),
sync()moves it intoSession::hidden. Unsent changes to it used to stay on the device with no warning, and nothing could drop them.Session::discard_changesnow accepts a hidden vault. It can't be downloaded, soVault::forgetresets it to its rollback guard (manifest counter and hash) and nothing else, so nothing can push the dropped changes. Its items were already invisible.since=0&latest=true).applylets such a vault start from the latest manifest, but refuses (Rollback) one older than the kept counter, or a different one at the same counter.hiddeninstead of being dropped, so the next sync is still guarded (this matters for long sessions such as MCP and the apps).plaintext vault resetresolves hidden vaults too (Session::vault_or_hidden).Session::vaultis unchanged, because other commands indexvaultswith its result.Tests
a_vault_no_longer_listed_can_drop_its_unsent_changes, in two parts.sync_and_server_tamperingchecks that a reset vault refuses an older copy and a same-counter fork, and accepts the real one.applyguard, the same-counter half, and the error-arm change.cargo clippy --all-targets -D warningsandcargo test --workspace --lockedpass.🤖 Generated with Claude Code