diff --git a/docs/plans/2026-06-04-085-feat-operator-handoff-kotor-hint-plan.md b/docs/plans/2026-06-04-085-feat-operator-handoff-kotor-hint-plan.md new file mode 100644 index 00000000..0fc1670d --- /dev/null +++ b/docs/plans/2026-06-04-085-feat-operator-handoff-kotor-hint-plan.md @@ -0,0 +1,52 @@ +--- +title: "feat: operator-handoff KotOR catch-up hint" +type: feat +status: complete +date: 2026-06-04 +origin: /lfg — plan 084 synced docs; handoff still omits KotOR wrapper from post-complete next steps +--- + +# feat: operator-handoff KotOR catch-up hint + +## Summary + +When `KotOR_discord_msgs` is enabled in scrape config, `operator-handoff.sh` prints a post-complete hint pointing at `run-kotor-yes-general-catchup.sh`. Refresh merge-readiness HEAD and PR #1538 Latest for plans 070–085. + +## Problem Frame + +Operators run `operator-handoff.sh` before first scrape or cron install. After plan 083, the KotOR yes_general path lives in a dedicated wrapper, but handoff only suggests generic `run-documents-scrape.sh`. + +## Requirements + +| ID | Requirement | +|----|-------------| +| R1 | After successful handoff (dry-run or salvage-only), if `KotOR_discord_msgs` is enabled, print KotOR wrapper hint | +| R2 | Hint includes `run-kotor-yes-general-catchup.sh` and summary inspect line | +| R3 | No hint when KotOR target disabled or absent | +| R4 | `operator-handoff-smoke.sh` covers hint with KotOR fixture config | +| R5 | Merge-readiness HEAD + plan 085 bullet | +| R6 | PR #1538 Latest → plans 070–085 | +| R7 | `DCE_MIN_FREE_MB=0 ./scripts/run-all-smokes.sh` → 24/24 | + +## Implementation Units + +### U1. Handoff hint + smoke + +**Files:** `scripts/operator-handoff.sh`, `scripts/tests/operator-handoff-smoke.sh` + +### U2. Docs + PR + +**Files:** `docs/recurring-scrape-merge-readiness.md`, PR #1538 body via `gh pr edit` + +## Verification + +```bash +DCE_MIN_FREE_MB=0 ./scripts/run-all-smokes.sh +``` + +## Scope Boundaries + +### Deferred + +- Live KotOR catch-up on operator host +- Auto-sync GUI zip `RECURRING-SCRAPE.md` (operator runs `sync-gui-bridge-doc.sh`) diff --git a/docs/recurring-scrape-merge-readiness.md b/docs/recurring-scrape-merge-readiness.md index 9c52bdba..9a8b1071 100644 --- a/docs/recurring-scrape-merge-readiness.md +++ b/docs/recurring-scrape-merge-readiness.md @@ -206,6 +206,8 @@ DCE_MIN_FREE_MB=0 ./scripts/run-operator-validation.sh \ **Plan 084 (2026-06-04):** GUI bridge + troubleshooting cite KotOR wrapper; merge-readiness HEAD synced; bridge sync smoke asserts wrapper + 24/24. +**Plan 085 (2026-06-04):** `operator-handoff.sh` prints KotOR catch-up hint when `KotOR_discord_msgs` is enabled. + **Disk:** ~65 GiB free on `/home` (2026-05-30); large channel merges still need headroom. ## CI note (fork PRs) diff --git a/scripts/operator-handoff.sh b/scripts/operator-handoff.sh index 6f9b81ca..ef78fcd5 100755 --- a/scripts/operator-handoff.sh +++ b/scripts/operator-handoff.sh @@ -60,6 +60,19 @@ require_command() { command -v "$1" >/dev/null 2>&1 || die "Required command '$1' is missing." } +kotor_catchup_enabled() { + require_command jq + jq -e '.targets[] | select(.name == "KotOR_discord_msgs" and (.enabled // true) == true)' \ + "$CONFIG_PATH" >/dev/null 2>&1 +} + +print_kotor_catchup_hint() { + kotor_catchup_enabled || return 0 + printf '\nKotOR yes_general catch-up (channel 221726893064454144):\n' + printf ' ./scripts/run-kotor-yes-general-catchup.sh\n' + printf ' ./scripts/print-scrape-summary.sh logs/kotor-yes-general.summary.json\n' +} + main() { while (($#)); do case "$1" in @@ -141,6 +154,7 @@ main() { if (( ! SALVAGE_ONLY )); then printf ' ./scripts/setup-cron.sh --dry-run\n' fi + print_kotor_catchup_hint } main "$@" diff --git a/scripts/tests/operator-handoff-smoke.sh b/scripts/tests/operator-handoff-smoke.sh index 9abef5bd..ac95ebe7 100755 --- a/scripts/tests/operator-handoff-smoke.sh +++ b/scripts/tests/operator-handoff-smoke.sh @@ -91,4 +91,43 @@ grep -q 'salvage completed' <<<"$salvage_output" || { exit 1 } +KOTOR_CONFIG="$TMP_DIR/kotor-config.json" +KOTOR_ARCHIVE="$TMP_DIR/archive/kotor" +mkdir -p "$KOTOR_ARCHIVE" +printf '{"messages":[{"id":"1"}],"channel":{"id":"221726893064454144"}}\n' \ + >"$KOTOR_ARCHIVE/Guild - yes_general [221726893064454144].json" +cat >"$KOTOR_CONFIG" <&1 +) +kotor_status=$? +set -e + +if [[ "$kotor_status" -ne 0 ]] || ! grep -q 'Handoff complete' <<<"$kotor_output"; then + printf 'operator-handoff KotOR hint failed (status=%s)\n' "$kotor_status" >&2 + printf '%s\n' "$kotor_output" >&2 + exit 1 +fi +grep -q 'run-kotor-yes-general-catchup.sh' <<<"$kotor_output" || { + printf 'operator-handoff missing KotOR catch-up hint\n' >&2 + exit 1 +} + printf 'operator-handoff-smoke: ok\n'