feat: stream-a-thon 2026-06-13 — phases 0 / 0.7 / 0.5 + ralplan plan iter-3.4 #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/stream-a-thon-2026-06-13"
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?
What this lands
The first three phases of the ralplan consensus plan at
.omc/plans/stream-a-thon-2026-06-13.md(iter-3.4, deliberate mode). All LOCAL work — nothing required SSH/RDP to the production OBS host beyond a one-time snapshot script that's now in the tree for later use.Commits
lib/db.ts(withDbhelper), migrate 4 runtime sqlite.open call sites, addscripts/auditSqliteOpens.tsto CI (forgejo + github), structured per-call JSON logging insetActive, schema asymmetry doc.scripts/verifySwitcherCoverage.ts— the S4' pre-mortem kill switch), Mac OBS path remap script (scripts/remapMacObsSwitcherPaths.ts, idempotent), repo cleanup (rmfiles/ss_right.texttypo, documentSOURCE_SWITCHER_NAMES).docs/RUNBOOK_FALLBACK.md), Windows snapshot script (scripts/capturePhase05Snapshot.sh), latency baseline + plugin contract docs, reference scene JSONs (2025 + active 2026), the ralplan plan artifact.What's NOT in this PR
scripts/measureSwitcherLatency.tshit a documented methodology gap (GetInputSettings.current_index doesn't reflect plugin-internal source state, so the captured 1–3ms numbers are WS RTT not end-to-end). Three alternative detection methods documented indocs/plugin-contract.md.AGENTS.mdfiles across the tree — pre-existing from a prior deepinit run, not part of this PR.Verification
next buildgreen (full compile + types + 23 static pages)npx tsx scripts/auditSqliteOpens.tsexits 0; injection of a fakeopen({flips to exit 1npx tsx scripts/verifySwitcherCoverage.tsexits 0 on current scene+DB; fail-injection produces a clear missing-coverage diffscripts/remapMacObsSwitcherPaths.tswas run end-to-end against the local Mac OBS — all 7 switchers reconfigured, smoke test confirmed plugin still reading after the remap, idempotent re-run is a no-opbash -n scripts/capturePhase05Snapshot.shsyntax-cleanTest plan
docs/RUNBOOK_FALLBACK.md— fill in the 18 TODO(operator) hotkey placeholders during your dress rehearsalobs-scene/SaT.jsonreference to stay committed alongside the current 2026 one, or just the active onescripts/capturePhase05Snapshot.shonce vianpm run snapshot:phase05 -- bridge.hippo-sidemirror.ts.net derek SaT_Summer_2026to verify the bash script works against your Scoop OBS installCloses Phase 0 of .omc/plans/stream-a-thon-2026-06-13.md. - 0.1 — Add lib/db.ts with withDb(callback) wrapping the existing getDatabase() singleton; migrate the 4 runtime sqlite.open call sites (createGroup, syncGroups, addStream x2) to use it. Eliminates 4 file-descriptor leaks under load. - 0.2 — docs/schema.md documents the streams.id AUTOINCREMENT vs teams.team_id non-AUTOINCREMENT asymmetry and the rationale (team_id is the public-facing semantic team number). - 0.3 — scripts/auditSqliteOpens.ts + allowlist enforces no new direct sqlite.open() sites land. Wired into both .forgejo and .github workflow CI as a step before npm run build. - 0.4 — setActive emits one JSON log line per call with {ts, screen, group, ms} for offline latency analysis. Verified: next build green, 500-call FD-leak test green, audit flips to fail when a 10th open site is injected.Closes Phase 0.7 of .omc/plans/stream-a-thon-2026-06-13.md. - 0.7.2 — rm files/ss_right.text (0-byte typo orphan). Document SOURCE_SWITCHER_NAMES at lib/constants.ts:54-62 with a JSDoc block: it holds canonical OBS input names (with ss_ prefix), NOT file paths. Constant is USED at lib/obsClient.js:2,746 and app/api/addStream/route.ts:7,21,170,175 — must stay in sync with the production scene JSON; do not delete. - 0.7.3 — scripts/verifySwitcherCoverage.ts checks that for every (stream, screen) pair the webui can target via setActive, the derived stream-group name exists as a 'value' in the corresponding ss_${screen} sources array in the scene JSON. This is the S4' pre-mortem kill switch (per the iter-3.3 user clarification that switcher-file content is webui-overwritten; the real failure mode is name-coverage mismatch). The derivation is extracted into lib/streamGroupName.ts so script and setActive share parity. - 0.7.4 — scripts/remapMacObsSwitcherPaths.ts uses OBS WebSocket SetInputSettings to repoint the 7 Mac OBS switcher inputs from Windows paths (C:/OBS/source-switching/${screen}.txt) to a Mac filesystem path. Idempotent. Closes the macOS local-loop testability gap (Mac OBS scene was imported as-is from Windows). Verified: tsc green; remap script ran end-to-end against local Mac OBS, all 7 switchers updated, smoke test confirmed plugin still reading after remap.