feat(platform): cut over macOS listener inspection - #303
Conversation
📝 WalkthroughWalkthroughmacOS listener inspection now uses kernel-table logic instead of the netstat-based implementation. Error handling, dependencies, acceptance coverage, CI validation, privileged evidence collection, macOS support documentation, and test failure diagnostics were updated. ChangesmacOS Listener Inspection Migration
Test Environment and Fixture Diagnostics
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — this PR makes the PV-owned XNU PCB inspector the sole macOS listener source after establishing a supported-version and architecture acceptance matrix.
- Cut over production listener inspection — macOS listener discovery now delegates exclusively to the bounds-checked
kernel_tableimplementation and wraps failures asPlatformError::ListenerInspection. - Remove legacy inspection paths — the
netstat-esrdependency, production/usr/sbin/netstatexecution, text parser, legacy error variants, and parser snapshots are removed. - Add private-interface acceptance coverage — required CI compares controlled IPv4 and IPv6 loopback and wildcard listeners with Apple
netstaton macOS 14 arm64, macOS 15 Intel, and macOS 26 arm64. - Raise the documented support floor —
DESIGN.mdnow supports macOS 14 and newer while retaining macOS 13 deployment targets for otherwise compatible Managed Resource artifacts. - Update diagnostic collection — the privileged macOS RC script records gateway listener evidence through
lsofwithout invokingnetstat.
GPT Sol | 𝕏
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
62-65: 🩺 Stability & Availability | 🔵 Trivial
macos-14runner image is being deprecated.GitHub Actions began deprecating the
macos-14(Sonoma) runner image on July 6, 2026, with scheduled brownout failures now and full removal by November 2, 2026. Since the matrix entry pins the macOS 14 floor to this label, it will start failing intermittently now and permanently within a few months, right when this PR's whole purpose is asserting macOS 14 support.Source
Deprecation will begin on July 6th, 2026 and the images will be fully unsupported by November 2nd, 2026 for GitHub Actions and Azure DevOps. To raise awareness of the upcoming removal, we will temporarily fail jobs using macOS 14 and macOS 14 arm64. Builds that are scheduled to run during the brownout periods will fail.
Consider tracking this so the matrix is updated once GitHub retires the
macos-14image (there is no currently announcedmacos-14-equivalent successor other than moving the floor check to a self-hosted or pinned VM image).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 62 - 65, Update the macOS 14 arm64 matrix entry associated with runner label macos-14 to avoid relying on the deprecated GitHub-hosted image, using the project’s supported self-hosted or pinned VM strategy when available. Preserve the macOS 14 floor metadata and arm64 coverage, and ensure the matrix remains valid after macos-14 retirement.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 62-65: Update the macOS 14 arm64 matrix entry associated with
runner label macos-14 to avoid relying on the deprecated GitHub-hosted image,
using the project’s supported self-hosted or pinned VM strategy when available.
Preserve the macOS 14 floor metadata and arm64 coverage, and ensure the matrix
remains valid after macos-14 retirement.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ddd61f22-24fa-4f64-a788-0bc06f42e4d9
⛔ Files ignored due to path filters (3)
Cargo.lockis excluded by!**/*.lockcrates/platform/src/listener/macos/snapshots/platform__listener__implementation__kernel_table__tests__live_kernel_table_repeatedly_detects_all_controlled_listener_classes.snapis excluded by!**/*.snapcrates/platform/src/snapshots/platform__tests__netstat_tcp_listener_port_parser_covers_loopback_and_wildcard_addresses.snapis excluded by!**/*.snap
📒 Files selected for processing (12)
.github/workflows/ci.ymlCargo.tomlDESIGN.mdcrates/platform/Cargo.tomlcrates/platform/src/ca.rscrates/platform/src/error.rscrates/platform/src/lib.rscrates/platform/src/listener.rscrates/platform/src/listener/macos.rscrates/platform/src/listener/macos/kernel_table.rsdocs/superpowers/specs/2026-07-19-portable-platform-architecture-design.mdscripts/ci/privileged-macos-rc.sh
💤 Files with no reviewable changes (4)
- crates/platform/src/listener.rs
- crates/platform/src/lib.rs
- Cargo.toml
- crates/platform/Cargo.toml
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the new commits fold listener acceptance into the complete supported macOS CI matrix instead of maintaining a separate ignored-test lane.
- Expanded the Rust CI matrix — the full formatting, lint, dependency, script, and workspace test suite now runs on macOS 14 arm64, macOS 15 Intel, and macOS 26 arm64 after verifying each host.
- Promoted listener acceptance into the normal suite — the live test now requires both the production kernel inspector and Apple
netstatto detect every controlled IPv4 and IPv6 listener across ten samples in each matrix lane. - Aligned platform documentation —
DESIGN.mdand the architecture specification now describe private-interface acceptance as part of the full representative CI matrix.
GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the latest commit makes PHP integration fixtures independent of the CI runner architecture while preserving explicit platform overrides and failure injection.
- Pinned the PHP fixture platform —
TestEnvironmentnow defaults toTargetPlatform::DarwinArm64, matching its artifact fixtures on every macOS matrix lane. - Preserved targeted platform coverage — the injected
DarwinAmd64case and unsupported-platform resolution cases continue to override the fixture default explicitly.
GPT Sol | 𝕏
There was a problem hiding this comment.
Important
The new failure diagnostics violate denied workspace Clippy policy and will block the macOS Rust matrix.
Reviewed changes — the latest commit adds Mailpit fixture process logs to three reconciliation test failures so hosted-runner timeouts expose their underlying process output.
- Added Mailpit failure diagnostics —
print_mailpit_fixture_log_on_errornow reads the fake Mailpit runtime log and emits it alongside reconciliation errors in three fixture tests.
GPT Sol | 𝕏
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)
77-78: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy liftDo not make a known-red macOS 26 lane required.
The PR context reports three unrelated Mailpit fixture-readiness timeouts on macOS 26, but this command runs the entire workspace in every matrix lane. The new diagnostics improve failure reporting but do not make those tests pass. Land the fixture fix first, or add a tracked temporary filter for only the affected tests.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 77 - 78, Update the macOS 26 CI matrix configuration around the “Run tests” step so the known Mailpit fixture-readiness timeout tests are temporarily excluded, or make that lane non-required. Keep full workspace coverage for unaffected lanes and document the temporary scope using the existing tracked CI configuration.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
18-20: 🩺 Stability & Availability | 🔵 TrivialPlan for the macOS 14 runner retirement.
GitHub’s runner-image project says macOS 14 images began deprecation on July 6, 2026, and will be fully unsupported by November 2, 2026. This
macos-14lane will therefore lose hosted coverage of the macOS 14 support floor after November 2, 2026; move it to a supported or self-hosted runner, or document the replacement. (github.com)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 18 - 20, Update the “macOS 14 arm64” workflow matrix entry to use a supported or self-hosted runner instead of macos-14, and adjust macos_major to match the replacement; if retaining macOS 14 coverage is required, document the chosen replacement or support strategy in the workflow.Source: MCP tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 77-78: Update the macOS 26 CI matrix configuration around the “Run
tests” step so the known Mailpit fixture-readiness timeout tests are temporarily
excluded, or make that lane non-required. Keep full workspace coverage for
unaffected lanes and document the temporary scope using the existing tracked CI
configuration.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 18-20: Update the “macOS 14 arm64” workflow matrix entry to use a
supported or self-hosted runner instead of macos-14, and adjust macos_major to
match the replacement; if retaining macOS 14 coverage is required, document the
chosen replacement or support strategy in the workflow.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c9e7b3da-1db9-4a85-80ad-40a210c1f3c5
📒 Files selected for processing (6)
.github/workflows/ci.ymlDESIGN.mdcrates/cli/tests/php.rscrates/daemon/src/managed_resources/tests.rscrates/platform/src/listener/macos/kernel_table.rsdocs/superpowers/specs/2026-07-19-portable-platform-architecture-design.md
💤 Files with no reviewable changes (1)
- crates/platform/src/listener/macos/kernel_table.rs
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/superpowers/specs/2026-07-19-portable-platform-architecture-design.md
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the two commits since the prior Pullfrog review make Mailpit fixture failures CI-compliant and remove threaded HTTP handling from the affected fixtures.
- Returned Mailpit diagnostics through test errors — the three affected reconciliation tests now attach fixture logs to propagated
anyhow::Errorvalues instead of using denied direct stderr macros. - Serialized Mailpit HTTP fixture handling —
mailpit.pyandmailpit-fast-exit.pynow useHTTPServer, while the full fixture preserves its separate SMTP serving and signal-shutdown threads.
GPT Sol | 𝕏
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f9040de2ca
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: macOS 26 arm64 | ||
| runner: macos-26 | ||
| macos_major: "26" | ||
| architecture: arm64 |
There was a problem hiding this comment.
Stabilize the macOS 26 lane before requiring it
When the newly added macOS 26 lane runs cargo nextest run --workspace --all-features --locked, this commit's own validation reports three Mailpit HTTP-readiness timeouts on that host. The fixture changes in this diff only add stderr diagnostics and error context—and still use ThreadingHTTPServer—so they do not resolve the reported failures; enabling this required lane therefore leaves PR and push CI red whenever those timeouts reproduce. Stabilize the affected tests before requiring this lane, or temporarily isolate the failing coverage.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the latest commit restores concurrent Mailpit fixture handling while adding captured lifecycle evidence for the macOS 26 readiness investigation.
- Restored threaded HTTP fixtures —
mailpit.pyandmailpit-fast-exit.pyagain useThreadingHTTPServer, whose daemon request threads preserve safe fixture shutdown while allowing readiness requests to complete independently. - Added fixture lifecycle tracing — both fixtures now record server construction, request receipt, and serve-loop entry in their captured process logs so hosted-runner failures identify where startup stalled.
GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the latest commit removes reverse hostname lookups from loopback Python fixtures while preserving their server and shutdown contracts.
- Bypassed fixture FQDN resolution — gateway, Mailpit, and RustFS HTTP fixtures now bind through
TCPServerdirectly and initialize theHTTPServeraddress fields without callingsocket.getfqdn. - Added a lookup-failure contract — the multi-server fixture test injects a failing
socket.getfqdnwhile retaining readiness and signal-exit validation for Mailpit and RustFS fixtures. - Removed temporary lifecycle tracing — Mailpit fixtures drop the diagnostic request and startup prints added during the preceding hosted-runner investigation while preserving threaded request handling and response flushing.
GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the latest commit extends the fixture FQDN lookup fix to the RustFS server embedded in release smoke tests without changing its runtime contract.
- Extended the RustFS fixture bind fix —
pv-releasesmoke tests now bind their embedded HTTP server throughTCPServerdirectly while preservingHTTPServeraddress fields, readiness, console binding, and shutdown behavior.
GPT Sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the latest commit makes the bounded fake daemon’s accepted connections safe for newline-framed protocol I/O on platforms where they inherit the listener’s nonblocking mode.
- Restored blocking accepted streams —
FakeDaemon::start_until_idlenow keeps nonblocking mode limited to accept polling and switches each acceptedUnixStreamback to blocking mode before reading requests and writing responses.
GPT Sol | 𝕏

Summary
netstat-esr, the/usr/sbin/netstatproduction command path, legacy text parsing, errors, and snapshotsnetstatas a normal, non-ignored platform test in every Rust matrix laneWhy
PR #301 added the kernel inspector but deliberately left it acceptance-only, so the application continued unioning
netstat-esrwith/usr/sbin/netstat. The remaining cutover gate included macOS 13, for which the repository has no current hosted runner. PV now supports macOS 14 and newer; macOS 13 may remain compatible but is untested and unsupported. GitHub provides hosted runners for the resulting representative matrix.Impact
PV now answers loopback TCP listener questions directly from
net.inet.tcp.pcblist_non macOS. Inspection failures remain fail-safe and surface through the typedPlatformError::ListenerInspectionvariant. Managed Resource deployment targets remain at macOS 13, so this policy change does not trigger artifact rebuilds or intentionally break compatible installations.The only remaining
/usr/sbin/netstatexecution is test-only and acts as the acceptance oracle; it is not shipped runtime behavior.The existing Rust job now runs formatting, Clippy, unused-dependency checks, ShellCheck, and the complete workspace test suite on every representative macOS host. There is no separate listener-only CI job.
Validation
cargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo fmt --all -- --checkSummary by CodeRabbit
New Features
Bug Fixes
Documentation