fix(json): preserve runtime limits across JSON file readers (#1350)

* fix(cli): preserve runtime JSON string-limit diagnostics

* test(json): check actionable oversized Evidence recovery

* fix(json): decode large UTF-8 inputs by character length

* test(json): reject truncated UTF-8 after large input decode
This commit is contained in:
Ysopwnable
2026-10-09 19:39:35 +00:00
committed by GitHub
parent 750fb65650
commit 9c4a68bc19
8 changed files with 232 additions and 81 deletions
+1
View File
@@ -18,6 +18,7 @@ describe("CLI JSON input failure recognition", () => {
{ input_reason: "invalid-json" },
{ input_path: "input.json", input_reason: "invalid-json" },
{ input_path: "missing.json", input_reason: "read-failed" },
{ input_path: "large.json", input_reason: "too-large" },
{ input_path: "", input_reason: "read-failed" },
])("recognizes a complete envelope with metadata %j", (metadata) => {
const value = { ...envelope, ...metadata };