Skip to content

Commit cd28590

Browse files
gregbergeclaude
andauthored
fix(backend): raise comment JSON byte limit to 40kb (#2348)
* fix(backend): raise comment JSON byte limit to 40kb Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * test(backend): bump byte-limit test payload above 40kb Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ba28f64 commit cd28590

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/backend/src/comment/validate.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ describe("isCommentTooLarge", () => {
379379
marks: [
380380
{
381381
type: "link",
382-
attrs: { href: `https://example.com/${"a".repeat(25_000)}` },
382+
attrs: { href: `https://example.com/${"a".repeat(45_000)}` },
383383
},
384384
],
385385
},

apps/backend/src/comment/validate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export function isCommentEmpty(value: JSONContent): boolean {
169169
* - depth protects recursive rendering from pathological nesting.
170170
*/
171171
const MAX_COMMENT_CHARACTERS = 2_000;
172-
const MAX_COMMENT_JSON_BYTES = 20_000;
172+
const MAX_COMMENT_JSON_BYTES = 40_000;
173173
const MAX_COMMENT_NODES = 300;
174174
const MAX_COMMENT_DEPTH = 12;
175175

0 commit comments

Comments
 (0)