Skip to content

Commit 5142954

Browse files
committed
fix: remove unnecessary re-export, import schema directly from @internal/compute, add zod pinning rule
1 parent 680f156 commit 5142954

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ pnpm run changeset:add
8080

8181
When modifying only server components (`apps/webapp/`, `apps/supervisor/`, etc.) with no package changes, add a `.server-changes/` file instead. See `.server-changes/README.md` for format and documentation.
8282

83+
## Dependency Pinning
84+
85+
Zod is pinned to a single version across the entire monorepo (currently `3.25.76`). When adding zod to a new or existing package, use the **exact same version** as the rest of the repo - never a different version or a range. Mismatched zod versions cause runtime type incompatibilities (e.g., schemas from one package can't be used as body validators in another).
86+
8387
## Architecture Overview
8488

8589
### Request Flow

apps/supervisor/src/services/computeSnapshotService.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,11 @@ import pLimit from "p-limit";
22
import { SimpleStructuredLogger } from "@trigger.dev/core/v3/utils/structuredLogger";
33
import { parseTraceparent } from "@trigger.dev/core/v3/isomorphic";
44
import type { SupervisorHttpClient } from "@trigger.dev/core/v3/workers";
5-
import {
6-
SnapshotCallbackPayloadSchema,
7-
type SnapshotCallbackPayload,
8-
} from "@internal/compute";
5+
import { type SnapshotCallbackPayload } from "@internal/compute";
96
import type { ComputeWorkloadManager } from "../workloadManager/compute.js";
107
import { TimerWheel } from "./timerWheel.js";
118
import type { OtlpTraceService } from "./otlpTraceService.js";
129

13-
export { SnapshotCallbackPayloadSchema, type SnapshotCallbackPayload };
14-
1510
type DelayedSnapshot = {
1611
runnerId: string;
1712
runFriendlyId: string;

apps/supervisor/src/workloadServer/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import { HttpServer, type CheckpointClient } from "@trigger.dev/core/v3/serverOn
2424
import { type IncomingMessage } from "node:http";
2525
import { register } from "../metrics.js";
2626
import { env } from "../env.js";
27+
import { SnapshotCallbackPayloadSchema } from "@internal/compute";
2728
import {
2829
ComputeSnapshotService,
29-
SnapshotCallbackPayloadSchema,
3030
type RunTraceContext,
3131
} from "../services/computeSnapshotService.js";
3232
import type { ComputeWorkloadManager } from "../workloadManager/compute.js";

0 commit comments

Comments
 (0)