Migrate TypeScript checks to Effect TSGo#2851
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Needs human review Beyond the tooling migration (tsc → tsgo), this PR changes UUID generation from synchronous global crypto to Effect's Crypto service across auth, checkpoint, and websocket code paths. This introduces new failure modes and error type propagation that warrant review of the runtime behavior impact. You can customize Macroscope's approvability policy. Learn more. |
Co-authored-by: codex <codex@users.noreply.github.com>
35fde9c to
7323b05
Compare
Dismissing prior approval to re-evaluate 7323b05
Co-authored-by: codex <codex@users.noreply.github.com>
Dismissing prior approval to re-evaluate b4ef2d4
Co-authored-by: codex <codex@users.noreply.github.com>
Update native preview to 7.0.0-dev.20260527.2 and replace UUID-only generator wrappers with Effect combinators. Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Dismissing prior approval to re-evaluate 9791111
Co-authored-by: codex <codex@users.noreply.github.com>
Co-authored-by: codex <codex@users.noreply.github.com>
Summary
@effect/tsgoon@typescript/native-preview@7.0.0-dev.20260527.2, while retaining JavaScripttypescriptfor the Astro app@effect/language-serviceruntime dependency and patch nativetsgoduring installglobalDate,globalConsole,globalRandom,globalTimers, andglobalFetch)globalFetchandglobalFetchInEffect;apps/webopts out of plainglobalFetchonly, while server integration requests useHttpClientandHttpBody.jsonPlatformError, and websocket dispatch maps them toOrchestrationDispatchCommandErrorEffect.all/Effect.flatMapfor UUID-dependent dispatch composition and remove all TSGo-reportedunnecessaryEffectGenwrappersSchema.decodeEffectrather than a sync decoder wrapped inEffect.try, with malformed-input coveragelazyEffect, replace all reportedunnecessaryTypeofTypeusages with direct schema types, and regenerate Codex metadata from the corrected generatormultipleCatchTagandredundantMapErrorpatternspackages/contractsindependent of Node ambient typesValidation
bun fmtbun lint(passes with 9 existing warnings)bun typecheck(passes with no Effect TSGo suggestions)bun run test --filter=t3 --filter=@t3tools/desktop --filter=@t3tools/ssh --filter=@t3tools/sharedafter the HTTP client, generator-wrapper, and lenient JSON cleanupsbun run test --filter=t3 --filter=effect-acp --filter=effect-codex-app-serverafter direct-schema generation and final server TSGo suggestion cleanupsbun run test --filter=t3 --filter=@t3tools/contracts --filter=@t3tools/desktop --filter=@t3tools/web --filter=@t3tools/shared --filter=@t3tools/ssh --filter=effect-acp --filter=effect-codex-app-serverTest Results
apps/server: 1023 passed, 4 skipped after the final TSGo cleanupapps/web: 1049 passedapps/desktop: 97 passedpackages/contracts: 142 passedpackages/shared: 120 passedpackages/ssh: 23 passedpackages/effect-acp: 16 passedpackages/effect-codex-app-server: 4 passedNote
High Risk
Renaming Context.Service identifier strings can break runtime resolution if anything still looks up services by the old keys; auth, orchestration, and websocket paths now depend on Crypto service failures propagating correctly across a very large diff.
Overview
Migrates monorepo typechecking from
tsctotsgo(@effect/tsgo/ native preview on TypeScript 6), swapspreparetoeffect-tsgo patch, and drops per-package@effect/language-service+typescriptdev deps where checks now run throughtsgo.Aligns code with stricter Effect/TSGo diagnostics:
Context.Servicekeys are renamed to path-style identifiers (desktop@t3tools/..., servert3/sourceControl/..., etc.);crypto.randomUUID()is replaced withCrypto.Crypto.randomUUIDv4in auth, startup, checkpoint reactor, and websocket dispatch so UUID failures stay typed; orchestration activity/command IDs are composed withEffect.all/yield*instead of sync UUIDs.Test and codegen cleanups: server integration tests use
HttpClient+HttpBody.jsoninstead offetch; generated Codex RPC typings useCodexSchema.Xinstead oftypeof CodexSchema.X.Type; provider logging and settings tests use schemaencode/decodeEffect paths; webtsconfigonly overrides plain-global diagnostic severities.Smaller fixes:
Effect.catchTagson orchestration HTTP routes, simplified OpenCode probe wiring, lenient JSONC decode tests in shared, deterministic activity IDs in web session-logic tests, and removal of redundantEffect.genwrappers flagged by TSGo.Reviewed by Cursor Bugbot for commit c13d21c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Migrate all TypeScript type-checking from
tsctotsgo(Effect TSGo)tsc --noEmitwithtsgo --noEmitacross all packages and apps; removes@effect/language-serviceandtypescriptdevDependencies in favor of@effect/tsgoand TypeScript 6.0.3.preparescript fromeffect-language-service patchtoeffect-tsgo patch.Context.Servicetag identifier strings to path-based conventions (e.g."t3/source-control/Foo"→"t3/sourceControl/Foo","t3/desktop/Foo"→"@t3tools/desktop/…/Foo") to satisfytsgonaming requirements.crypto.randomUUID()calls with the EffectCrypto.Cryptoservice (randomUUIDv4) across auth, orchestration, and WebSocket layers so UUID generation is effectful and testable.Context.Serviceidentifier renames are runtime breaking changes for any persisted or serialized service contexts that relied on the old strings.Macroscope summarized c13d21c.