You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(preview): avoid persisting cache and watch state during inspection #9
Repeat with status --watch, taking a new snapshot first.
No source commit needs to change: each invocation appends a refresh event.
Cache cases:
In a fresh temporary project, run list --branch main and inspect the newly created .agent/cache/sources checkout.
Add that source with --branch main, advance its main branch, then run update --scope project without --apply. Compare cached HEAD/FETCH_HEAD before and after.
Expected Behavior
Proposed contract: inspection does not persist changes to the existing source cache, watch ledger, resolved file, or installed content. Persisted refresh should be explicit.
Maintainer decision needed: whether ordinary refreshable caches are exempt from this contract. Documentation currently says watch commands refresh internally at Documentation/Reference/CLI.md:215–216, while line 222 calls diff read-only under "Cursor rules". The intended meaning of read-only should be explicit.
Completion checks:
Repeated diff/status does not append ledger events under the accepted inspection contract.
Preview side effects are tested at the CLI boundary, not only through WatchService.diff.
Swift version: not obtained in the read-only sandbox.
OS: macOS 27.0.1 (26A434).
Architecture: arm64.
Validation: static inspection only; reproduction not executed.
Decision needed
The current documentation describes both automatic cache refresh and read-only cursors, so this cannot be changed without choosing a boundary first: either inspection must not persist cache refreshes at all, or cache updates stay allowed and only managed records such as the watch ledger must remain unchanged.
Superseded by the design adopted in #29 (Commands, Source Cache). Previews may fetch into a source's mirror, which is a cache, but never change the declaration, lock, installed targets or watch state; the 0.2 watch ledger refresh no longer exists. Preview read-only behavior is covered by core tests.
Activity
showxu commentedon Oct 18, 2026
Superseded by the design adopted in #29 (Commands, Source Cache). Previews may fetch into a source's mirror, which is a cache, but never change the declaration, lock, installed targets or watch state; the 0.2 watch ledger refresh no longer exists. Preview read-only behavior is covered by core tests.