Repository navigation
Conversation
scene apply ignored LeaveGroup, SetMute, and SetVolume errors and still reported success. Return those errors so a failed restore is not presented as a completed scene. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR makes scene application return room-specific ungroup, mute, and volume errors instead of reporting success. Example: During
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains This PR addresses errors still silently discarded on main and in v0.3.5; the owner should settle its change from best-effort restoration to stopping at the first failure. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe scene CLI reads saved grouping and audio settings, resolves current room addresses, and sends grouping and rendering commands through the Sonos SOAP client. flowchart TD
A[Scene apply command] --> B[Read saved scene]
B --> C[Resolve current topology]
C --> D[Ungroup and rebuild groups]
D --> E[Restore mute and volume]
D --> F[Return room error]
E --> F
E --> G[Write success record]
Technical reviewBest possible solution: Report restoration failures through the existing scene command while preserving best-effort progress unless the feature owner approves stopping immediately. Do we have a high-confidence way to reproduce the issue? Source establishes that transport errors reach these speaker methods and are discarded on main; the submitted tests exercise each path, but no target code was executed during this read-only review. Is this the best way to solve the issue? The checks directly prevent false success with minimal production changes, but collecting failures could solve that problem while retaining the documented best-effort behavior. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 63f57580a780. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 6, 2026, 2:12 PM ET / 19:12 UTC. |
What Problem This Solves
sonos scene applyignored errors fromLeaveGroup,SetMute, andSetVolume, then reported success. Group joins in the same command already returned their errors. A failed ungroup or volume restore looked like a completed scene.Evidence
Before this change,
scene apply Workfinished with no error when room A failed to leave the group, set mute, or set volume:After this change, those three applies return the speaker error and do not print the success record. A scene whose speaker calls succeed still ungroups, joins, and restores volume.
Real behavior proof
/tmp/pr-wave/sonoscli-f002atbd19c2c8ec48. No Sonos speaker was on the network. The CLI command ran with a speaker client that returnedbusy.go test -count=1 -v -run 'TestSceneApplyReportsLeaveAndLevelErrors|TestSceneApplyUngroupsJoinsAndRestoresAudio' ./internal/cli/scene applywithleave group for A,set mute for A, orset volume for A. The JSON success record is not written. A successful apply still restores grouping and levels.Description
scene applyreturns the first ungroup, mute, or volume error, including the room name. Join errors were already returned.