docs(errors): describe live JSON heap admission

Replace the superseded fixed 64 MiB process-input refusal with the shared reader diagnostic and recovery text. Restore CSV field boundaries in the adjacent import-limit catalogue entry.

Refs #5077. Verification is source consistency and CSV parsing, without a new large-file runtime claim.
This commit is contained in:
morluto
2026-10-20 21:59:05 +08:00
parent 0c440bfc07
commit 82902465c4
+2 -2
View File
@@ -35,7 +35,7 @@ harm_rank,location,trigger,current_copy,user_risk,proposed_replacement,implement
24.93,src/server/registerFunctionComparisonTool.ts:probe rationale,Function comparison is incomplete,Capture complete dossiers with equal providers and analysis limits.,Exposes provider architecture and gives ambiguous equality guidance,"Capture complete dossiers for both functions under the same target context and analysis limits.",implemented,verified by focused function-comparison MCP test
24.95,incur:CLI argument validation,Caller omits or mistypes a command argument,VALIDATION_ERROR with raw Zod Details and fieldErrors including code/path/expected/received,Exposes validator representation and buries the useful correction,"REA could not read the command arguments. Check the named argument and its expected type, then try again.",implemented,verified by sanitizer unit tests and real dispatcher missing-argument test
25,src/application/ReferenceSourceImport.ts:cancelled,Reference-source import is cancelled,Reference source import cancelled,No recovery timing guidance,"Reference source import was cancelled. Start it again when ready.",implemented,focused assertions passed
26,src/application/ReferenceSourceImportPolicy.ts:invalid-limits,Configured import limits are not positive integers,Import limits must be positive integers,Fixed importer ceilings prevented full source imports,Removed fixed byte, entry, depth, and path limits.,removed,verified by greater-than-10000 entry and greater-than-16-MiB regressions
26,src/application/ReferenceSourceImportPolicy.ts:invalid-limits,Configured import limits are not positive integers,Import limits must be positive integers,Fixed importer ceilings prevented full source imports,"Removed fixed byte, entry, depth, and path limits.",removed,verified by greater-than-10000 entry and greater-than-16-MiB regressions
27,src/application/ReferenceSourceImportPolicy.ts:invalid-root,Source path cannot resolve or is not a directory,Reference source root could not be resolved / Reference source root is not a directory,Multiple low-level copies and no complete path check,"Reference source directory could not be opened. Check that the path exists, is readable, and points to a directory.",implemented,focused assertions passed
28,src/application/ReferenceSourceImportPolicy.ts:policy,No approved root exists or requested root is outside policy,No approved reference source roots / Reference source root is outside approved roots,Approval friction duplicates direct caller path selection,Removed the configured root allowlist and permission gate; caller-selected directories are validated and traversed directly.,removed,verified by source search and focused import tests
29,src/application/ReferenceSourceImport.ts:io,Reader fails during traversal,Raw reader error message,May expose filesystem details and inconsistent recovery,"Reference source files could not be read. Check directory permissions and try again.",implemented,focused assertions passed
@@ -72,7 +72,7 @@ harm_rank,location,trigger,current_copy,user_risk,proposed_replacement,implement
59,src/application/Setup.ts:unsupported macOS,macOS version is missing or older than 12,Upgrade to macOS 12 or newer.,Low risk; exact support floor,Keep current copy,unchanged,verified by setup host tests
60,src/application/Setup.ts:unsupported Linux,Linux distribution is outside supported set,"REA supports Hopper on Ubuntu 24.04+, Fedora 41+, Nobara 44+, 64-bit Arch Linux, and CachyOS.",Low risk; exact supported alternatives,Keep current copy,unchanged,verified by setup unit test
61,src/application/process/ProcessCli.ts:readJson read,Process scenario or evidence file cannot be read,Raw filesystem exception through CLI framework,Can expose local paths/codes and no recovery,"Process input file could not be read. Check that the path exists and is readable.",implemented,verified by focused CLI test
62,src/application/process/ProcessCli.ts:readJson size,Process scenario or evidence file exceeds 64 MiB,Process JSON input exceeds byte limit,Does not state limit or recovery,"Process input file is too large. Reduce it below 64 MiB, then try again.",implemented,verified by focused sparse-file CLI test
62,src/application/JsonInputFile.ts:memory admission,Projected process JSON value exceeds available heap headroom,Insufficient heap headroom to materialize the complete JSON value,Heap admission depends on live runtime capacity rather than a fixed 64 MiB file limit,"Provide a smaller valid JSON value. For Evidence workflows, re-analyze a smaller selection of the original target and use its complete Evidence; splitting JSON text or trimming Evidence fields does not produce valid workflow input.",implemented,Source verified against shared JSON reader and recovery constant; former fixed-size refusal is superseded
63,src/application/process/ProcessCli.ts:readJson parse,Process scenario or evidence file is malformed JSON,Raw JSON parser exception through CLI framework,Can expose parser implementation and lacks recovery,"Process input file is not valid JSON. Repair the file, then try again.",implemented,verified by focused CLI test
64,src/application/process/ProcessCli.ts:capture scenario parse,Scenario fails Process Capture schema,Raw Zod validation exception through CLI framework,Exposes schema internals and field paths without stable recovery,"Process scenario is invalid. Check its required fields and limits, then try again.",implemented,verified by focused CLI test
66,src/application/process/ProcessCli.ts:wrong evidence,Comparison receives valid Evidence from another workflow,Expected REA process capture Evidence,Uses internal schema name and does not explain recovery,"Capture evidence is not from the current process-capture workflow. Create new capture evidence, then try again.",implemented,verified by focused CLI test
1 harm_rank location trigger current_copy user_risk proposed_replacement implementation_status verification_result
35 24.93 src/server/registerFunctionComparisonTool.ts:probe rationale Function comparison is incomplete Capture complete dossiers with equal providers and analysis limits. Exposes provider architecture and gives ambiguous equality guidance Capture complete dossiers for both functions under the same target context and analysis limits. implemented verified by focused function-comparison MCP test
36 24.95 incur:CLI argument validation Caller omits or mistypes a command argument VALIDATION_ERROR with raw Zod Details and fieldErrors including code/path/expected/received Exposes validator representation and buries the useful correction REA could not read the command arguments. Check the named argument and its expected type, then try again. implemented verified by sanitizer unit tests and real dispatcher missing-argument test
37 25 src/application/ReferenceSourceImport.ts:cancelled Reference-source import is cancelled Reference source import cancelled No recovery timing guidance Reference source import was cancelled. Start it again when ready. implemented focused assertions passed
38 26 src/application/ReferenceSourceImportPolicy.ts:invalid-limits Configured import limits are not positive integers Import limits must be positive integers Fixed importer ceilings prevented full source imports Removed fixed byte Removed fixed byte, entry, depth, and path limits. entry removed depth verified by greater-than-10000 entry and greater-than-16-MiB regressions
39 27 src/application/ReferenceSourceImportPolicy.ts:invalid-root Source path cannot resolve or is not a directory Reference source root could not be resolved / Reference source root is not a directory Multiple low-level copies and no complete path check Reference source directory could not be opened. Check that the path exists, is readable, and points to a directory. implemented focused assertions passed
40 28 src/application/ReferenceSourceImportPolicy.ts:policy No approved root exists or requested root is outside policy No approved reference source roots / Reference source root is outside approved roots Approval friction duplicates direct caller path selection Removed the configured root allowlist and permission gate; caller-selected directories are validated and traversed directly. removed verified by source search and focused import tests
41 29 src/application/ReferenceSourceImport.ts:io Reader fails during traversal Raw reader error message May expose filesystem details and inconsistent recovery Reference source files could not be read. Check directory permissions and try again. implemented focused assertions passed
72 59 src/application/Setup.ts:unsupported macOS macOS version is missing or older than 12 Upgrade to macOS 12 or newer. Low risk; exact support floor Keep current copy unchanged verified by setup host tests
73 60 src/application/Setup.ts:unsupported Linux Linux distribution is outside supported set REA supports Hopper on Ubuntu 24.04+, Fedora 41+, Nobara 44+, 64-bit Arch Linux, and CachyOS. Low risk; exact supported alternatives Keep current copy unchanged verified by setup unit test
74 61 src/application/process/ProcessCli.ts:readJson read Process scenario or evidence file cannot be read Raw filesystem exception through CLI framework Can expose local paths/codes and no recovery Process input file could not be read. Check that the path exists and is readable. implemented verified by focused CLI test
75 62 src/application/process/ProcessCli.ts:readJson size src/application/JsonInputFile.ts:memory admission Process scenario or evidence file exceeds 64 MiB Projected process JSON value exceeds available heap headroom Process JSON input exceeds byte limit Insufficient heap headroom to materialize the complete JSON value Does not state limit or recovery Heap admission depends on live runtime capacity rather than a fixed 64 MiB file limit Process input file is too large. Reduce it below 64 MiB, then try again. Provide a smaller valid JSON value. For Evidence workflows, re-analyze a smaller selection of the original target and use its complete Evidence; splitting JSON text or trimming Evidence fields does not produce valid workflow input. implemented verified by focused sparse-file CLI test Source verified against shared JSON reader and recovery constant; former fixed-size refusal is superseded
76 63 src/application/process/ProcessCli.ts:readJson parse Process scenario or evidence file is malformed JSON Raw JSON parser exception through CLI framework Can expose parser implementation and lacks recovery Process input file is not valid JSON. Repair the file, then try again. implemented verified by focused CLI test
77 64 src/application/process/ProcessCli.ts:capture scenario parse Scenario fails Process Capture schema Raw Zod validation exception through CLI framework Exposes schema internals and field paths without stable recovery Process scenario is invalid. Check its required fields and limits, then try again. implemented verified by focused CLI test
78 66 src/application/process/ProcessCli.ts:wrong evidence Comparison receives valid Evidence from another workflow Expected REA process capture Evidence Uses internal schema name and does not explain recovery Capture evidence is not from the current process-capture workflow. Create new capture evidence, then try again. implemented verified by focused CLI test