media/04-macos-adapter#36
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Greptile SummaryThe PR adds the supervised macOS MediaRemote adapter and its asynchronous per-widget transport execution path.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains in the asynchronous command-drain or nonjoining worker-teardown fixes.
|
| Filename | Overview |
|---|---|
| host/src/macos_host.zig | Integrates asynchronous command-result draining, nonjoining slot teardown, media supervision, and bounded shutdown fencing. |
| host/src/providers_macos.zig | Implements the macOS adapter provider, per-widget command executors, metadata lifecycle, artwork handling, and focused teardown tests. |
| host/src/macos_media.m | Adds the native macOS runtime and process support used by the supervised adapter. |
| runtime/src/provider_macos.zig | Extends the macOS runtime provider path for media frames and transport acknowledgements. |
| host/build.zig | Packages and builds the vendored MediaRemote adapter resources. |
| .github/workflows/ci.yml | Adds adapter auditing and rebuilds both host and runtime with automation seams for macOS session testing. |
Sequence Diagram
sequenceDiagram
participant Widget
participant Host as Host supervision loop
participant Worker as Per-widget command worker
participant Helper as MediaRemote helper
Widget->>Host: Transport command over authenticated UDS
Host->>Worker: Enqueue command
Host-->>Host: Continue supervision and provider delivery
Worker->>Helper: Launch bounded command helper
Helper-->>Worker: Accepted, declined, or channel failure
Worker-->>Host: Queue result
Host-->>Widget: Write command acknowledgement
Note over Host,Worker: Slot teardown detaches an in-flight worker
Note over Worker: Worker self-releases after bounded completion
Reviews (8): Last reviewed commit: "fix: publish detached worker completion ..." | Re-trigger Greptile
|
@greptile-apps The blocking issue in the review of 351e8e4 is addressed by d474281. Each transport-capable widget now owns a FIFO command worker; the host loop only authorizes/enqueues commands and drains results as the sole UDS writer. Tests cover FIFO command IDs and false acknowledgements on helper failure. Final-head Windows, Apple-silicon, Intel, and hosted-session CI are green. Please re-review the current head. |
ab5114e to
5fbc620
Compare
ca5fe86 to
5a40f03
Compare
9f1ca83 to
389a9cd
Compare
5a40f03 to
f7bf7f8
Compare
389a9cd to
6afc9aa
Compare
f7bf7f8 to
dd53c91
Compare
6afc9aa to
ddfff61
Compare
dd53c91 to
9c31229
Compare
9c31229 to
4495be9
Compare
ddfff61 to
d3753b2
Compare
Stack: 04/05
What becomes usable
ungive/mediaremote-adapterv0.7.6 route through Apple-signed/usr/bin/perl, isolated behind the existing PID-authenticated per-widget UDS.Deliberately missing / unverified
The route spike passed, but the remediated Weaver implementation remains UNVERIFIED (needs attended Mac) for:
Hosted CI proves compilation and synthetic lifecycle/test behavior, not real MediaRemote player behavior.
Verification
Final implementation head
9c31229:npm test? PASS, 63/63npm run typecheck? PASSruntime: zig build test -Dweb-layer=exclude -Dtrace=off? PASShost: zig build test? PASSweaver check examples/now-playing? PASSaarch64-macosno-emit provider/host compiles ? PASS30193380839? PASS: gate, Intel headless, Apple-silicon headless, and hosted Apple-silicon sessionTests cover the 10 s first-frame boundary; residual framing; blank/unknown session mapping; malformed and normalized artwork; failure taxonomy; 30 s backoff stability; the 15.4 predicate; invalid and non-1? rates; delayed seek convergence, no session, callback timeout, and out-of-tolerance expiry; synchronous command-drain avoidance; and bounded nonjoining slot teardown.
Evidence / visual gate
The attended route spike passed all eight route gates with real Spotify and a visibly delivered pause:
docs/media-evidence/pr04-mac-spike.md. It is route evidence only. This PR changes no widget pixels, so no Weaver pixel visual gate applies.Performance
Performance claim explicitly declined: Weaver's implementation has not been measured against a real player on an attended Mac.