diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e2368f94..690ed0d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -79,6 +79,7 @@ jobs: ./scripts/tests/scrape-here-smoke.sh ./scripts/tests/bootstrap-recurring-scrape-smoke.sh ./scripts/tests/audit-archive-json-smoke.sh + ./scripts/tests/prove-incremental-append-smoke.sh test: # Tests need access to secrets, so we can't run them against PRs because of limited trust diff --git a/docs/plans/2026-05-29-019-feat-lfg-closure-plan.md b/docs/plans/2026-05-29-019-feat-lfg-closure-plan.md new file mode 100644 index 00000000..23eede91 --- /dev/null +++ b/docs/plans/2026-05-29-019-feat-lfg-closure-plan.md @@ -0,0 +1,52 @@ +--- +title: feat: LFG closure — prove smoke and workspace bridge +type: feat +status: complete +date: 2026-05-29 +origin: Repeated /lfg — recurring scrape stack complete; close gaps for operators and CI +--- + +# feat: LFG closure — prove smoke and workspace bridge + +## Summary + +Recurring scrape is feature-complete on `feat/recurring-cli-scrape`. This slice adds an offline prove smoke test, documents audit/salvage in the GUI zip bridge, and refreshes the open PR summary. + +## Requirements + +| ID | Requirement | +|----|-------------| +| R1 | `prove-incremental-append.sh` supports `--snapshot-only` for offline verification | +| R2 | `scripts/tests/prove-incremental-append-smoke.sh` validates invalid JSON skip + grow-only compare | +| R3 | CI `recurring-scrape-smoke` job runs prove smoke | +| R4 | `DiscordChatExporter.linux-x64/RECURRING-SCRAPE.md` mentions audit/salvage | +| R5 | PR #1538 body includes plan 018 audit/salvage summary | + +## Implementation Units + +### U1. Prove snapshot-only mode + +**Files:** `scripts/prove-incremental-append.sh` + +Add `--snapshot-only` that writes snapshot TSV and exits (no Discord scrape). + +### U2. Prove smoke test + +**Files:** `scripts/tests/prove-incremental-append-smoke.sh` + +Fixture archives: valid JSON, invalid JSON (skipped), then simulate grow-only compare. + +### U3. Workspace bridge + +**Files:** `../DiscordChatExporter.linux-x64/RECURRING-SCRAPE.md` (sibling path from repo: document in plan as operator copy target — implement via `scripts/sync-workspace-bridge.sh` or direct edit if path exists) + +Use repo-relative note: bridge file lives beside repo at `DiscordChatExporter.linux-x64/RECURRING-SCRAPE.md`. + +### U4. PR body refresh + +Update PR #1538 via `gh pr edit` with Latest section for `a2aeaaa` and plan 019. + +## Verification + +- `./scripts/tests/prove-incremental-append-smoke.sh` +- All existing `scripts/tests/*.sh` pass diff --git a/scripts/prove-incremental-append.sh b/scripts/prove-incremental-append.sh index 3034700e..82ef40a4 100755 --- a/scripts/prove-incremental-append.sh +++ b/scripts/prove-incremental-append.sh @@ -13,6 +13,8 @@ usage() { cat <"$ARCHIVE_ROOT/demo/Guild - general [111111111111111111].json" <<'JSON' +{ + "guild": {"id": "1", "name": "Guild"}, + "channel": {"id": "111111111111111111", "name": "general"}, + "messages": [ + {"id": "1", "timestamp": "2020-01-01T00:00:00+00:00", "type": "Default", "content": "one"} + ], + "messageCount": 1 +} +JSON + +printf '{"messages":[\n' >"$ARCHIVE_ROOT/demo/truncated [222222222222222222].json" + +cat >"$CONFIG_PATH" <&2 + exit 1 +fi +if grep -q '222222222222222222' "$BEFORE"; then + printf 'ERROR: invalid JSON file should be skipped in snapshot\n' >&2 + exit 1 +fi + +cat >"$ARCHIVE_ROOT/demo/Guild - general [111111111111111111].json" <<'JSON' +{ + "guild": {"id": "1", "name": "Guild"}, + "channel": {"id": "111111111111111111", "name": "general"}, + "messages": [ + {"id": "1", "timestamp": "2020-01-01T00:00:00+00:00", "type": "Default", "content": "one"}, + {"id": "2", "timestamp": "2020-01-02T00:00:00+00:00", "type": "Default", "content": "two"} + ], + "messageCount": 2 +} +JSON + +DCE_PRIMARY_CONFIG="$CONFIG_PATH" "$PROVE" --target demo --snapshot-only --snapshot-file "$AFTER" +"$PROVE" --compare-snapshots "$BEFORE" "$AFTER" + +if "$PROVE" --compare-snapshots "$AFTER" "$BEFORE" 2>/dev/null; then + printf 'ERROR: shrink comparison should have failed\n' >&2 + exit 1 +fi + +printf 'prove-incremental-append-smoke: ok\n'