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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
5
5
### Fixes
6
6
7
+
- Add persistent exact snapshot updates for dedicated Git-only readers so rows omitted by a newer filtered snapshot are removed without changing the merge-by-default behavior of richer local archives.
7
8
- Skip Discord members with a missing user object during pagination and record conversion so public sync no longer panics on a nil `User`. Thanks @SebTardif.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ discrawl publish --check
95
95
discrawl publish
96
96
```
97
97
98
-
The preflight is read-only and reports the export scope before any snapshot is written. Published snapshots exclude wiretap direct messages and local failure history. See [Git snapshots](docs/guides/git-snapshots.md) for repository layout, filters, media handling, and update behavior.
98
+
The preflight is read-only and reports the export scope before any snapshot is written. Published snapshots exclude wiretap direct messages and local failure history. Dedicated readers of privacy-filtered snapshots can subscribe with `--exact` so later omissions remove previously shared rows; normal subscriptions preserve richer local rows. See [Git snapshots](docs/guides/git-snapshots.md) for repository layout, filters, media handling, and update behavior.
- writes a config with `discord.token_source = "none"` (so no bot token is required)
25
-
- safely merges the latest snapshot into the local SQLite archive without deleting destination-only rows
26
+
- safely merges the latest snapshot into the local SQLite archive without deleting destination-only rows by default
26
27
- enables auto-refresh: read commands fetch and import when the local share import is older than `share.stale_after` (default `15m`)
28
+
- with `--exact`, persists `share.update_mode = "exact"` and makes the initial import plus later manual and automatic updates mirror the current snapshot
-`--no-import` - write config only; skip the initial pull/import
35
-
-`--force` - replace public snapshot tables so the local database exactly matches the snapshot
37
+
-`--exact` - persist exact replacement for this dedicated reader; rows omitted by later snapshots are removed
38
+
-`--force` - replace public snapshot tables for the initial import only; later updates still use the configured update mode
36
39
-`--with-embeddings` - import vectors that match your local `[search.embeddings]` identity
37
40
-`--no-media` - skip restoring cached attachment media files into `cache_dir/media`
38
41
39
42
## Disabled in this mode
40
43
41
44
`sync` and `tail` are disabled when `discord.token_source = "none"` because they need live Discord access. Switch to a token-equipped config to re-enable them.
42
45
46
+
Use `--exact` for a cache that must expose exactly the publisher's current privacy-filtered view. Do not enable it on a richer local archive: exact updates intentionally remove non-DM rows that are absent from the snapshot. The default merge mode remains appropriate for archives that also ingest Discord or desktop-cache data.
Copy file name to clipboardExpand all lines: docs/commands/sync.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ By default, `sync` runs both live/local sources and does **not** import the Git
7
7
- Discord bot-token sync for bot-visible guild data
8
8
- local Discord Desktop cache import for classifiable cached messages and proven DMs
9
9
10
-
Use [`update`](update.html) when you want to pull/import the shared Git snapshot. Routine imports upsert changed shards without deleting local cache rows. If you intentionally want a sync run to import the snapshot before live deltas, pass `--update=auto` for a stale safe merge or `--update=force` for an exact replacement. `--no-update` is accepted as an explicit no-op alias for the default.
10
+
Use [`update`](update.html) when you want to pull/import the shared Git snapshot. Routine imports upsert changed shards without deleting local cache rows. If you intentionally want a sync run to import the snapshot before live deltas, pass `--update=auto` for the configured stale update mode (merge by default) or `--update=force` for an exact replacement. `--no-update` is accepted as an explicit no-op alias for the default.
11
11
12
12
Run one explicit `--full` pass when you want a complete historical guild archive. Use plain `sync` afterward for frequent latest-message and desktop-cache refreshes.
13
13
@@ -44,15 +44,15 @@ discrawl sync --with-media
44
44
| Command | Use when | Behavior |
45
45
| --- | --- | --- |
46
46
|`discrawl sync`| routine refresh | skips member refreshes, checks live top-level channels plus active threads, only fetches new messages for channels with a stored cursor |
47
-
|`discrawl sync --update=auto`| hybrid Git/live refresh |safely merges a stale Git snapshot first, then runs the routine live refresh |
47
+
|`discrawl sync --update=auto`| hybrid Git/live refresh |applies the configured stale snapshot update mode first, then runs the routine live refresh |
48
48
|`discrawl sync --update=force`| intentional exact reconciliation | replaces public snapshot tables first, then runs the routine live refresh |
49
49
|`discrawl sync --all-channels`| repair pass | broad incremental sweep across every stored channel/thread, including archived threads |
50
50
|`discrawl sync --full`| historical backfill | crawls older history until channels are complete |
51
51
52
52
## Flags
53
53
54
54
-`--source <both|discord|wiretap>` - which archive sources to read
55
-
-`--update <auto|force|none>` - safe-merge a stale snapshot, force an exact replacement, or skip snapshot import before live deltas
55
+
-`--update <auto|force|none>` - apply the configured stale snapshot update mode, force an exact replacement, or skip snapshot import before live deltas
56
56
-`--full` - historical backfill (slow on large guilds)
57
57
-`--all-channels` - broader incremental sweep across every stored channel/thread
58
58
-`--latest-only` - explicit latest-only run (also the default for untargeted `sync`)
Copy file name to clipboardExpand all lines: docs/commands/update.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Pulls a Git snapshot and safely merges changed rows into the local cache.
4
4
5
-
Routine imports are delta-planned from crawlkit shard fingerprints, with a Git-object fallback for older manifests. Changed and new shards are upserted without deleting destination-only rows. Discrawl never falls back to an exact replacement unless you pass `--force`.
5
+
Routine imports are delta-planned from crawlkit shard fingerprints, with a Git-object fallback for older manifests. Changed and new shards are upserted without deleting destination-only rows. Discrawl never falls back to an exact replacement unless you pass `--force` or explicitly configure `share.update_mode = "exact"`.
- you set `--no-auto-update` when subscribing and want to refresh on demand
34
34
- a CI job already imported the latest snapshot but read commands still consider it stale
35
35
- you need an exact reconciliation after Discrawl reports removed shards or an incompatible table change (`discrawl update --force`)
36
+
- this is a dedicated filtered-snapshot reader configured with `share.update_mode = "exact"`, so every update must remove rows no longer present upstream
36
37
- you need to restore a named tag or commit while leaving the checked-out share branch untouched (`discrawl update --force --ref <ref>`)
37
38
38
-
Normal updates preserve rows learned from live Discord or the desktop cache, even when those rows are absent from the Git snapshot. Generated event history and local sync cursors are not replayed during routine merges. If a safe merge is impossible, Discrawl keeps the current database, marks the snapshot as needing attention in `status --json`, and asks you to rerun with `--force`.
39
+
Normal updates preserve rows learned from live Discord or the desktop cache, even when those rows are absent from the Git snapshot. Generated event history and local sync cursors are not replayed during routine merges. If a safe merge is impossible, Discrawl keeps the current database, marks the snapshot as needing attention in `status --json`, and asks you to rerun with `--force`. Exact mode instead replaces public snapshot tables on every update; use it only for a dedicated cache because destination-only non-DM rows are intentionally removed.
39
40
40
41
## How `sync` interacts
41
42
42
-
`discrawl sync` does **not** auto-import the share unless `--update=auto` (safe merge when stale) or `--update=force` (exact replacement before live deltas). Routine live refreshes stay fast; explicit imports happen via `update`.
43
+
`discrawl sync` does **not** auto-import the share unless `--update=auto` (configured update mode when stale) or `--update=force` (exact replacement before live deltas). Routine live refreshes stay fast; explicit imports happen via `update`.
update_mode = "merge"# "exact" for a dedicated snapshot-only cache
96
97
stale_after = "15m"
97
98
media = true
98
99
@@ -145,6 +146,7 @@ Set `discord.token_source = "keyring"` if you want to require keyring lookup and
145
146
- changing `db_path` does not migrate existing data; copy the file yourself if you want to keep history
146
147
-`sync.attachment_media = true` makes `sync` behave like `sync --with-media`; media bytes are cached under `cache_dir/media`, and CDN `404`/other fetch failures are recorded on attachment rows
147
148
-`share.media = false` makes publish/update/auto-update omit or skip restoring cached media; `subscribe --no-media` writes this for Git-only readers. With the default `share.media = true`, publish/update include cached non-DM media as gzip-compressed snapshot files, but publish does not fetch missing Discord files by itself.
149
+
-`share.update_mode = "merge"` preserves destination-only rows during update and auto-update. Set it to `"exact"` only for a dedicated snapshot reader whose public tables must mirror the current snapshot; exact updates remove non-DM rows that the publisher omits. `subscribe --exact` writes this setting.
148
150
-`[share.filter]` narrows only `publish` output; sync can still keep a richer local archive
149
151
-`share.filter.public_only` exports only channels visible to the guild
150
152
`@everyone` role after category/channel permission overwrites; private
`discrawl update` runs the same safe pull/merge step manually. `discrawl update --force --ref <tag-or-commit>` reads historical Git objects directly and leaves the share checkout unchanged. Snapshot imports are delta-planned from crawlkit shard fingerprints. Older manifests without those fields fall back to Git blob identity, so the common publish shape only imports changed canonical shards. Routine merges preserve destination-only rows and do not replay generated event history or remote sync cursors.
67
+
`discrawl update` runs the configured pull/import step manually. The default `share.update_mode = "merge"` is delta-planned from crawlkit shard fingerprints. Older manifests without those fields fall back to Git blob identity, so the common publish shape only imports changed canonical shards. Routine merges preserve destination-only rows and do not replay generated event history or remote sync cursors. `subscribe --exact` persists exact replacement for a dedicated snapshot-only cache, so rows omitted from newer privacy-filtered snapshots are removed during both manual and automatic updates.
67
68
68
-
Discrawl does not silently fall back to a full import. Removed shards and incompatible table changes leave the current database intact and require `discrawl update --force`. Forced updates replace public snapshot tables and rebuild search indexes; local DM rows remain untouched.
69
+
Discrawl does not silently fall back from merge mode to a full import. Removed shards and incompatible table changes leave the current database intact and require `discrawl update --force`. Forced and configured exact updates replace public snapshot tables and rebuild search indexes; local DM rows remain untouched. Exact mode intentionally removes other destination-only rows, so do not use it on a richer archive that also ingests live Discord or desktop-cache data. `--force` is a one-shot override; `--exact` is the persistent subscription contract.
69
70
70
-
`discrawl sync` does **not** auto-import the share unless `--update=auto` or `--update=force` is provided. Auto mode uses the safe merge; force mode performs exact replacement before live deltas.
71
+
`discrawl sync` does **not** auto-import the share unless `--update=auto` or `--update=force` is provided. Auto mode uses the configured update mode (merge by default); force mode performs exact replacement before live deltas.
0 commit comments