[GH-ISSUE #1421] fix(validation): preserve correction details for unmatched input variants #484

Closed
opened 2026-10-15 18:25:29 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/1421

On compiled main 4d8ef3f (6.3.0, Node 24.18.0/npm 11.16.0), a real small Ghidra dossier submitted to inspect-analysis-view with an unsupported view kind is correctly rejected, but the JSON error contains no field issues or allowed variants. It says to correct the listed arguments although none are listed.

The production parser emits invalid_union with an empty errors array for an unmatched discriminated union. src/domain/inputIssueProjection.ts only flattens branch errors and drops that outer issue. This shared owner is also used by MCP/application input validation; ordinary unions with branch errors already preserve correction metadata.

Preserve the outer field path, missing/invalid reason and any schema-declared allowed variants when there are no branch errors. Keep ordinary branch projection/deduplication and avoid echoing rejected input values. Verify unknown and missing discriminators through the compiled public CLI.

Related to #1065 usability. Reproduced through real CLI input, not solely inferred from source. No native provider failure is claimed.

Originally created by @N0zoM1z0 on GitHub (Oct 10, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/1421 On compiled main `4d8ef3f` (6.3.0, Node 24.18.0/npm 11.16.0), a real small Ghidra dossier submitted to `inspect-analysis-view` with an unsupported view kind is correctly rejected, but the JSON error contains no field issues or allowed variants. It says to correct the listed arguments although none are listed. The production parser emits `invalid_union` with an empty `errors` array for an unmatched discriminated union. `src/domain/inputIssueProjection.ts` only flattens branch errors and drops that outer issue. This shared owner is also used by MCP/application input validation; ordinary unions with branch errors already preserve correction metadata. Preserve the outer field path, missing/invalid reason and any schema-declared allowed variants when there are no branch errors. Keep ordinary branch projection/deduplication and avoid echoing rejected input values. Verify unknown and missing discriminators through the compiled public CLI. Related to #1065 usability. Reproduced through real CLI input, not solely inferred from source. No native provider failure is claimed.
bsakaguchi 2026-10-15 18:25:29 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#484
No description provided.