[PR #6361] [MERGED] fix(analysis-view): preserve artifact parent schema diagnostics #7307

Closed
opened 2026-11-01 21:46:55 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/artifact-view-schema-diagnostics


📝 Commits (3)

  • 228bffc fix(analysis-view): preserve artifact parent schema diagnostics
  • 8adf775 Merge remote-tracking branch 'upstream/main' into fix/artifact-view-schema-diagnostics
  • caca9a0 fix(artifacts): locate nested Evidence validation failures

📊 Changes

4 files changed (+195 additions, -7 deletions)

View changed files

📝 src/domain/analysisView/artifactInventoryView.ts (+10 -5)
📝 src/domain/artifactInventoryEvidence.test.ts (+26 -0)
📝 src/domain/artifactInventoryEvidence.ts (+16 -1)
📝 tests/boundary/cli/analysisViewCli.test.ts (+143 -1)

📄 Description

Summary

Fixes #6034. Malformed artifact inventory and inspection parents now produce structured field-level diagnostics under source.normalized_result, instead of one serialized schema error at source. The application error retains its validation cause.

The view reuses analysisViewResultInputError. Authored integrity refusals retain their existing behavior. No tool schema, Evidence format, provider, installation, or target-interaction change. Advance scope approval is not applicable to this ordinary fix.

Review follow-up

Nested Evidence authentication errors originally lacked their substep context. The shared inspection parser now prefixes those errors with substeps[index].evidence where the nested record is authenticated, retaining the original ZodError as the cause. The view uses the resulting path without reconstructing it. No related cleanup remains in this path.

A stale identifier in the second substep now points to source.normalized_result.substeps[1].evidence.evidence_id. Producer regressions cover indices 0 and 1; the application/CLI regression checks the second substep and retained cause.

Updated the branch with upstream 888b2afc0, including the existing repair for the unrelated JavaScript cancellation assertion that failed the first CI run.

Validation

Windows x64, Node 24.22.0, npm 11.19.1; these differ from the repository pins.

  • Both nested-ID regressions fail before the owner-level fix; the five existing parser tests pass.
  • npm run test:local -- src/domain/artifactInventoryEvidence.test.ts src/domain/analysisView/artifactInventoryView.test.ts — 17 passed.
  • node scripts/run-exact-tests.mjs run tests/boundary/cli/analysisViewCli.test.ts --testTimeout=120000 — 21 passed, including valid, wrong-type, missing-field, and nested-identity cases.
  • node scripts/run-exact-tests.mjs run tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts -t 'reports file progress and honors cancellation before the next source' --testTimeout=120000 — the previously failing CI case passed; 43 unselected tests skipped.
  • npm run check and git diff --check — passed.

No real-provider or separate MCP transport run; the full suite was not run locally.

Author readiness

Human owner: @AyoubElleuch

AI assistance: GPT-6.1 Sol.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 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/6361 **Author:** [@AyoubElleuch](https://github.com/AyoubElleuch) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/artifact-view-schema-diagnostics` --- ### 📝 Commits (3) - [`228bffc`](https://github.com/morluto/rea/commit/228bffc11e535ace95680b2030f779bab8fcb12e) fix(analysis-view): preserve artifact parent schema diagnostics - [`8adf775`](https://github.com/morluto/rea/commit/8adf7755fe1cb84e888b18596d2da92b8f0b2748) Merge remote-tracking branch 'upstream/main' into fix/artifact-view-schema-diagnostics - [`caca9a0`](https://github.com/morluto/rea/commit/caca9a060ed06f19661fc5227ec2e555db40cd84) fix(artifacts): locate nested Evidence validation failures ### 📊 Changes **4 files changed** (+195 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/analysisView/artifactInventoryView.ts` (+10 -5) 📝 `src/domain/artifactInventoryEvidence.test.ts` (+26 -0) 📝 `src/domain/artifactInventoryEvidence.ts` (+16 -1) 📝 `tests/boundary/cli/analysisViewCli.test.ts` (+143 -1) </details> ### 📄 Description ## Summary Fixes #6034. Malformed artifact inventory and inspection parents now produce structured field-level diagnostics under `source.normalized_result`, instead of one serialized schema error at `source`. The application error retains its validation cause. The view reuses `analysisViewResultInputError`. Authored integrity refusals retain their existing behavior. No tool schema, Evidence format, provider, installation, or target-interaction change. Advance scope approval is not applicable to this ordinary fix. ## Review follow-up Nested Evidence authentication errors originally lacked their substep context. The shared inspection parser now prefixes those errors with `substeps[index].evidence` where the nested record is authenticated, retaining the original `ZodError` as the cause. The view uses the resulting path without reconstructing it. No related cleanup remains in this path. A stale identifier in the second substep now points to `source.normalized_result.substeps[1].evidence.evidence_id`. Producer regressions cover indices 0 and 1; the application/CLI regression checks the second substep and retained cause. Updated the branch with upstream `888b2afc0`, including the existing repair for the unrelated JavaScript cancellation assertion that failed the first CI run. ## Validation Windows x64, Node 24.22.0, npm 11.19.1; these differ from the repository pins. - Both nested-ID regressions fail before the owner-level fix; the five existing parser tests pass. - `npm run test:local -- src/domain/artifactInventoryEvidence.test.ts src/domain/analysisView/artifactInventoryView.test.ts` — 17 passed. - `node scripts/run-exact-tests.mjs run tests/boundary/cli/analysisViewCli.test.ts --testTimeout=120000` — 21 passed, including valid, wrong-type, missing-field, and nested-identity cases. - `node scripts/run-exact-tests.mjs run tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts -t 'reports file progress and honors cancellation before the next source' --testTimeout=120000` — the previously failing CI case passed; 43 unselected tests skipped. - `npm run check` and `git diff --check` — passed. No real-provider or separate MCP transport run; the full suite was not run locally. ## Author readiness Human owner: @AyoubElleuch AI assistance: GPT-6.1 Sol. - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:46:55 +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#7307
No description provided.