Skip to content

refactor(schema): decode effect schemas directly#24169

Merged
kitlangton merged 1 commit intodevfrom
kit/schema-decode-cleanup
Apr 24, 2026
Merged

refactor(schema): decode effect schemas directly#24169
kitlangton merged 1 commit intodevfrom
kit/schema-decode-cleanup

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Replace Effect-derived .zod.parse calls with cached Schema.decodeUnknownSync decoders.
  • Decode ACP todo JSON with Schema.fromJsonString(Schema.Array(Todo.Info)) instead of JSON.parse plus Zod safeParse.
  • Decode PTY IDs with the Effect schema at the websocket boundary.

Testing

  • bun typecheck from packages/opencode
  • bun run test:ci test/cli/import.test.ts from packages/opencode
  • bun run test:ci test/project/worktree.test.ts test/project/worktree-remove.test.ts from packages/opencode
  • bun run test:ci test/pty/pty-session.test.ts from packages/opencode
  • push hook bun turbo typecheck

@kitlangton kitlangton merged commit cf45a8d into dev Apr 24, 2026
13 checks passed
@kitlangton kitlangton deleted the kit/schema-decode-cleanup branch April 24, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant