Skip to content

feat(app): smoke-join hang.live from two browsers every hour - #77

Merged
kixelated merged 15 commits into
mainfrom
quest/m1/production-smoke
Nov 27, 2026
Merged

kixelated merged 15 commits into
mainfrom
quest/m1/production-smoke

Conversation

@kixelated

@kixelated kixelated commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m1/production-smoke.md.

Problem

Nothing tells us when hang.live stops letting people hang out: a broken deploy, API, or relay surfaces only when someone complains.

Approach

  • just smoke <origin> (app/test/smoke.ts) opens a fresh hang-smoke-<uuid> room on the deployed site in two headless Chromium pages with fake cameras, reading only what the shipped page shows:
    1. A opens the room, turns its camera on from the join screen, and joins.
    2. The join sound (/notification/select.opus) decodes in A's page. The room plays it only if its audio is already running (a race), so the smoke decodes it directly to catch a deploy that shipped Git LFS pointer files.
    3. B opens the room, and its join screen's "Hanging Now (1)" list shows A by name.
    4. B joins with its camera on, and both pages' app badges show exactly one other.
      Any page error or WebGL error fails the step it happened in. A failure prints the step's name, then each page's recent console (page errors included) and its accessibility snapshot.
  • .github/workflows/smoke.yml runs it against https://hang.live hourly (and on workflow_dispatch). A failure on main files one "Production smoke is failing" issue (looked up by exact title and github-actions authorship) or edits its body with the latest failure, so it doesn't notify every hour. It files the issue even when checkout or Nix failed before the smoke wrote a log. The next passing run comments and closes it. Only this job gets issues: write, and only its two issue steps hold the token; PR CI stays read-only.
  • devShells.smoke in flake.nix holds only Bun, just, and the pinned Chromium, so the hourly run doesn't fetch the relay and CLIs.
  • just app lfs refuses an app/public holding Git LFS pointer files; just app deploy and root just deploy run it before building or deploying anything.
  • deploy-staging-and-release's Plan now calls just smoke <app origin> after each staging and production deploy (with the rollback command on failure) and points the hourly run at release once it exists.

Decisions

Taken on my recommendation while the maintainer was away; please review:

  • In-room check reads the app badge count, not a new screen-reader peer list. The quest planned a hidden peer list for the smoke to read, but the hourly run uses main's smoke against whatever production runs, and production lags main (it ran a pre-#53 build when this started). So the smoke would fail every hour until the next production deploy. The room already sets navigator.setAppBadge(<others in the room>) in every build, so the smoke stubs that browser API and reads the count. The list moved to a follow-up quest that requires the deploy quest, which runs the hourly smoke from release, so the list and the smoke's switch to it can land together.
  • A fresh room per run under the hang-smoke- prefix, not one fixed room. Badge counts must be exact, so a visitor or an overlapping run (a deploy smoke during the hourly one) can't be in the room. Rooms aren't stored and guests mint only guest/<uuid> paths, so nothing is left behind.
  • GitHub's ubuntu-latest runner, not self-hosted. The only self-hosted runner open to this repository is oci-a1-runner ([self-hosted, Linux, ARM64, nix], 2 cores, Default group). I tried it: Nix isn't on the job's PATH, it doesn't trust nix.moq.dev so the default shell built moq-relay from source past the timeout, and with the smoke shell B's page took 15-19 s to load and never listed A within 30 s (load average ~2). The quest asked for self-hosted, but this scheduled job isn't a merge gate, so your rules allow GitHub's runner.
  • Turn the camera on before joining (the join screen has the toggle) instead of after (the in-room toggle sits behind the publish menu).
  • Edit the tracking issue's body instead of commenting each failed hour, and close it automatically on recovery.

