Skip to content

refactor(broadcast): remove the speaker tick and spoken updates - #6773

Merged
hurttlocker merged 1 commit into
mainfrom
del/broadcast-voice
Nov 25, 2026
Merged

hurttlocker merged 1 commit into
mainfrom
del/broadcast-voice

Conversation

@hurttlocker

Copy link
Copy Markdown
Collaborator

Removes the Broadcast speaker tick and spoken updates. The owner cut them on 2026-11-24 ("the speaker tick and spoken updates only").

Removed

  • src/lib/broadcast/speaker.ts. The broadcast-speaker loop ran every 1 s from server start. Each tick read new Broadcast events and the settings files, picked moments, queued and coalesced lines, and spoke them through the native text-to-speech bridge (native-tts.ts).

  • The voice attention policy (attention-policy.ts) and the narration helpers only the speaker used.

  • On-demand speech: the /api/broadcast/say route, the o8_broadcast_say MCP tool and o8 broadcast say.

  • Nine settings only the speaker read:

    • lull minutes
    • quiet hours, with their start and end times
    • the attention, approval, review, failure and completion subscriptions

    They leave the native Settings page, the TOML mapping, the operator defaults route, the MCP status schema, the o8d settings declarations and its evidence corpus. Values already saved in a settings file stay on disk; the loader ignores keys it doesn't declare. The native Kind::Time editor, used only by the quiet-hours fields, goes with them.

TS: −2,344 lines net. Rust: −101 lines net.

  • Startup. About 935 lines of the deleted code were loaded at server startup: speaker.ts, native-tts.ts and attention-policy.ts, all imported by src/ws-server.ts.
  • Loops. One loop removed: broadcast-speaker, a 1 s timer.

Kept, and why

  • The commentary director (written commentary, off by default), the spectator page, events, snapshot, post and tokens. The brief limits this cut to speech.
  • Calendar ingest (/api/broadcast/calendar) and the why receipt (/api/broadcast/why). The classic desktop shell still calls both, and that shell is out of scope. why now reports the last line that was actually spoken.
  • Automation check-ins (/api/broadcast/automation-say, o8 broadcast automation-say). Automations stay.
  • broadcastVoice, broadcastVoiceCalendar, broadcastVoiceCalendarLeadMinutes and broadcastVoiceTimeCheckins. They still gate the Calendar and automation posts; the classic shell reads the first three. Their native and MCP descriptions now say what they gate instead of "speak".
  • The phone app. No /api/mobile route or mobile code imports anything removed.

Tests

  • Deleted: broadcast-speaker-real-path and broadcast-voice-repetition-real-path (every case exercised speech), attention-policy.test.ts, the say cases in principal-authz, middleware-gate and the CLI test, and the o8_broadcast_say profile assertions.
  • o8d-pr-context-say-native-real-path becomes o8d-pr-context-native-real-path without its speech half. It is quarantined under Real-path suites drifted on main because they only run when their own files change #6761: on unchanged main the device and worker fixture bearers get 401 instead of 403 from the native gate, and I could not find why within the one-hour limit.

Verification

Rebased on 2398dfa49.

  • npm run typecheck:fast, tsc -p cli/tsconfig.json and ESLint on the touched files pass.
  • The native check passes: cargo check --tests for native/o8-next. The o8d build with session reads and MCP also passes.
  • The nine enumerating real-path suites (ci: run the enumerating real-path suites on every merge group #6768), plus o8d-broadcast-writes-native, broadcast-commentary-settings, broadcast-director and broadcast-followup, against an o8d built from this branch: 13 of 13 files pass, 5 skipped.
  • Unit tests for principal-authz, middleware-gate, src/lib/{mcp,operator,broadcast,settings} and the operator-defaults route pass: 352 of 352. The CLI broadcast test passes: 6 of 6.
  • o8d-rust-settings-real-path fails identically on unchanged main ("Native read changed durable files: /api/setup/config"), so I edited the corpus directly: the nine keys are removed from each record and the rest is byte-identical.
  • npm run verify:ci: Lint, Type Check, Test Classification, Server Bundle Size, Security Audit and Governance Smoke pass.
    • Hermetic Unit Tests found the /api/broadcast/say pattern left in the route-coverage manifest. It is fixed, and the stale-manifest check passes. The other route-coverage failures are the local-only Host-gate cases.
    • Integration (changed files) fails locally on one gate only: api-front-door requires 15 GiB free disk, and this machine has less. That suite passed in the run above with the gate lowered.

🤖 Generated with Claude Code

Removes the Broadcast speaker loop and everything that only it used: the
per-tick reader that picked moments, queued lines and spoke them through
the native text-to-speech bridge, the voice attention policy, the
on-demand `say` route with its `o8_broadcast_say` MCP tool and
`o8 broadcast say` CLI command, and the nine settings only the speaker
read (lull minutes, quiet hours with their start and end, and the
attention, approval, review, failure and completion subscriptions). Their
fields leave the native Settings page, the TOML mapping, the operator
defaults route, the o8d declarations and its evidence corpus. Values
already saved in a settings file stay on disk and are ignored.

The commentary director, the spectator page, events, snapshot, post,
tokens, Calendar and automation check-ins and the why receipt stay. The
classic shell still posts Calendar events and reads why, and automations
still post check-ins. The remaining voice settings now say what they gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hurttlocker hurttlocker added shell-work tests-removed-ok Human-reviewed: test deletions/assertion loss are intentional labels Nov 24, 2026
@github-actions github-actions Bot added the size/XL Pull request with XL diff size label Nov 24, 2026
@github-actions

Copy link
Copy Markdown

🔍 PR Review Bot

Metric Value
Files changed 36
Additions +241
Deletions -2703
New files 0

⚠️ Large files (>300 lines changed)

  • crates/o8d/evidence/settings/corpus.json — +198/-198
  • src/lib/broadcast/speaker.ts — +0/-760
  • tests/broadcast-speaker-real-path.test.ts — +0/-598

Note: This PR touches 36 files. Consider splitting into smaller PRs.


Automated review — CI workflow

@github-actions

Copy link
Copy Markdown

📝 o8.run docs may need updating

This PR changes source that the public docs describe. Review whether these pages are still accurate (and bump their stamp in o8-site if so):

  • The CLI cli — tracks cli/src/index.ts, cli/src/commands/broadcast.test.ts, cli/src/commands/broadcast.ts

Flagged by docs-drift against https://o8.run/api/docs/manifest. Docs only — nothing is auto-edited.

@hurttlocker
hurttlocker added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit f9ba6d6 Nov 25, 2026
47 of 50 checks passed
@hurttlocker
hurttlocker deleted the del/broadcast-voice branch November 25, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shell-work size/XL Pull request with XL diff size tests-removed-ok Human-reviewed: test deletions/assertion loss are intentional

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant