Skip to content

✨ Stream the tracker's sounds on the Activity Monitor Twitch stream - #15669

Merged
clubanderson merged 1 commit into
v5from
stream-audio
Oct 30, 2026
Merged

clubanderson merged 1 commit into
v5from
stream-audio

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15667

What

The Activity Monitor Twitch stream carried a silent audio track (Chromium --mute-audio, ffmpeg anullsrc). This makes the stage tracker's sounds — the merge zap and the new-issue/PR buzz — audible on the stream.

Streamer (src/deploy/stream/)

  • Dockerfile: installs pulseaudio + pulseaudio-utils (bookworm, multi-arch; workflow untouched). Smoke test also checks pulseaudio --version and that ffmpeg has the pulse indev. ENV STREAM_AUDIO=pulse.
  • entrypoint.sh: runs a per-user PulseAudio (-n, native socket under $RUN_DIR/pulse, module-null-sink sink_name=hive) as a supervised child, waits for the sink, sets it default/unmuted. Chromium loses --mute-audio (keeps --autoplay-policy=no-user-gesture-required). ffmpeg reads -thread_queue_size 1024 -f pulse -i hive.monitor → AAC 128k, 2ch, 44.1 kHz. Video settings identical. STREAM_AUDIO=silent restores mute + anullsrc. Diagram comment updated.
    • Note: pulseaudio --start --daemonize silently dropped the --load modules under -n (found in local verification), hence the foreground supervised child.
  • README env table, k8s ConfigMap (STREAM_AUDIO: "pulse"), streaming doc (diagram, new Sound section documenting &sound=off and STREAM_AUDIO=silent).

Dashboard (kiosk mode)

  • boot.js: exposes window.HIVE_KIOSK_SOUND / hiveKioskSoundOn() — true in ?kiosk=1 unless &sound=off.
  • tracker-sound.js: in kiosk mode stageTrackerSoundInit takes a kiosk path: sound on (per URL), default volume, AudioContext created and resumed at load; no localStorage reads or writes (stageTrackerSetSoundOn/SetVolume skip setItem in kiosk); the "click to enable sound" nag is suppressed on the unattended display.
  • Embedded bundle regenerated (go generate ./pkg/dashboard/webstatic/).
  • Test: TestKioskSoundDefault (wiring guards + node fixture for stageTrackerKioskSoundDefault).

Verification

  • go test ./pkg/dashboard/webstatic/ ./pkg/dashboard/ -run 'Index|Kiosk|Sound|Static' -count=1 — ok; go vet clean; bash -n entrypoint.sh ok.
  • Container verified locally (Rancher Desktop, linux/arm64 native): image builds; dry run (STREAM_OUTPUT="-f null -", no stream key, STREAM_AUDIO=pulse) logs pulseaudio up; default sink hive, pactl list sinks short → 0 hive module-null-sink.c s16le 2ch 48000Hz, ffmpeg starts with Guessed Channel Layout for Input Stream #1.0 : stereo and completes the bounded run. STREAM_AUDIO=silent also completes. An flv test encode probes as h264 + aac/44100/2ch with no dts warnings. Not verified: amd64 build (CI/QEMU) and end-to-end audio on Twitch.

Operator note

After merge the stream-image workflow builds ghcr.io/hivecommons/hive-stream:v5-latest; then
kubectl --context hive-oke -n hive-stream rollout restart deploy/hive-stream.
The kiosk sound default only takes effect once hive's hive rolls the dashboard change; until then the container streams whatever the current dashboard plays (silence, but a real audio track).

…ll sink

The Activity Monitor streamer ran Chromium --mute-audio and fed ffmpeg
anullsrc, so the tracker's merge-zap and new-item-buzz never reached
Twitch.

- Dockerfile: install pulseaudio + pulseaudio-utils (multi-arch, bookworm);
  smoke test checks ffmpeg's pulse indev; STREAM_AUDIO=pulse default.
- entrypoint.sh: run a per-user PulseAudio (-n, native socket under
  RUN_DIR, null sink 'hive') as a supervised child, set it default, wait
  for the sink; drop --mute-audio from Chromium; ffmpeg reads
  '-f pulse -i hive.monitor' (AAC 128k, 2ch, 44.1k). STREAM_AUDIO=silent
  restores the old mute + anullsrc path. Video settings unchanged.
- dashboard kiosk mode (?kiosk=1): tracker sounds on by default, resumed
  at load without a gesture, no localStorage reads/writes; &sound=off
  keeps it quiet. Chip nag suppressed in kiosk.
- docs, README, configmap, changelog fragment, kiosk sound test.

Verified locally (arm64 docker): pactl lists sink 'hive', ffmpeg captures
hive.monitor stereo, bounded runs complete in both pulse and silent modes.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kellyaa for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#15633 🌱 refactor: split stage tracker UI tests same files src/pkg/dashboard/static/index.html
#15658 🐛 fix(tracker): PRs at CI / Review ride no merge train; overlap hint instead same files src/pkg/dashboard/static/index.html
#15566 🌱 refactor: split stage tracker UI tests same files src/pkg/dashboard/static/index.html
#15530 🐛 fix(dashboard): issue-row linked PR passes null when the lineage chip is empty same files src/pkg/dashboard/static/index.html
#15680 🐛 review: one backlog issue per finding; carried-over notes never refile same files src/pkg/dashboard/static/index.html

@hivecommons-hive

Copy link
Copy Markdown
Contributor
4f7ab70

ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head 4f7ab70937bd) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation — a maintainer should confirm the change is intended before it merges.

  • sensitive_path — changes 4 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • src/deploy/stream/Dockerfile
    • src/deploy/stream/README.md
    • src/deploy/stream/entrypoint.sh
    • src/deploy/stream/k8s/configmap.yaml

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission: no activity for 30m0s: merge-train:queued-behind#15637:7/11:0/0:dashboard-misc.md,dashboard-copy-inventory.md,dashboard-sections.md,labels-and-control-signals.md,+22

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@clubanderson
clubanderson merged commit db6e2cb into v5 Oct 30, 2026
87 of 90 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the stream-audio branch October 30, 2026 05:11
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Monitor Twitch stream is silent — tracker sounds should be audible

1 participant