Reconcile Televic chair-button delegate promotions with the room speaker state
Confirmed with read-only live inspection: Televic discussion/seats and discussion/speakers report delegate Seat 1 active and no requests; local router dev-room status also sees microphone.speakers=[1], but active_speaker=null and queue retains Seat 1 as an operator entry. Seat 1 maps correctly and is not a chair. The bridge only reacts to new seats with is_chair=true. A new delegate-promotion regression fails with zero scheduled transitions instead of one. Implement shared mapped microphone activation handling, retaining chair-specific interruption semantics. Delegate activation becomes the logical speaker, emits a generic Microphone trigger, consumes one queued occurrence and does not deactivate other physical microphones; chair activation keeps its existing clear-all-turns/deactivate-others behavior. Initial snapshots are not replayed. Preserve existing session/meeting/priority protections and stale-speaker checks for physical stops. Skip activations for the already-current seat before scheduling; retain the command-level echo guard. Televic cannot distinguish chair-authorized delegate activation from other normal delegate activation, so both are reconciled. Reuse existing microphone watcher and serialized speaker transitions, preserve startup reconciliation, priority handling and stale-session/meeting protections. No new dependencies, commits or live hardware writes/deployment without coordination. Acceptance: establish the observed controller/application mismatch and intended promotion behavior; add a failing regression, implement the correction, and pass affected Rust tests plus fmt/check. Verify the corrected physical-button flow after coordinated local deployment; explicitly distinguish simulated validation from live acceptance. Committed and pushed as bde7b1d (fix: Reconcile physical delegate microphone promotions) on feature/microphone-backends within existing PR #145, as explicitly requested. Working tree is clean. The unnecessary temporary fix branch was deleted. Shared bridge now handles all mapped normal activations, including delegates for both backends; chair and delegate effects remain distinct. Added ExternalTrigger::Microphone (wire microphone), retaining MicrophoneChair and legacy alias. Router must be updated before rooms emit the new trigger. Split camera switching from the existing physical speaker commit so queue/event/state behavior can be tested without a GStreamer pipeline. No dependencies added. Verified: failing delegate scheduling regression is now green. Affected suites pass: cloud-router 131 tests (2 ignored), local-streamer 104, streaming-protocol 57, televic 15 plus one compile doctest (2 hardware tests ignored). Tests cover initial/unchanged snapshots, priority-to-normal activation, command echo, delegate one-occurrence consumption/no hardware writes, preserved chair takeover effects, serialized event decoding and router speaker materialization/callback deduplication. The state-commit test bypasses camera switching. Following user-managed deployment, the user confirmed the physical-button workflow now works. This is user-reported live acceptance, not an independently observed pipeline/browser/API retest. cargo check --workspace, fmt check, diff check and affected all-target default Clippy pass. Strict -D warnings fails on pre-existing findings in unchanged code (assertions_on_constants, collapsible_if, let_and_return, type_complexity, manual_div_ceil, items_after_test_module, await_holding_lock, result_large_err). Logs: /tmp/televic-{red,promotion-tests,promotion-check,promotion-clippy,promotion-clippy-default}.log. User handled deployment and confirmed the fix works on the local setup after receiving the chair-button retest steps. Initial snapshots intentionally do not replay an existing active microphone. The assistant performed no live service/microphone/meeting changes or deployment; remote investigation was read-only. User subsequently authorized commit and push to the existing development branch; publication succeeded without creating a separate PR.
Checklist
4 of 4 complete- Add red-green regression coverage and implement shared promotion handling with stale-work protections.
- Confirm physical promotion state and identify the watcher/queue mismatch.
- Pass affected tests, formatting and compile checks; document live verification or remaining limitation.
- Obtain user confirmation that chair-button delegate promotion works after local deployment; distinguish this from independent API/camera retesting.
- Area
- Streaming
- Project
- streaming-engines
- Kind
- Bug
- Priority
- High
- Task ID
tsk_uxewt6frhc- Updated