Files
anomalyco_opencode/packages/opencode/test
Kit Langton 7df8cd1de7 fix(server): truncate schema-rejection reason to bound response + log size
Edge-case audit on PR #26631 caught two real exposures:

1. DoS amplification: Effect's Issue formatter recursively dumps the
   rejected `actual` value with no truncation. A 5K-element invalid
   array produced a 358 KB 400 response. Cap to 1 KB.

2. Secret echo: a token mis-posted to a typed endpoint (e.g.
   `{aggregate:"sk-..."}`) was mirrored verbatim in `data.message` AND
   in the warn log. Same cap mitigates — the field path is preserved,
   the rejected value is truncated.

Adds two regression tests:
- Query rejection (was uncovered; reachable in production)
- 50 KB invalid payload → response body stays < 2 KB
2026-05-09 23:28:37 -04:00
..
2026-05-09 12:08:00 -05:00
2026-05-09 22:47:54 +00:00
2026-05-03 00:32:24 +00:00
2025-11-06 13:03:12 -05:00
2026-05-04 02:57:18 +00:00
2026-05-04 21:28:38 -04:00
2026-05-09 04:06:08 +00:00