[PR #749] [MERGED] fix(javascript): expose result schema failures #2211

Closed
opened 2026-10-16 21:15:44 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/749
Author: @kaoru0822-kitauji
Created: 10/6/2026
Status: ✅ Merged
Merged: 10/6/2026
Merged by: @kaoru0822-kitauji

Base: main ← Head: fix/javascript-schema-diagnostics


📝 Commits (1)

  • 99263a7 fix(javascript): expose result schema failures

📊 Changes

2 files changed (+55 additions, -5 deletions)

View changed files

📝 src/application/JavaScriptApplicationService.test.ts (+35 -0)
📝 src/application/JavaScriptApplicationService.ts (+20 -5)

📄 Description

Summary

  • classify JavaScript application result-schema rejection as an AnalysisOutputError
  • retain a bounded diagnostic with the operation, issue count, first rejected JSON Pointer, and Zod issue code
  • keep schema messages, rejected values, and internal causes out of caller-visible output

Addresses the diagnostic portion of #746. This does not close the issue: the private Obsidian archive, its multi-minute runtime, and the underlying rejected value remain unverified here.

Problem and evidence

analyze_javascript_application catches a ZodError after reconstruction but converts it to a bare AnalysisProtocolError. The shared projection therefore returns unreadable_output without details, matching the cause-free terminal shape reported in #746.

The focused regression injects a representative result-schema rejection at the existing application boundary. On unchanged main, it failed because the projected error contained no operation or rejected field.

Change and scope

Project the existing schema failure through AnalysisOutputError, which already has the caller-visible operation and reason contract. The reason reports only:

  • total issue count
  • the first issue path as an escaped JSON Pointer
  • the schema issue code

The error code remains unreadable_output. No successful result, tool schema, graph construction, hashing, CLI formatting, progress, or performance behavior changes.

Validation

Passed:

  • TMPDIR=/workspace/scratch/317f8139f5f2/t npx vitest run src/application/JavaScriptApplicationService.test.ts (5 tests)
  • npm exec --package=typescript@5.9.3 -- tsc --noEmit
  • npm run lint
  • targeted oxfmt --check
  • npm run knip
  • npm run metadata:check
  • git diff --check

Baseline evidence:

  • the new focused regression failed on unchanged main because the unreadable_output projection had no details

Materially unverified locally:

  • the reporter's Obsidian 1.12.7 archive was not available, so its exact schema path and underlying reconstruction defect were not reproduced
  • the multi-minute silence and whole-result formatter limits are unchanged
  • the repository TypeScript 7 binary cannot run in this sandbox because /proc/self/exe is unavailable; the stable TypeScript 5.9.3 check passed, and hosted CI covers the repository gate

🔄 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/749 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/6/2026 **Status:** ✅ Merged **Merged:** 10/6/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `fix/javascript-schema-diagnostics` --- ### 📝 Commits (1) - [`99263a7`](https://github.com/morluto/rea/commit/99263a720d7106aff059ad7fa43849151a94c963) fix(javascript): expose result schema failures ### 📊 Changes **2 files changed** (+55 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/application/JavaScriptApplicationService.test.ts` (+35 -0) 📝 `src/application/JavaScriptApplicationService.ts` (+20 -5) </details> ### 📄 Description ## Summary - classify JavaScript application result-schema rejection as an `AnalysisOutputError` - retain a bounded diagnostic with the operation, issue count, first rejected JSON Pointer, and Zod issue code - keep schema messages, rejected values, and internal causes out of caller-visible output Addresses the diagnostic portion of #746. This does not close the issue: the private Obsidian archive, its multi-minute runtime, and the underlying rejected value remain unverified here. ## Problem and evidence `analyze_javascript_application` catches a `ZodError` after reconstruction but converts it to a bare `AnalysisProtocolError`. The shared projection therefore returns `unreadable_output` without `details`, matching the cause-free terminal shape reported in #746. The focused regression injects a representative result-schema rejection at the existing application boundary. On unchanged `main`, it failed because the projected error contained no operation or rejected field. ## Change and scope Project the existing schema failure through `AnalysisOutputError`, which already has the caller-visible `operation` and `reason` contract. The reason reports only: - total issue count - the first issue path as an escaped JSON Pointer - the schema issue code The error code remains `unreadable_output`. No successful result, tool schema, graph construction, hashing, CLI formatting, progress, or performance behavior changes. ## Validation Passed: - `TMPDIR=/workspace/scratch/317f8139f5f2/t npx vitest run src/application/JavaScriptApplicationService.test.ts` (5 tests) - `npm exec --package=typescript@5.9.3 -- tsc --noEmit` - `npm run lint` - targeted `oxfmt --check` - `npm run knip` - `npm run metadata:check` - `git diff --check` Baseline evidence: - the new focused regression failed on unchanged `main` because the `unreadable_output` projection had no `details` Materially unverified locally: - the reporter's Obsidian 1.12.7 archive was not available, so its exact schema path and underlying reconstruction defect were not reproduced - the multi-minute silence and whole-result formatter limits are unchanged - the repository TypeScript 7 binary cannot run in this sandbox because `/proc/self/exe` is unavailable; the stable TypeScript 5.9.3 check passed, and hosted CI covers the repository gate --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:15:44 +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#2211
No description provided.