Skip to content

Fix packaged MCP smoke ownership checks#611

Merged
baron merged 1 commit into
mainfrom
wt/fix-tip-packaged-smoke-handshake
Jul 23, 2026
Merged

Fix packaged MCP smoke ownership checks#611
baron merged 1 commit into
mainfrom
wt/fix-tip-packaged-smoke-handshake

Conversation

@baron

@baron baron commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace active UNIX-socket ownership probes with passive macOS libproc inspection
  • tie the launched listener to the exact current socket inode through the existing owner-only, flock-held ownership lock
  • preserve the full signed/notarized packaged-app windows roundtrip for Tip, stable release, promotion, and release-candidate smokes
  • add zero-connection, wrong-owner, stale replacement, and bound-but-not-listening replacement regressions

Root cause

The packaged smoke ownership verifier connected to the production bootstrap socket only to read LOCAL_PEERPID, then closed without sending the newline-delimited bootstrap handshake. The app serializes handshake I/O, so those empty clients queued ahead of the real rpce-cli windows request and repeatedly produced BootstrapSocketServer: failed to read handshake, timing out Tip smoke after signing/notarization had already succeeded.

Safety

  • no timeout increases, sleeps, smoke removal, unsigned artifacts, or signing bypasses
  • exact launched PID/executable, owner-only directory/socket/lock, sole listener claimant, device/inode identity, held lock vnode, and stable snapshots remain fail-closed
  • macOS libproc ABI sizes/offsets are asserted and self-tested in the packaged smoke
  • official stable and Tip paths share the fixed smoke helper

Validation

  • focused Python ownership tests: 3 passed
  • full Scripts/test_release_tooling.py: 76 passed
  • make dev-test FILTER=BootstrapSocketOwnershipTests: 7 passed
  • make dev-lint: passed
  • make dev-release-preflight: passed
  • git diff --check and Python compilation: passed

Release evidence

  • Fix bundled Codex release signing #606 signing/notarization fix is already on main and exact-main official Release Candidate packaging passed
  • two Tip runs subsequently passed signing/notarization and failed only in this post-sign packaged smoke, matching this root cause exactly

@baron
baron requested a review from w-winter July 23, 2026 07:02
Comment thread Scripts/verify_packaged_mcp_socket_owner.py
@baron
baron merged commit a490c37 into main Jul 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant