Skip to content

Make SSH readiness handling more idiomatic Effect#2716

Draft
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/effect-codebase-idioms-92a5
Draft

Make SSH readiness handling more idiomatic Effect#2716
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/effect-codebase-idioms-92a5

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented May 15, 2026

What Changed

  • Converted SSH package errors from Data.TaggedError to serializable Schema.TaggedErrorClass definitions.
  • Split SSH readiness failures into granular tagged error variants with structured metadata.
  • Updated HTTP readiness timing to accept Duration.Input values and track optional last-failure state with Option.
  • Replaced downstream schema-error checks with hoisted Schema.is guards.

Why

This keeps the SSH Effect code closer to the rest of the codebase's idioms: schema-backed errors are serializable and structured, timing policies flow through Duration and Effect timeout/retry primitives, and optional diagnostic state avoids null sentinels.

UI Changes

None.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web View Automation 

Note

Refactor SSH error classes to Schema.TaggedErrorClass with granular readiness error variants

  • Converts all SSH error classes in packages/ssh/src/errors.ts from Data.TaggedError to Schema.TaggedErrorClass, enabling schema-based type guards (Schema.is) in place of instanceof checks.
  • Splits the single SshReadinessError class into three distinct variants: SshReadinessProbeFailedError, SshReadinessProbeTimedOutError, and SshReadinessTimedOutError, each carrying specific timing and URL metadata.
  • Updates waitForHttpReady in packages/ssh/src/tunnel.ts to accept Duration.Input fields instead of numeric milliseconds, and emits the new specific error variants.
  • Replaces numeric millisecond timeout constants throughout tunnel.ts with Duration values; computed millisecond values are equivalent.
  • Risk: All instanceof checks against the old SSH error classes will no longer match; callers must migrate to the schema-based Schema.is guards or the exported isSshReadinessError predicate.

Macroscope summarized 1c5a80e.

cursoragent and others added 3 commits May 15, 2026 16:06
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 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