feat: ask for stars and wishes in the campaign's Discord channel (#1255) #1256

Merged
claude-bot merged 4 commits from feat/1255-stars-wishes-discord into main 2026-10-30 20:12:20 +00:00
Collaborator

Closes #1255. For v4.7.0: 4.6.1 and 4.6.2 are tagged and on prod, so the hold is over. The wording was approved by the owner on the Wording Review page (part f, f-001, including the link pointing at Home).

When a session completes, the "Played" post the bot already makes in the campaign's channel gains one paragraph, only while Home is asking at least one player about the session:

One star, one wish? A line each for Dana: what shone, and what you'd change. It's on your Home page in Quest Board, and closes in a day.

Backend

  • session_feedback_service.discord_ask(db, session) returns {"stars_wishes": {url, closes_at, gm_name}}, or {}. It uses the same rule as Home's prompt and notify_asked, which now share _players_asked(): the window is open, the campaign is live and unarchived, there are non-GM members with no answer yet, and the attendance rule applies. There's no ask without an APP_URL.
  • Merged into post_extra at both completion paths (complete_session and auto_complete_sessions).
  • An additive extra field, so no BOT_CONTRACT_VERSION bump. Both sides are in this PR.

Bot

  • faces.stars_wishes() builds the line. The GM's name goes through plain_name, and the name is left out when the campaign has no GM. The closing time is a <t:…:R> stamp, and the line is dropped if the time can't be read. There's no ask without a safe_url Home link.
  • faces.played() puts it in its own paragraph, and points the post's one link at Home when the ask is present (owner-approved). Without the block, the post is unchanged.
  • New played-ask specimen, golden rows in test_faces.py, and a row in the test_faces_text.py audit.

Tests (on docker-test, after merging main at 4.6.2)

  • bot: full suite, 1,246 passed and 32 skipped.
  • backend: 189 passed across test_session_feedback, test_bot_post_facts, test_archived_campaign_outbound, test_notifications_out, test_session_end_before_start and test_sessions.
  • lint, version sync and the changelog check pass.

Nothing about the session's content reaches Discord (D96 untouched). It can't be checked on dev: the dev bot has no Discord token.

🤖 Generated with Claude Code

Closes #1255. For **v4.7.0**: 4.6.1 and 4.6.2 are tagged and on prod, so the hold is over. The wording was approved by the owner on the Wording Review page (part f, f-001, including the link pointing at Home). When a session completes, the "Played" post the bot already makes in the campaign's channel gains one paragraph, only while Home is asking at least one player about the session: > **One star, one wish?** A line each for Dana: what shone, and what you'd change. It's on your Home page in Quest Board, and closes in a day. **Backend** - `session_feedback_service.discord_ask(db, session)` returns `{"stars_wishes": {url, closes_at, gm_name}}`, or `{}`. It uses the same rule as Home's prompt and `notify_asked`, which now share `_players_asked()`: the window is open, the campaign is live and unarchived, there are non-GM members with no answer yet, and the attendance rule applies. There's no ask without an `APP_URL`. - Merged into `post_extra` at both completion paths (`complete_session` and `auto_complete_sessions`). - An additive `extra` field, so no `BOT_CONTRACT_VERSION` bump. Both sides are in this PR. **Bot** - `faces.stars_wishes()` builds the line. The GM's name goes through `plain_name`, and the name is left out when the campaign has no GM. The closing time is a `<t:…:R>` stamp, and the line is dropped if the time can't be read. There's no ask without a `safe_url` Home link. - `faces.played()` puts it in its own paragraph, and points the post's one link at Home when the ask is present (owner-approved). Without the block, the post is unchanged. - New `played-ask` specimen, golden rows in `test_faces.py`, and a row in the `test_faces_text.py` audit. **Tests** (on docker-test, after merging main at 4.6.2) - bot: full suite, 1,246 passed and 32 skipped. - backend: 189 passed across `test_session_feedback`, `test_bot_post_facts`, `test_archived_campaign_outbound`, `test_notifications_out`, `test_session_end_before_start` and `test_sessions`. - lint, version sync and the changelog check pass. Nothing about the session's content reaches Discord (D96 untouched). It can't be checked on dev: the dev bot has no Discord token. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The "Played" post the bot makes when a session completes now asks the
players for one star and one wish, while Home is asking anyone about the
session, and links to Home, where they are answered.

