Players see their reports answered in the lobby ledger

Reports gain ids; replies live in the same JSONL, folding onto their
report when read (legacy reports answer to their timestamp). The lobby
asks with the same seat-token proof as the games ledger — wake-free —
and lists each report with its reply and status, or 'the wizards are
studying the moment'. deploy/feedback-reply.sh answers one from here.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015RCWSTnb1KYTPyL4GmhGnF
This commit is contained in:
Eric Wagoner
2026-09-01 09:34:20 -04:00
co-authored by Claude Fable 5
parent eabc10f18c
commit 5abd0ba60e
5 changed files with 153 additions and 3 deletions
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
# Answer a player's feedback report; the reply appears under it in their
# lobby ledger. Legacy reports without an id answer to their timestamp.
# deploy/feedback-reply.sh <host> <reportId> <resolved|by-design|open> <text...>
set -eu
HOST="$1"; REPORT_ID="$2"; STATUS="$3"; shift 3
TEXT="$*"
case "$STATUS" in resolved|by-design|open) ;; *) echo "status must be resolved, by-design, or open" >&2; exit 1;; esac
LINE=$(python3 - "$REPORT_ID" "$STATUS" "$TEXT" <<'EOF'
import json, sys, datetime
print(json.dumps({
"reportId": sys.argv[1],
"at": datetime.datetime.now(datetime.timezone.utc).isoformat().replace("+00:00", "Z"),
"status": sys.argv[2],
"text": sys.argv[3],
}))
EOF
)
printf '%s\n' "$LINE" | ssh "root@$HOST" 'cat >> /var/lib/wizwar/feedback.jsonl && tail -1 /var/lib/wizwar/feedback.jsonl'