Skip to content

Commit def7c5f

Browse files
test: keep file cap tests valid after the reader relaxes
Once pingdotgg#13429 lets ChatFileAttachment decode any positive size, message decoding and sendTurn no longer reject a file one byte over the upload cap. That boundary belongs to AttachmentCreateUploadUrlInput, which assets.test.ts already covers, so drop the read-side rejection assertions that would fail once both PRs land. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 2fa6fd8 commit def7c5f

2 files changed

Lines changed: 1 addition & 12 deletions

File tree

‎apps/server/src/provider/Layers/ProviderService.test.ts‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ for (const name of ["codex", "claudeAgent", "cursor", "grok", "opencode", "antig
993993
makeProviderServiceLayer({
994994
registry: makeStaticInstanceRegistry([[instanceId, adapter.adapter]]),
995995
}).layer(`${name} file attachment limits`, (it) => {
996-
it.effect("passes a 100 MB ZIP by path and rejects one byte more", () =>
996+
it.effect("passes a 100 MB ZIP by path", () =>
997997
Effect.gen(function* () {
998998
const provider = yield* ProviderService.ProviderService;
999999
const threadId = asThreadId(`zip-${name}`);
@@ -1015,14 +1015,6 @@ for (const name of ["codex", "claudeAgent", "cursor", "grok", "opencode", "antig
10151015
assert.include(sent?.input ?? "", '[Attached file "archive.zip" is saved at: ');
10161016
assert.include(sent?.input ?? "", `${attachment.id}.zip]`);
10171017
assert.deepEqual(sent?.attachments, [attachment]);
1018-
const error = yield* provider
1019-
.sendTurn({
1020-
threadId,
1021-
attachments: [{ ...attachment, sizeBytes: 100_000_001 }],
1022-
})
1023-
.pipe(Effect.flip);
1024-
assert.instanceOf(error, ProviderValidationError);
1025-
assert.equal(adapter.sendTurn.mock.calls.length, 1);
10261018
}),
10271019
);
10281020
});

‎packages/contracts/src/orchestration.test.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,6 @@ it.effect("rejects malformed known attachment types instead of tolerating them",
380380
updatedAt: "2026-01-01T00:00:00.000Z",
381381
});
382382

383-
const maxFile = yield* decode({ ...base, type: "file", sizeBytes: 100_000_000 });
384-
assert.strictEqual(maxFile.attachments?.[0]?.sizeBytes, 100_000_000);
385-
386383
const oversizedFile = yield* Effect.exit(
387384
decode({ ...base, type: "file", sizeBytes: PROVIDER_SEND_TURN_MAX_FILE_BYTES + 1 }),
388385
);

0 commit comments

Comments
 (0)