Skip to content

Use idiomatic Effect primitives in config and SSH readiness#2697

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/effect-codebase-idioms-e7d9
Draft

Use idiomatic Effect primitives in config and SSH readiness#2697
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/effect-codebase-idioms-e7d9

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented May 14, 2026

What Changed

  • Switched SSH tunnel readiness timing options/constants from raw millisecond numbers to Duration values, while only converting to milliseconds at remote-script/log boundaries.
  • Reworked VCS project config loading to decode JSON with Schema.fromJsonString and model missing/invalid values with Option.
  • Added coverage for invalid VCS project config JSON fallback behavior.

Why

This keeps Effect-based code closer to Effect primitives, makes timing policy easier to test with Effect clocks, and removes ad-hoc JSON.parse/null handling from VCS config parsing.

UI Changes

Not applicable.

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

Replace numeric millisecond values with Effect Duration primitives in SSH tunnel and VCS config

  • Replaces raw millisecond numbers with Duration-typed constants and parameters in tunnel.ts; callers must now pass Duration values for timeout, interval, and probeTimeout to waitForHttpReady.
  • Rewrites VcsProjectConfig helpers in VcsProjectConfig.ts to use Option instead of nulls and try/catch, including findConfigPath, parseConfig, and readConfiguredKind.
  • Adds a test case for malformed VCS config JSON, asserting resolveKind returns 'auto'.
  • Behavioral Change: waitForHttpReady now uses an outer Effect.timeoutOption to bound total duration instead of a fixed retry count, and readConfiguredKind returns 'auto' on any parse failure with a warning log.

Macroscope summarized 6dfcdaa.

Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 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