Skip to content

[codex] Structure Electron protocol teardown failures#3310

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/desktop-electron-protocol-errors
Jun 20, 2026
Merged

[codex] Structure Electron protocol teardown failures#3310
juliusmarminge merged 1 commit into
mainfrom
codex/desktop-electron-protocol-errors

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • preserve the protocol scheme and exact underlying cause for scoped Electron protocol unregistration failures
  • keep registration failures typed while surfacing teardown failures as structured finalizer defects
  • construct errors directly and make registration/unregistration messages derive from structured fields
  • cover both registration and scoped unregistration cause preservation

Validation

  • vp test apps/desktop/src/electron/ElectronProtocol.test.ts
  • vp check
  • vp run typecheck

Overlap audit

Note

Structure Electron protocol teardown failures into typed errors

  • Adds ElectronProtocolUnregistrationError to capture failures from Electron.protocol.unhandle, preserving the scheme and original cause.
  • Updates the acquireRelease teardown in registerDesktopProtocol to use Effect.try instead of Effect.sync, wrapping thrown exceptions in the new error type and terminating via orDie.
  • Updates ElectronProtocolRegistrationError message format to Failed to register Electron protocol scheme "<scheme>".
  • Adds tests verifying error class, scheme, cause, and message for both registration and unregistration failures.

Macroscope summarized dda508c.

Co-authored-by: codex <codex@users.noreply.github.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Straightforward error handling improvement that wraps protocol unregistration failures in a structured error class, matching the existing pattern for registration errors. The change is self-contained with good test coverage and minimal runtime impact.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge juliusmarminge merged commit 9d5ca2c into main Jun 20, 2026
16 checks passed
@juliusmarminge juliusmarminge deleted the codex/desktop-electron-protocol-errors branch June 20, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant