fix: preserve initial watch event services and refresh build tooling - #28
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 7:42 AM ET / 11:42 UTC. ClawSweeper reviewWhat this changesThe branch defers Merge readiness✅ Ready for maintainer review Keep open for normal maintainer landing: the owner-authored PR has a contained fix for the early Priority: P2 Review scores
Verification
How this fits together
flowchart LR
A[Sonos speaker] --> B[UPnP notification callback]
B --> C[Buffered event queue]
D[AVTransport subscription] --> E[Subscription service map]
F[RenderingControl subscription] --> E
C --> G[Resolve service after setup]
E --> G
G --> H[Terminal, JSON, or TSV output]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Land the bounded queue-consumer fix together with its deterministic regression coverage and minimum/preferred Go-version checks. Do we have a high-confidence way to reproduce the issue? Yes—source and the added deterministic harness define a high-confidence path: hold the first subscription return after its response, deliver a callback notification, then verify the queued event is labeled after setup. Target code was not executed during this read-only review. Is this the best way to solve the issue? Yes—the change preserves callback buffering and unknown-SID behavior while moving only the race-prone lookup to a point after both subscriptions exist. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning high; reviewed against db3a674eaa5b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged as b7850a276c8c549532f3fcd88c29dad68facf2b4. The protocol-compliant regression receives the subscription response before sending the notification and reproduces the old SID-registration race. The fix passed 20 race-detector repetitions and built-CLI response-first checks on Go 1.26.0 and 1.26.8, including unknown-SID handling and unsubscribe cleanup. The earlier response-withholding fixture remains an additional robustness check, not a UPnP ordering guarantee. Fresh full P0–P2 review found no actionable issues. All workflows passed on the exact merge commit: CI, Docker, Pages, and Dependency Graph. The live watch documentation and install documentation returned HTTP 200, and their HTML matched a fresh render of the merged tree byte for byte. |
watchcould label the first AVTransport or RenderingControl notification asunknownwhen it arrived before the caller recorded the SID from the subscription response. Resolve service names when queued events are consumed, after both subscriptions are established. This removes the shared SID map and preserves existing buffering, unknown-SID behavior, and subscription cleanup.The JSON regression receives and parses the SUBSCRIBE response, then holds return to the caller while an initial NOTIFY is acknowledged. This deterministically proves the application scheduling race while respecting UPnP response-first ordering. This race surfaced during CI for a tooling refresh, so the PR also prefers Go 1.26.8 without raising the Go 1.26 source minimum, adds minimum-version CI, aligns Docker, and updates golangci-lint, the Dockerfile frontend, and pinned Pages actions. Runtime module versions are already current. Both new macOS architectures retain the released macOS 12.0 minimum.
Validation:
make ciwith Go 1.26.8 passed format, coverage, lint, race tests, and vet; full Go 1.26.0 tests passed. Local Go checks usedGOMAXPROCS=2andGOFLAGS=-p=2.vtool; all report macOS 12.0.sonos,ffmpeg,yt-dlp, andcurlpassed on the tooling commit; final-head Docker CI verifies the combined candidate.The first PR CI run exposed the watch race while push CI passed. The fix addresses the reproduced ordering defect rather than relying on a retry.
Independent full-candidate P0–P2 review found no actionable issues after the watch fix.