From 23363fac9a1e7fae70a6c388cf7238a307ef2619 Mon Sep 17 00:00:00 2001 From: Theo Browne Date: Sat, 24 Oct 2026 19:29:08 -0700 Subject: [PATCH] chore: fit three comments to the four-line cap so lint passes on main Co-Authored-By: Claude Opus 5.5 --- apps/server/src/orchestration-v2/WireProjection.ts | 9 ++++----- packages/contracts/src/orchestrationV2.ts | 10 ++++------ packages/shared/src/orchestrationV2DedupedBodies.ts | 9 ++++----- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/apps/server/src/orchestration-v2/WireProjection.ts b/apps/server/src/orchestration-v2/WireProjection.ts index 715e9671fb4c..a84f8cd46685 100644 --- a/apps/server/src/orchestration-v2/WireProjection.ts +++ b/apps/server/src/orchestration-v2/WireProjection.ts @@ -257,11 +257,10 @@ function remember(memory: Map, key: K, value: V): void { } /** - * One per subscription, applied after coalescing so it only remembers records the client - * received, in the snapshot or in events. A record event comes before the turn item that repeats - * its body (adapters and the orchestrator emit them in that order), so the item can ship blank - * and marked; so can a repeated subagent record. Emitting in the other order, or forgetting a - * record, only costs bytes: the repeat ships whole. + * One per subscription, after coalescing, so it remembers only records the client received. A + * record event comes before the turn item that repeats its body, so the item (or a repeated + * subagent record) ships blank and marked. The other order, or a forgotten record, only costs + * bytes: the repeat ships whole. */ export function makeLiveBodyDeduper(): ( item: OrchestrationV2ThreadStreamItem, diff --git a/packages/contracts/src/orchestrationV2.ts b/packages/contracts/src/orchestrationV2.ts index 8aa4788a3213..f909de7fabd9 100644 --- a/packages/contracts/src/orchestrationV2.ts +++ b/packages/contracts/src/orchestrationV2.ts @@ -744,12 +744,10 @@ export const OrchestrationV2SubagentWorkflow = Schema.Struct({ export type OrchestrationV2SubagentWorkflow = typeof OrchestrationV2SubagentWorkflow.Type; /** - * Wire-only. Set for clients that opted in with `acceptDedupedBodies` or `dedupeBodies=1` when the - * marked field was blanked because the client already holds the same value: in the record it - * received earlier on the same response or stream. Restore with - * `@t3tools/shared/orchestrationV2DedupedBodies` before use; never store or forward a marked - * value. Clients that opted in restore only these fields, so blanking another field needs a new - * opt-in. + * Wire-only, for clients that opted in with `acceptDedupedBodies` or `dedupeBodies=1`: the field + * was blanked because an earlier record on the same response or stream holds the same value. + * Restore with `@t3tools/shared/orchestrationV2DedupedBodies`; never store or forward a marked + * value. Clients restore only these fields, so blanking another field needs a new opt-in. */ const DedupedBodyMarker = Schema.optionalKey(Schema.Literal(true)); diff --git a/packages/shared/src/orchestrationV2DedupedBodies.ts b/packages/shared/src/orchestrationV2DedupedBodies.ts index bf219a066e67..701ae1e83055 100644 --- a/packages/shared/src/orchestrationV2DedupedBodies.ts +++ b/packages/shared/src/orchestrationV2DedupedBodies.ts @@ -11,11 +11,10 @@ import { import * as Schema from "effect/Schema"; /** - * A turn item repeats a body its record already carries: message text, checkpoint files, a - * subagent's prompt and result. For clients that opt in, the server blanks the repeat and marks - * the field (`textOmitted`, `filesOmitted`, `promptOmitted`, `resultOmitted`), and the client - * copies the value back from the record it already holds. Only a body equal to the record's is - * blanked, so the restore is exact. + * For clients that opt in, the server blanks a turn item's body that its record already carries + * (message text, checkpoint files, a subagent's prompt and result) and marks the field. The client + * copies the value back from the record. Only a body equal to the record's is blanked, so the + * restore is exact. */ export interface DedupedBodySource { readonly messageText: (id: MessageId) => string | undefined;