Commit 12c3325
release: 2.0.1-beta4 — pending-deletions queue replaces phantom snapshots (PUSH-REORG Phase 2)
Replaces the 2.0.1-beta2 phantom-snapshot trick used by pull-side
sanitize with an explicit pending-deletions queue (`<configDir>/
plugins/<self>/.pending-deletions/`). The SnapshotStore invariant
('every row is a path observed on GitHub at the recorded SHA') is
restored — phantom rows with mtime=0/size=0 are no longer written.
One-pass migration runs on first plugin load: any leftover phantom
rows from beta2/beta3 are moved into the queue with
`source: 'migration-from-snapshot'` and removed from the
snapshot. Idempotent — second load finds nothing to move.
Plugin Reset (Settings → Reset) wipes the queue alongside snapshot
+ conflict store + push-queue. Plugin uninstall is OS-handled
(Obsidian removes the entire `<configDir>/plugins/<self>/`
directory).
Pre-flight validation (PUSH-REORG §3.1, Phase 1) now also drops
stale entries from the queue — without this, a stale entry would
re-inject into every subsequent push and the validator would
re-drop it indefinitely (one wasted HTTP roundtrip per sync).
Observable behaviour from a user's perspective is unchanged:
- A forbidden-named file pulled from GitHub still gets sanitized
to a canonical local name.
- The next sync still deletes the forbidden name from GitHub and
adds the canonical name.
- A multi-device race where another device sanitizes first still
resolves cleanly (validator drops the now-redundant deletion).
Internal mechanics are cleaner:
- Snapshot store stays a verifiable cache of observed-remote state.
- Pending-deletions queue is named for what it does: 'these paths
should be deleted from GitHub on the next push.'
- Source tags ('pull-side-sanitize' / 'migration-from-snapshot' /
'manual') make the activity log diagnosable.
See docs/PUSH-REORGANIZATION.md §3.2 + §4 (Phase 2 row).
Tests: 14 new unit tests for the store; 1 unit test for the
migration source-tag contract. F-series sanitize integration tests
all pass against real GitHub (same behavior, new internals).
Pre-flight integration test still passes (validator now cleans
both stores). Total: 584 unit tests, was 570 before this branch
(+14).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ba9ca22 commit 12c3325
4 files changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
21 | 22 | | |
0 commit comments