Skip to content

Commit 68d5b7a

Browse files
t3dotggclaude
andauthored
chore: fit three comments to the four-line cap so lint passes on main (#24675)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 8f26ed7 commit 68d5b7a

3 files changed

Lines changed: 12 additions & 16 deletions

File tree

‎apps/server/src/orchestration-v2/WireProjection.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,10 @@ function remember<K, V>(memory: Map<K, V>, key: K, value: V): void {
257257
}
258258

259259
/**
260-
* One per subscription, applied after coalescing so it only remembers records the client
261-
* received, in the snapshot or in events. A record event comes before the turn item that repeats
262-
* its body (adapters and the orchestrator emit them in that order), so the item can ship blank
263-
* and marked; so can a repeated subagent record. Emitting in the other order, or forgetting a
264-
* record, only costs bytes: the repeat ships whole.
260+
* One per subscription, after coalescing, so it remembers only records the client received. A
261+
* record event comes before the turn item that repeats its body, so the item (or a repeated
262+
* subagent record) ships blank and marked. The other order, or a forgotten record, only costs
263+
* bytes: the repeat ships whole.
265264
*/
266265
export function makeLiveBodyDeduper(): (
267266
item: OrchestrationV2ThreadStreamItem,

‎packages/contracts/src/orchestrationV2.ts‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -744,12 +744,10 @@ export const OrchestrationV2SubagentWorkflow = Schema.Struct({
744744
export type OrchestrationV2SubagentWorkflow = typeof OrchestrationV2SubagentWorkflow.Type;
745745

746746
/**
747-
* Wire-only. Set for clients that opted in with `acceptDedupedBodies` or `dedupeBodies=1` when the
748-
* marked field was blanked because the client already holds the same value: in the record it
749-
* received earlier on the same response or stream. Restore with
750-
* `@t3tools/shared/orchestrationV2DedupedBodies` before use; never store or forward a marked
751-
* value. Clients that opted in restore only these fields, so blanking another field needs a new
752-
* opt-in.
747+
* Wire-only, for clients that opted in with `acceptDedupedBodies` or `dedupeBodies=1`: the field
748+
* was blanked because an earlier record on the same response or stream holds the same value.
749+
* Restore with `@t3tools/shared/orchestrationV2DedupedBodies`; never store or forward a marked
750+
* value. Clients restore only these fields, so blanking another field needs a new opt-in.
753751
*/
754752
const DedupedBodyMarker = Schema.optionalKey(Schema.Literal(true));
755753

‎packages/shared/src/orchestrationV2DedupedBodies.ts‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ import {
1111
import * as Schema from "effect/Schema";
1212

1313
/**
14-
* A turn item repeats a body its record already carries: message text, checkpoint files, a
15-
* subagent's prompt and result. For clients that opt in, the server blanks the repeat and marks
16-
* the field (`textOmitted`, `filesOmitted`, `promptOmitted`, `resultOmitted`), and the client
17-
* copies the value back from the record it already holds. Only a body equal to the record's is
18-
* blanked, so the restore is exact.
14+
* For clients that opt in, the server blanks a turn item's body that its record already carries
15+
* (message text, checkpoint files, a subagent's prompt and result) and marks the field. The client
16+
* copies the value back from the record. Only a body equal to the record's is blanked, so the
17+
* restore is exact.
1918
*/
2019
export interface DedupedBodySource {
2120
readonly messageText: (id: MessageId) => string | undefined;

0 commit comments

Comments
 (0)