Backend: session_feedback_service.discord_ask() returns a stars_wishes
block (Home URL, closing time, GM's name) under the same rule as Home's
prompt and notify_asked, which now share _players_asked(). Both
completion paths merge it into post_extra. Additive extra field: no
BOT_CONTRACT_VERSION bump.

Bot: faces.played() renders the ask as its own paragraph, the GM's name
plain_name'd, and points the post's one link at Home. No ask without a
safe Home link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(bot): a row for stars_wishes in the faces text audit (#1255)
All checks were successful
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 2m52s
CI / Backend lint (ruff) (pull_request) Successful in 1m37s
CI / Feedback site tests (pull_request) Successful in 2m9s
CI / Bot tests and audit (pull_request) Successful in 2m42s
CI / Bot/backend version sync (pull_request) Successful in 58s
CI / Does this change touch the recording path? (pull_request) Successful in 16s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Which journeys does this change need? (pull_request) Successful in 24s
CI / Frontend (shard 2/2) (pull_request) Successful in 9m12s
CI / Frontend (shard 1/2) (pull_request) Successful in 11m50s
CI / Docker image build (pull_request) Successful in 10m15s
CI / Backend migration, tests, and audit (pull_request) Successful in 40m6s
CI / End-to-end journeys (desktop) (pull_request) Successful in 27m21s
eb2b0fd0a0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into feat/1255-stars-wishes-discord
All checks were successful
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 49s
CI / Backend lint (ruff) (pull_request) Successful in 28s
CI / Which journeys does this change need? (pull_request) Successful in 27s
CI / Does this change touch the recording path? (pull_request) Successful in 29s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Bot/backend version sync (pull_request) Successful in 42s
CI / Feedback site tests (pull_request) Successful in 1m9s
CI / Bot tests and audit (pull_request) Successful in 2m15s
CI / Docker image build (pull_request) Successful in 5m46s
CI / Frontend (shard 2/2) (pull_request) Successful in 8m28s
CI / Frontend (shard 1/2) (pull_request) Successful in 10m2s
CI / End-to-end journeys (desktop) (pull_request) Successful in 20m8s
CI / Backend migration, tests, and audit (pull_request) Successful in 31m53s
11076427d0
claude-bot changed title from WIP: feat: ask for stars and wishes in the campaign's Discord channel (#1255) to feat: ask for stars and wishes in the campaign's Discord channel (#1255) 2026-10-28 08:14:44 +00:00
Merge remote-tracking branch 'origin/main' into feat/1255-stars-wishes-discord
All checks were successful
CI / Bot/backend version sync (pull_request) Successful in 26s
CI / Backend lint (ruff) (pull_request) Successful in 29s
CI / Feedback site tests (pull_request) Successful in 44s
CI / Does this change touch the recording path? (pull_request) Successful in 26s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Which journeys does this change need? (pull_request) Successful in 28s
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m2s
CI / Bot tests and audit (pull_request) Successful in 2m4s
CI / Docker image build (pull_request) Successful in 7m58s
CI / Frontend (shard 2/2) (pull_request) Successful in 8m26s
CI / Frontend (shard 1/2) (pull_request) Successful in 9m44s
CI / End-to-end journeys (desktop) (pull_request) Successful in 30m53s
CI / Backend migration, tests, and audit (pull_request) Successful in 42m3s
093477aec9
claude-bot deleted branch feat/1255-stars-wishes-discord 2026-10-30 20:12:21 +00:00
Sign in to join this conversation.
No description provided.