DiscordChatExporter/scripts/tests/test-fixtures/salvage-truncated.json
Copilot c13c4167be fix(scrape): salvage stale temp exports before re-downloading
When a previous export crashes (OOM, abort, kill), the partially-
downloaded temp export under .dce-temp/ was orphaned. Subsequent
runs started the incremental from the archive's last message ID,
re-downloading everything the failed run had already fetched.

Now scrape_target() checks for orphaned temp exports before each
channel export, salvages truncated JSON (same marker-based repair
as salvage-truncated-export.sh), merges recovered messages into
the archive, and cleans up stale temp dirs. The incremental then
starts from the truly latest message.

Adds salvage-stale smoke test with truncated fixture.
2026-06-03 01:11:28 -05:00

20 lines
391 B
JSON

{
"guild": {
"id": "222",
"name": "Fixture Guild"
},
"channel": {
"id": "111",
"name": "fixture-room",
"category": "Testing Grounds"
},
"messages": [
{
"id": "3",
"timestamp": "2026-01-03T00:00:00Z",
"content": "third"
},
{
"id": "4",
"timestamp": "2026-01-04T00:00:00Z",
"content": "fourth - this message is trun