Skip to content

fix(hopper): wait for late bridges during cleanup - #1866

Merged
morluto merged 1 commit into
mainfrom
codex/fix-hopper-late-cleanup
Oct 11, 2026
Merged

morluto merged 1 commit into
mainfrom
codex/fix-hopper-late-cleanup

Conversation

@morluto

@morluto morluto commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Addresses the remaining review comment from #1817, which merged while this fix was being prepared.

close_binary previously made one socket connection attempt after a timed-out Hopper handoff. A missing or refused endpoint returned immediately, even when the matching bridge appeared milliseconds later. Retry only ENOENT and ECONNREFUSED within the existing 30-second cleanup deadline, sharing that deadline with the health handshake. Other connection failures, rejected credentials, and mismatched run identities retain ownership without requesting document shutdown.

Preserve the configured startup timeout and launcher diagnostics when the health request's timer fires before the startup timer. Extend the regression coverage to publish the socket after close begins, including an actual refused Unix socket and the compiled stdio MCP workflow. Allow the failure tests to exercise the full cleanup window, and await the SDK child-close event before recovering a retained target lease.

Validation:

  • Combined focused config/Hopper/CLI/MCP coverage: 186 passing cases across 25 files, with two platform skips, including targeted reruns after test budget and teardown corrections.
  • After moving onto current main: handshake, deadline, and protocol suites passed all 28 cases.
  • npm run check and the pre-push check passed.
  • Native Hopper 6.6 probe on macOS 26.3 arm64: interrupt a valid session through a local socket relay, start explicit close while its endpoint is absent, then republish the endpoint 150 ms later. REA authenticated the exact run, confirmed document closure, and removed the runtime. The delayed endpoint was controlled by the probe; this does not establish the reporter's macOS 27 GUI-crash behavior.

@morluto
morluto marked this pull request as ready for review October 11, 2026 14:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T14:49:17.786846Z f821883 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit cf7477e into main Oct 11, 2026
29 checks passed
@morluto
morluto deleted the codex/fix-hopper-late-cleanup branch October 11, 2026 14:50
@github-actions github-actions Bot mentioned this pull request Oct 11, 2026
3 tasks done
N0zoM1z0 added a commit that referenced this pull request Oct 11, 2026
Include the main-branch Hopper startup timeout normalization already merged
in #1866 so combined CI retains launcher diagnostics when either timer fires.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <[email protected]>
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 2026
@morluto morluto added the provider: hopper Analysis provider / engine: hopper label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working provider: hopper Analysis provider / engine: hopper

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant