Skip to content
Source
Sign inSign up
pingdotgg/t3code

chore: clear Effect language service suggestions #13536

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/13536/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

Problem

vp run -r typecheck printed about 1,590 suggestion-level diagnostics from @effect/tsgo 0.41, mostly since the TypeScript 7 upgrade (#10663). Real issues get buried under the noise.

Fix

  • schemaNumber off in tsconfig.base.json. 688 hits were the generated codex app-server schema and most of the other ~410 were JSON wire contracts, which cannot carry NaN or Infinity.
  • Rewrote the remaining ~460 suggestions into the forms the rules suggest: succeedSome/succeedNone, asSome, ignore/ignoreCause, catchIf/catchCauseIf, yield* err, orElseSucceed, forEach, filterOrFail, fromOption, Effect.fn, typed decode*, and URL.canParse instead of try/catch. Interrupt-aware catchCause handlers became catchCauseIf, which re-fails the cause the same way the ternaries did.
  • Per-line suppressions with a reason where the pattern is intentional: abortControllerInEffect (the OpenCode event pump, plus a file-level suppression for the Claude adapter tests), runEffectInsideEffect (the Claude SDK history callback), and raceFirstWithSleepToTimeout (three interval-versus-signal races that are not timeouts). There are 3 more where the rewrite can't typecheck; the reasons are inline.

Two traps for anyone doing the same thing:

  • Effect.void does not satisfy X | undefined under exactOptionalPropertyTypes. Use Effect.undefined there.
  • Effect.ignore passed as an Effect.fn trailing pipeable must be written Effect.ignore().

Worth a look when reviewing:

  • The inverted predicate in ChromiumKeys.ts.
  • FirefoxCookies.ts, where mapError moved into an Effect.fn pipeable. Most of that diff is re-indentation.
  • The retry restructure in managedTunnelStartup.ts.

Verification

  • vp run -r typecheck reports 0 diagnostics. Before: ~1,590 suggestions.
  • vp test run on every changed test file plus the sibling tests of changed production files: about 3,700 tests pass across server, desktop, client-runtime, contracts, relay, shared, effect-acp, and effect-codex-app-server.
  • vp lint on the changed files shows the same warnings before and after. vp fmt --check is clean.

Done by Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code


Devin Review

Summary by CodeRabbit

  • Bug Fixes
    • Improved recovery when managed tunnel registration encounters retryable errors, while non-retryable errors continue to surface.
    • Improved handling of malformed pull-request links so they fall back to a recognized repository host or an unknown-host label.
    • Refined error and cancellation handling across desktop, server, and connection workflows; interruptions are less likely to be treated as ordinary failures.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This is a repository-wide Effect refactor across production and test code, with several runtime error-handling, retry, decoding, and concurrency paths touched. It also adds static-analysis suppressions, including a tsconfig-level disable, and modifies authentication code, so the scope warrants human review.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.5 KiB13.5 KiB+25 B (+0.2%)15.1 KiB✅
      CodexThread snapshot wire7.1 KiB7.1 KiB−14 B (−0.2%)7.3 KiB✅
      CodexLive turn WebSocket wire6.4 KiB6.5 KiB+39 B (+0.6%)7.8 KiB✅
      CodexLive turn WebSocket decoded56.2 KiB56.3 KiB+44 B (+0.1%)66.4 KiB✅
      CodexLive turn messages910+1 (+11.1%)21✅
      ClaudeTotal thread wire13.5 KiB13.5 KiB−31 B (−0.2%)15.1 KiB✅
      ClaudeThread snapshot wire7.1 KiB7.1 KiB−3 B (−0.0%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.5 KiB6.4 KiB−28 B (−0.4%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded57.0 KiB57.0 KiB0 B (0.0%)66.4 KiB✅
      ClaudeLive turn messages990 (0.0%)21✅

      Baseline: 3e2370f · PR result: 5755bc2 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 114.0 KiB
      • Claude decoded thread snapshot: 114.7 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    4. juliusmarminge merged this568c9bc

    5. juliusmarminge closed this

Sign in to join this conversation.