Make server diagnostics and file reads more idiomatic Effect#3633
Draft
cursor[bot] wants to merge 4 commits into
Draft
Make server diagnostics and file reads more idiomatic Effect#3633cursor[bot] wants to merge 4 commits into
cursor[bot] wants to merge 4 commits into
Conversation
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>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
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.
What Changed
WorkspaceFileSystem.readFilefrom directnode:fs/promisesusage to the injected EffectFileSystemservice for canonicalization, scoped file opening, stat, and partial reads.JSON.parse/ ad-hoc record traversal with Schema-backed JSON and record decoding.PlatformErrorcauses.Why
This keeps server internals aligned with idiomatic Effect patterns: native Effect platform services flow through dependency injection, JSON fixtures/parsing use Schema, optional Windows row normalization uses
Option, and filesystem failures now preserve structured platform error data.UI Changes
Not applicable; this is a server-only refactor.
Checklist
Verification:
PATH="/home/ubuntu/.nvm/versions/node/v24.18.0/bin:$PATH" pnpm exec vp test run src/workspace/WorkspaceFileSystem.test.ts src/diagnostics/ProcessDiagnostics.test.ts(fromapps/server): 2 files / 18 tests passedPATH="/home/ubuntu/.nvm/versions/node/v24.18.0/bin:$PATH" pnpm exec vp run typecheck(repo root): passedPATH="/home/ubuntu/.nvm/versions/node/v24.18.0/bin:$PATH" pnpm exec vp check(repo root): passed with 0 errors and 20 pre-existing warnings outside the touched filesNote
Migrate server diagnostics and file reads to Effect-native APIs
node:fs/promisesusage inWorkspaceFileSystemwith EffectFileSystemAPIs; errors now surface asPlatformError-shaped causes inWorkspaceFileSystemOperationError.WindowsCimProcessRecordschema inProcessDiagnosticsto validate CIM JSON before normalization; the parser now handles both single-object and array payloads and returns an empty array on malformed input.normalizeWindowsProcessRowreturnsOption<ProcessRow>instead ofnull, using schema-driven decoding and explicit numeric constraints.readFileerrors now carryPlatformErrorstructure instead ofNodeJS.ErrnoException; tests inWorkspaceFileSystem.test.tshave been updated accordingly.📊 Macroscope summarized faf9d87. 2 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.