fix(voice): require admin for voice set#97874
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 29, 2026, 4:19 PM ET / 20:19 UTC. Summary PR surface: Source +7, Tests +57. Total +64 across 2 files. Reproducibility: yes. Current main’s Talk Voice handler and existing test show no-scope Telegram Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow subcommand-level owner/admin gate after maintainers explicitly accept the compatibility-visible permission tightening and exact-head checks remain green. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s Talk Voice handler and existing test show no-scope Telegram Is this the best way to solve the issue? Yes. Subcommand-level gating is the narrowest maintainable fix because it protects the config write while preserving AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 29f787f10ed4. Label changesLabel justifications:
Evidence reviewedPR surface: Source +7, Tests +57. Total +64 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Behavioral proof at head I exercised the real command path, not a reduced authorization model:
Observed with an authorized Telegram command sender and a configured voice provider:
This proves the mutation boundary itself: denied callers never reach Fresh focused validation:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs for /voice set authorization: Main sets the voice, while this PR requires operator.admin.
Motion-trimmed clips: |
(cherry picked from commit cbdbb22)
(cherry picked from commit cbdbb22)




Summary
Require admin or explicit owner authority before Talk Voice persists a new voice selection.
Changes
Validation
What Problem This Solves
Fixes an issue where authorized non-owner channel command senders could persist a gateway-wide Talk voice change when no gateway scope metadata was present.
Why This Change Was Made
Persistent Talk voice selection is a gateway configuration write, so the mutating command now requires the same admin or owner authority used by adjacent config-writing command handlers. Read-only voice status and list commands remain available.
User Impact
Operators get consistent admin-only behavior for persistent Talk voice changes. Non-owner command senders can still inspect voice status or list voices when otherwise authorized, but cannot persist a new voice selection.
Evidence
The focused Talk Voice test file passes with 17 tests, including external Telegram/Discord denial without admin, admin success, owner success, and read-only command coverage.