Repository navigation
fix(hopper): preserve observed process failures across requests - #1927
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When an owned Hopper process stopped during a request, queue enrichment dropped its launcher diagnostics, and later requests reduced the observed exit to an unreachable socket. Preserve the exit code or signal, bounded output, and output-closure uncertainty for active, queued, and later callers. Related to #1808; that issue remains open because external GUI crash recovery is a separate ownership problem.
Problem and expected behavior
A signal exit has no numeric exit code. Callers should still receive the observed signal and an
exitedprovider state, with their own operation and request ID. A native GUI helper's exit must remain distinct from an observed GUI exit.Change and scope
Use named error context instead of seven positional arguments, preserve typed diagnostic context when correlating queued requests, and retain owned-process exit facts at the request boundary. Document the resulting diagnostics, the macOS first-use demo/license prompt, and pending-dialog troubleshooting in the README and installation guide.
Consolidate redundant external-document cleanup tests and recover failed helper fixtures through their exact authenticated bridge during teardown. This removes repeated 30-second cleanup waits while retaining negative acknowledgement, missing transport, backing-image retention, helper ownership, and cleanup retry coverage.
Contract and boundary impact
details.launcherevidence on owned runtime failures; signal-aware failure messages; no catalog changes.Evidence and regression coverage
Tests added or updated: numeric exit evidence; active/queued/later signal failure correlation; exact transport credential redaction while preserving source-looking values; disconnected external bridge recovery; consolidated cleanup ownership and retained resources.
Base reproduction: the numeric exit regression failed on the affected base because
details.launcherwas absent.User-visible CLI/MCP output:
provider_unavailable,provider_state: exited, observed signal in the message anddetails.launcher, operation-specific stage/request identity.Remaining proof gaps: no real native GUI crash was induced. Native helper lifetime does not prove GUI lifetime.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
npm run check— passed, including typecheck, lint, formatting, dependency/metadata checks and architecture guards.npm run docs:checkandnpm run build:cached— passed.npm run verify:fixtures— seven source-owned macOS fixtures passed.node scripts/verify-real-hopper.mjs— passed against installed Hopper 6.6.0-demo after the user accepted its demo prompt: 199 successful boundary calls, 62 rejected calls, 172 schemas, complete 1,205-item procedure/string inventories, timeout/cancellation recovery, target switching and CLI/MCP parity. Native document closure, unrelated-process survival and empty owned descendant lineage verified.Cannot launch Hopper! Connection is invalid.); REA preserved its diagnostics and retained unconfirmed resources. The successful subsequent run does not erase that failed attempt.Compatibility, safety, and release
Review checklist
type(scope): outcome.