Skip to content

Use schema decoding for Effect parsing paths#2775

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

Use schema decoding for Effect parsing paths#2775
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/effect-codebase-idioms-cbd0

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor Bot commented May 21, 2026

What Changed

  • Decode .t3code/vcs.json with Schema.fromJsonString and return Option for missing/invalid config paths instead of JSON.parse/null.
  • Decode Windows process diagnostics JSON through Effect Schema and normalize rows with Option.
  • Added focused coverage for invalid VCS config JSON and Windows process JSON parsing.

Why

These are small Effect idiom cleanups that make parsing paths more schema-driven, reduce nullable control flow, and keep timeout policy expressed as an effect/Duration.

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

Use schema-based decoding for Windows process JSON and VCS project config parsing

  • Replaces loose type-checking in parseWindowsProcessRows with Schema-based decoding; records that fail validation are discarded rather than passed through
  • normalizeWindowsProcessRow now strictly requires valid pid, ppid, and a non-empty command, returning Option.none for invalid rows
  • parseWindowsProcessRows is now exported and handles both array and single-object JSON responses
  • VcsProjectConfig parsing switches to schema-based decoding so invalid or malformed JSON deterministically returns 'auto' instead of throwing
  • Behavioral Change: previously accepted Windows process records with missing/invalid fields may now be silently dropped

Macroscope summarized cb6fa9c.

Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels May 21, 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