Lane 5, PR 3 (server + bot): the quick note, recording starts the session, the start window, who's here (#731; D10, D112, D116, D120, D123) #828
Loading…
Reference in a new issue
No description provided.
Delete branch "build/lane5-p3-live"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is the rest of lane 5's server side. Migration
d4e6f8a0b2c3is re-chained ontoc3d5e7f9a1b2(#827), and the one-head pin moves to it.The quick note (IS-381, D112)
POST /api/sessions/{id}/notes/quick, for any member.[h:mm:ss]only while this session is recording.quick_note, and a run of quick notes by the same person updates one version.Recording starts the session (D116), with D10 and the start window (D123)
/record/startchecks, in order:started_at.detail("Session 14 starts at 7:00 PM CDT. Recording opens at 6:30 PM CDT."),starts_atandopens_at.campaigns.recording_start_window_minutes, 0–1440, default 30. It's on the campaign read and PATCH (GM only), and is copied by "from one of yours".started_atelsewhere: the poller stamps it, the 8-hour completion fallback counts from it, and reopening for a vote clears it.Who's here (D120) and the other session
/record/liveand the/record/streamSSE carry:here: {players_present, players_total}, from verified links, only while this session is recording;other: {number, title, campaign_name, owner_name}while the bot records a different session.task_session()(#814's guard).The bot (
BOT_CONTRACT_VERSIONstays 2, andcheck_version_sync.pypasses)in_channel./record startnow calls a new additive endpoint,POST /api/bot/sessions/{id}/recording-started, before it connects. It applies D10, D123 and D116, and the bot shows the GM the backend's refusal.Tests
Docs: CHANGELOG and
docs/API.md, including the stale/livenumbersentence (D86).🤖 Generated with Claude Code
Lane 5, PR 3: Table mode's live server. No pages. - POST /api/sessions/{id}/notes/quick: one line added to the GMs' note (a player's to their own), stamped [h:mm:ss] by the server from the bot's status while this session is being recorded. A run of quick notes by one person is one version (new source quick_note); any other save ends it. - POST /record/start enforces D10 (409 unless confirmed or in progress, before the bot is asked) and, on success, makes a confirmed session in_progress with started_at (D116). The poller stamps started_at with the confirmed time when it flips, and its eight-hour fallback counts from started_at. Reopening for a vote clears it. The live bar and GET /sessions/{id} carry it. - /record/live and the /record/stream SSE add `here` (players in the voice channel, matched through verified Discord links, D120) and `other` (the session the bot is busy with instead, SE-033). The bot, its status payload and /api/bot/* are untouched; BOT_CONTRACT_VERSION stays 2. - Migration d4e6f8a0b2c3 (down a9b0c1d2e3f5): sessions.started_at (backfilled from confirmed_time for sessions in progress) and the versions' source CHECK gains quick_note. The one-head pin moves to its test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>The web page's Start refused a session that was not confirmed or being played and made a confirmed one live; /record start in Discord went straight to the voice channel and did neither. - Backend: POST /api/bot/sessions/{id}/recording-started {guild_id}. A session not bound to the guild is the usual 404 "Session not found"; D10 is a 409 in the web path's words; otherwise start_by_recording (D116). Additive. - Bot: QuestBoardClient.post_recording_started, called by /record start after the session lookup and before it joins the channel. A 409 is shown to the GM as the backend wrote it and nothing is recorded; a 404 "Session not found" gets the existing not-found copy. FastAPI's bare 404 "Not Found" means an older backend: the client returns None, the cog logs it once at info and records as before. A backend that cannot be reached does not stop capture. - A test pins the bare "Not Found" body the bot relies on. Additive on both sides: BOT_CONTRACT_VERSION stays 2 (check-versions OK). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>GET /campaigns/{id}/live has returned the session's own number since #760, but the docs still said it was always null. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>A confirmed session can now be recorded only from its campaign's recording_start_window_minutes before its confirmed start (default 30, 0-1440); a session being played can always record, and a confirmed one with no time is refused with its own sentence. - session_service.recording_refusal is the one check (D10 and D123) that both the web /record/start and the bot's recording-started use, before the bot is asked and before anything is flipped. The 409 says when recording opens in the campaign's zone, with the bell's clock and the zone's abbreviation ("Session 14 starts at 7:00 PM CDT. Recording opens at 6:30 PM CDT."), the day as well when it is not today there, and starts_at / opens_at as ISO beside detail. The bot already shows a 409's detail as it is. - campaigns.recording_start_window_minutes INT NOT NULL DEFAULT 30 with a 0-1440 CHECK, added to the unmerged migration d4e6f8a0b2c3 (up/down/up checked). On CampaignResponse; GM-editable on PATCH /campaigns/{id} (0-1440; null refused); copies with "from one of yours". No page yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>