[Ops] Live-stack verification of v3.4.0 reliability changes #175
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Context
Several v3.4.0 reliability changes have behaviours that cannot be exercised in the mock/unit test harness (no live Redis, no real Discord voice, no multi-container runtime). Each was shipped with a documented manual procedure; this issue tracks actually rehearsing them once on a live/staging stack before treating v3.4.0 as production-verified.
Checklist
1. At-least-once bot delivery — cross-restart (#81)
Follow the procedure in the PR #166 comment:
docker compose stop bot.redis-cli -n 0 XLEN qb:bot:eventsincrements and no Discord post yet.docker compose start bot→ exactly one embed posts (backlog drain);XPENDING qb:bot:events qb-bot-workers→ 0.event_id→ skipped (debug log), no second post;TTL qb:bot:handled:<id>≈ 3600.recording:{guild_id}pub/sub.2. Disk-streamed recording — memory + e2e (#82)
VmRSSfrom/proc/<bot_pid>/statusevery 30s.audio_tempgrow instead./record stop→ no RSS spike (oldgetvalue()copy is gone);{session_dir}/{user_id}.wavappear,*_raw.wavdeleted.ffprobea converted WAV = 16 kHz mono s16 (unchanged format).3. Healthchecks + AOF (#84)
Per the "Verifying Healthchecks and AOF Persistence" checklist in
docs/OPERATIONS.md:docker compose psshows health for worker and beat;docker pause(or SIGSTOP) the worker → flips unhealthy within a few intervals.docker compose restart rediswith AOF; confirmappendonly yesand AOF files on disk.4. VAD trim (#101)
vad_trim_enabledin Admin → Bot Settings; process a recorded session."VAD trimmed Xh -> Yh"log line, and that the merged transcript ordering/timestamps/speaker-attribution match an untrimmed run of the same audio.5. Redis pool auth round-trip (#96)
Acceptance
v3.4.1 cut — healthcheck deviation from item 3 (#84) fixed & deployed
Recording a deviation found while rehearsing item 3 (Healthchecks + AOF, #84) on the live stack, plus the patch release that resolved it.
Deviation (bug): the #84 frontend healthcheck used
wget --spider http://localhost/. Thenginx:alpineimage's/etc/hostsmapslocalhostto IPv6::1only, but nginx binds IPv40.0.0.0:80, so the probe got connection-refused and the frontend container flapped unhealthy even though nginx was serving fine. (backend/bot use Debian images wherelocalhost→127.0.0.1, so they were unaffected.)Fix: probe
http://127.0.0.1/instead — commit1051f19(fix(compose): frontend healthcheck probes 127.0.0.1 not localhost).Released as v3.4.1 (
b5b53ff): bumpedAPP_VERSION+BOT_EXPECTED_APP_VERSIONto3.4.1and recorded the fix in the changelog. No API contract change (BOT_CONTRACT_VERSIONstays 1). Forgejo release published; theimagesjob built/pushed the:3.4.1images.Deployed (build-from-source,
git pull --ff-only→v3.4.1→docker compose up -d --build):docker-test, 10.1.1.14)docker-host, 10.1.1.7)v3.4.1(b5b53ff)v3.4.1(b5b53ff)APP_VERSIONBOT_EXPECTED/readye5f6g7h8i9j0(head, no new migration)Item 3 healthcheck sub-check is now verified green on both stacks (worker/beat/frontend health all reporting correctly). The AOF-persistence half of item 3, and items 1/2/4/5, remain to be rehearsed — leaving this issue open.
Two observations to follow up separately (not filed yet):
docker-compose.override.yml(the dev port-bindings overlay) as one of itsproject.config_files— pre-existing, not from this deploy, but worth confirming it's intended.Unrelated to this issue's checklist, but noting it here since this is the live-verification thread and the v3.5.0 frontend work has now landed on
main(d339c41, 11 commits pastv3.4.1).v3.5.0 — Frontend Platform & PWA is code-complete (milestone: 0 open / 4 closed):
/apiNetworkOnlyFrontend suite went 69 → 106 tests. Post-merge CI green on
mainfor each.Two things that need a human before a v3.5.0 release:
application/manifest+json, 192/512any+maskableicons, SW registration, 0 CSP-blocked inline scripts — all confirmed against a realfrontend-prodimage) rather than by running Lighthouse itself. Offline behaviour likewise comes from the generated precache manifest and strategies, not from toggling a real browser offline.webapp/frontend/public/currently holds generated QB-monogram art. Drop real art in with the same filenames — no code change needed.Also filed #182 (adopt the React Compiler lint rules from eslint-plugin-react-hooks v7) in the Backlog milestone. Measured, not guessed: 12 findings (11 ×
set-state-in-effect, 1 ×preserve-manual-memoization) across 7 files; the other 12 compiler rules are already clean. It's scoped and ready to pull into a frontend milestone whenever one exists.Deployed state is unchanged — dev and prod are still on the
v3.4.1tag. None of the above is live yet.Correction to an earlier comment on this issue.
I flagged that prod's compose loads
docker-compose.override.yml"(the dev port-bindings overlay)" and suggested confirming it was intended. That was a false alarm — please disregard it.docker-compose.override.ymlis intentionally empty:Compose auto-loads it, which is why it shows up in
com.docker.compose.project.config_files, but it contributes nothing. Both dev and prod correctly run thefrontend-prodtarget fromdocker-compose.yml. Nothing to fix.What is genuinely stale: the root
CLAUDE.mdstill describes the file asdocker-compose.override.yml Dev port bindings (auto-loaded), which is what led me astray. That description no longer matches the file and is worth correcting.Separately, dev is now deployed to
main(d339c41) so the v3.5.0 PWA work can be exercised. Verified through the real HTTPS origin (https://questboard-dev.rhoving.com): manifest serves asapplication/manifest+json,sw.js/registerSW.js/theme-init.js/icons all 200, the servedindex.htmlhas zero inline scripts (so nothing trips thescript-src 'self'CSP), and all 7 containers are healthy. Prod is untouched, still onv3.4.1.v3.5.0 tagged and deployed to both stacks.
v3.5.0(2ea6f26) —APP_VERSION/BOT_EXPECTED_APP_VERSIONbumped to 3.5.0, changelog stamped. No API contract change (BOT_CONTRACT_VERSIONstays 1). Forgejo release published with full notes.v3.5.0, reporting 3.5.0,/ready200, alembic at head (no migration), all containers healthy. PWA verified through both public origins (questboard-dev.rhoving.com,questboard.rhoving.com): manifest served asapplication/manifest+json, 0 inline scripts, all artifacts 200.CI note — registry
imagesjob: the tag'srelease.ymlrun failed in 25s atdocker login. Root cause:release.ymlneeds two repo secrets and onlyREGISTRY_TOKENwas set —REGISTRY_USERwas missing. AddedREGISTRY_USER=rbrooks(the package owner, matching the token). The Forgejo release itself published fine (separate job), and the app is unaffected either way since both hosts build from source, not from published images.The v3.5.0 images weren't built (secret added after the run). They'll build on the next tag automatically; to publish them now, re-run the failed job from the web UI (
.../actions/runs/487). Not blocking anything.Two updates: item 4 is delegated to #433, and item 2's procedure has drifted from the code. Also removing this from v4.1.0 — see the end.
Item 4 (VAD trim) → #433
#433's synthetic-audio harness covers this better than a manual rehearsal would. It already measures VAD
keptseconds as a first-class quantity (it has to — the quiet player's branch is decided bykept, not speech time), it runs against a real Whisper server, and it assembles the same scene two ways from one manifest. Trimmed-versus-untrimmed ordering, timestamps and speaker attribution fall out of that comparison deterministically and re-runnably, rather than as a one-off observation.Nothing else here is covered by #433, and that is by design rather than oversight: it enters at
POST /api/bot/sessions/{id}/audiowith pre-rendered clips precisely so it never needs Discord. Items 1, 3 and 5 have nothing to do with audio, and item 2 is the one it structurally cannot cover — the whole point is the bot's RSS during live voice capture, and #433 never runs that path.Item 2's expectations are stale
Written before #176, which moved the 48 kHz → 16 kHz mono conversion into the capture path. As written it looks for the wrong files and the wrong numbers:
*_raw.wavdeleted at stop{audio_temp}/{session_id}_{user_id}_raw.16k-mono.s16le, deleted as each is convertedThe RSS-plateau assertion is unchanged and remains the reason to run this: sample
VmRSSfrom/proc/<bot_pid>/statusevery 30s across a 15–20 minute multi-speaker session and confirm it flattens rather than climbing per speaker-hour. Just expect the new filenames and the smaller on-disk figures.Worth noting #176 also added
recover_interrupted_recordings, so a bot killed mid-capture now converts and hands off its raw tracks at next startup. That is adjacent enough to item 2's setup to be worth exercising in the same session — kill the bot mid-recording, restart, confirm the session directory appears and the handoff posts.Milestone
Removing this from v4.1.0 and leaving it unmilestoned. Live rehearsal needs a real Discord guild and a voice session, which is several days out, and every other issue in that milestone is done — there is no reason for this to hold the milestone open. It will be re-milestoned when it is scheduled rather than sitting as a permanent blocker.
Remaining scope after the above: four items — at-least-once bot delivery across restart (#81), disk-streamed recording memory with the corrected expectations (#82), healthchecks + AOF (#84), and the Redis pool auth round-trip (#96).