Repository navigation
fix(sync,sandbox): stop prompt replays from edited logs and protect Host stores - #784
Merged
Merged
Conversation
…ost stores - session-sync: a log changed on disk after publication is put back to the accepted history without re-asking its prompts - session-persistence-jsonl: a log with a corrupt header is left out of listings instead of failing the whole listing - session-handoff/session-controller: stop and queue edits reach a turn another device runs when only the index marks it running - sandbox: protectedRoots that no access mode may write, enforced by the file tools, Seatbelt, bwrap, and full-access bash on macOS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…document protectedRoots Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…protected Host stores Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
An agent on a new desktop account wrote 22 session logs straight into
~/.aeven/sessionsand rewrote them about ten times. Four product defects turned that into 372 runaway turns, a Host that would not start, and a Stop button that did nothing. This PR fixes all four.Changes
session-sync).rewrite()asks dropped prompts again only when the accepted events belong to another device's claim. If the log diverges under this device's own claim, the file was changed on disk after it was published, so the log is restored to the accepted history and nothing is re-sent.session-persistence-jsonl). Header failures are nowCorruptSessionHeaderError. Listings skip that log with a warning; loading it by id still fails with the cause.session-handoff,session-controller). NewSessionHandoff.turnElsewherefalls back to the index entry'srunningmark andwriterdevice.cancelandupdateQueueroute through it when no agent is attached locally.sandbox,sandbox-policy,sandbox-local,fs-sandbox,bash-sandbox, base bundle). NewprotectedRootscovers$AVN_HOME/{sessions,storages,accounts,session-query,identity,keys}:SandboxProvider.protectconfinesdanger-full-accessbash with an allow-default profile that holds only those denialsTests
Four persistence tests expected a corrupt header to reject the whole listing. They now expect the log to be left out of the listing, which is the new behavior.
Not covered
These are listed in the Agent Note:
pkillon its own HostChecks
AVN_GATE_FAIL_FAST=1 pnpm run check:ci: 56 passed.pnpm run test: 5 failures while it ran alongside check:ci. All 113 tests in those 4 files pass when rerun alone: oxlint-contract, code-runtime-python, sync-yjs provider-lan, typert tools-catalog.🤖 Generated with Claude Code