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
20 lines
824 B
Bash
Executable File
20 lines
824 B
Bash
Executable File
#!/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'
|