Impact

  • Public API and wire: none. The app is unchanged. Adds the just smoke recipe, the smoke package script, devShells.smoke, and the just app lfs guard that both deploy recipes now run.
  • PR checks: unchanged (the smoke isn't in just check or PR CI).
  • While this was in progress, production went from serving Git LFS pointer files in place of its notification sounds, memes, and images (curl -s https://hang.live/notification/select.opus printed version https://git-lfs..., and joining threw "Unable to decode audio data") to a redeployed post-fix(room)!: bind guest identities and expire room tokens #53 build with real media. The smoke's sound step and the deploy guard keep that from coming back unnoticed. drop-legacy-join-url's first wait (production serving relay) has cleared too; its one-day wait for open tabs remains.

Alternatives

  • A reusable workflow as the deploy hook: rejected because the deploy job already runs inside nix develop, so a just recipe is one line there and needs no second runner.
  • Waiting for the room's own join sound to raise its error: rejected because it's a race (the room skips the sound while its audio is suspended), so decoding the asset directly is the deterministic check.
  • Holding the schedule until it targets release: rejected because production is the surface that matters and it passes today. Skew between main's smoke and production is handled by the deploy quest pointing the hourly run at release.
  • Sharing the Chromium flags and GL error filter with app/test/media.browser.ts (review note): left as is, since it's five flags and one regex in two test entry points.

Follow-ups

  • List the room's peers for screen readers [S]: adds the hidden peer list and switches the smoke's last step to read names from it. Requires deploy-staging-and-release. No open decisions. Kept by the maintainer on 2026-11-27: ✅ keep (rejected: drop).

Validation

  • bun test/smoke.ts https://hang.live against the redeployed post-fix(room)!: bind guest identities and expire room tokens #53 production (join response has relay and token, real media): every step passed, including the sound decode.
  • bun test/smoke.ts https://hang.live against the earlier pre-fix(room)!: bind guest identities and expire room tokens #53 production (join response had no relay): every step passed at 320x240. Of the two earlier runs at 640x480, one failed at "B opens the room" with "Smoke A: Unable to decode audio data", traced to the LFS pointer files above; a diagnostic copy that ignored page errors passed every remaining step.
  • bun test/smoke.ts http://localhost:1420 against a local post-fix(room)!: bind guest identities and expire room tokens #53 just dev stack (join response has relay and token): every step passed.
  • Workflow runs on this branch through a temporary push trigger, since removed. Self-hosted attempts: nix missing, source build timeout, too slow to list A. GitHub runner: passed against production in 58 s for the smoke step, including the cold Nix shell (slowest step: "B joins with its camera on", 14 s of its 30 s action timeouts).
  • The issue steps run only on main, so they couldn't run here. Checked the issue-number jq selection and the body formatting locally on sample input.
  • LFS: the guard's grep flags a pointer fetched from production and passes the real .opus, and just app lfs passes on this checkout. Chromium's decodeAudioData rejects a pointer file with "EncodingError: Unable to decode audio data".
  • Issue steps: the awk excerpt tolerates a missing log and a 200,000-line log, and gh issue list --author app/github-actions matches bot-authored issues (checked with gh search issues --author app/github-actions).
  • just check passes on fbcaa25 (after merging main, including its new fallow gate), and again on b875d97 after merging main at 97613b1 (docs: comment every app and API export, and gate it in just check #80's export-doc gate, build(deps): bump the bun group across 1 directory with 13 updates #78's dependency bump).

Models

  • Size: M
  • Implementer: Claude Code, claude-opus-5-5, high
  • Implementer: Claude Code, claude-opus-5-5, low effort (iterate, XS)

🤖 Generated with Claude Code

(Written by Claude Opus 5.5 with high)

Review

Rewritten by quest review after each round.

  • Head: b875d97

  • Base: origin/main at 97613b1

  • Risk: high, it changes .github/workflows/smoke.yml, which is always high: workflows run with the repository's secrets

  • Classified: high by the always-high paths

  • Risk file: none

  • Reviewer: Codex, gpt-6.2-sol, high effort

  • Session: 01a21b1e-272a-7253-b313-91545de03062, round 5

  • Score: 10/10, The smoke workflow is unchanged, and the new maintainer note records the decision to keep the screen-reader follow-up.

  • Rounds: 5; first round 3 (medium 3); findings 4 (medium 4): fixed 4, refuted 0, open 0

  • Findings: none

  • Reviewer: Claude Code, claude-opus-5-5, high effort, second

  • Session: 86a4b45d-4670-42da-aaa3-6048ded67bf2, round 5

  • Score: 9/10, Since fbcaa25 the branch's own change is one line in quest/m1/room-peer-list.md recording the maintainer's decision to keep that follow-up; everything else in since.patch is base commits from the rebase, so nothing new holds the head.

  • Rounds: 5; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0

  • Findings: none

kixelated and others added 4 commits November 26, 2026 18:13
WIP: a temporary push trigger exercises the workflow on its runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Smoke-join hang.live in a real browser after each deploy feat(app): smoke-join hang.live from two browsers every hour Nov 27, 2026
Decode the join sound directly, scope the issue token and lookup, file the issue without a log, and check LFS pointers before any deploy.
@kixelated
kixelated marked this pull request as ready for review November 27, 2026 04:03
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d97b7c6b-a6a7-4803-80a5-fcb914d665b2
Commits

Reviewing files that changed from the base of the PR and between 97613b1 and b875d97.

Files selected for processing: 9

  • .github/workflows/smoke.yml
  • app/justfile
  • app/package.json
  • app/test/smoke.ts
  • flake.nix
  • justfile
  • quest/m1/deploy-staging-and-release.md
  • quest/m1/production-smoke.md
  • quest/m1/room-peer-list.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@kixelated
kixelated merged commit f73ebef into main Nov 27, 2026
4 checks passed
@kixelated
kixelated deleted the quest/m1/production-smoke branch November 27, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant