[PR #1425] [MERGED] fix(validation): retain unmatched union correction details #2877

Closed
opened 2026-10-17 21:11:19 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1425
Author: @N0zoM1z0
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/input-discriminator-diagnostics


📝 Commits (1)

  • d6146bd fix(validation): retain unmatched union correction details

📊 Changes

2 files changed (+63 additions, -1 deletions)

View changed files

📝 src/domain/inputIssueProjection.ts (+18 -1)
📝 tests/boundary/cli/analysisViewCli.test.ts (+45 -0)

📄 Description

Closes #1421. Refs #1065.

An unknown or missing discriminator can produce a Zod union error with no branch errors. The shared input-issue projection flattened that into an empty correction list, so the public CLI told callers to correct listed arguments without listing any. Preserve the outer field path and missing/invalid reason, plus any schema-declared allowed variants. Ordinary branch projection and deduplication continue through the existing path; rejected values are not echoed.

Validation on main 4d8ef3f, pinned Node 24.18.0/npm 11.16.0, two CPUs and a 2 GiB family RSS guard:

  • Both unknown and missing view-kind cases fail through the compiled public CLI before the fix and pass afterward.
  • The original failure was observed with a real Ghidra dossier from a 16,784-byte source-owned ELF; the same portable record now reports view.kind and its allowed variants in the CLI error.
  • 49 focused tests pass: compiled CLI plus existing input-issue/error projection coverage, including ordinary union branches and safe correction metadata.
  • Runtime build and full typecheck use the pinned compiler's documented --singleThreaded; lint/module boundaries, changed-file formatting and Git whitespace checks pass.

No input acceptance or Evidence result contract changes. The new regressions exercise the production CLI rather than a mocked formatter.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1425 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/input-discriminator-diagnostics` --- ### 📝 Commits (1) - [`d6146bd`](https://github.com/morluto/rea/commit/d6146bdf5477e03a7dc3bc7e05a41f976de87811) fix(validation): retain unmatched union correction details ### 📊 Changes **2 files changed** (+63 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/inputIssueProjection.ts` (+18 -1) 📝 `tests/boundary/cli/analysisViewCli.test.ts` (+45 -0) </details> ### 📄 Description Closes #1421. Refs #1065. An unknown or missing discriminator can produce a Zod union error with no branch errors. The shared input-issue projection flattened that into an empty correction list, so the public CLI told callers to correct listed arguments without listing any. Preserve the outer field path and missing/invalid reason, plus any schema-declared allowed variants. Ordinary branch projection and deduplication continue through the existing path; rejected values are not echoed. Validation on main `4d8ef3f`, pinned Node 24.18.0/npm 11.16.0, two CPUs and a 2 GiB family RSS guard: - Both unknown and missing view-kind cases fail through the compiled public CLI before the fix and pass afterward. - The original failure was observed with a real Ghidra dossier from a 16,784-byte source-owned ELF; the same portable record now reports `view.kind` and its allowed variants in the CLI error. - 49 focused tests pass: compiled CLI plus existing input-issue/error projection coverage, including ordinary union branches and safe correction metadata. - Runtime build and full typecheck use the pinned compiler's documented `--singleThreaded`; lint/module boundaries, changed-file formatting and Git whitespace checks pass. No input acceptance or Evidence result contract changes. The new regressions exercise the production CLI rather than a mocked formatter. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:11:19 +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#2877
No description provided.