[PR #3288] [CLOSED] fix(ledger): map non-canonical bundle TypeError to AnalysisInputError #5703

Closed
opened 2026-10-31 01:08:46 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3288
Author: @aakash-env
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (3)

  • c96f3f5 fix(ledger): map non-canonical bundle TypeError to AnalysisInputError (#3219)
  • 7e9662a test(ledger): assert resolver success and correct non-canonical test comments
  • 78134d6 Merge branch 'main' into main

📊 Changes

1 file changed (+91 additions, -0 deletions)

View changed files

➕ src/application/ReconstructionObligationLedger.noncanonical.test.ts (+91 -0)

📄 Description

fix(ledger): route non-canonical bundle TypeError to invalid_request (#3219)

parseEvidenceBundle() throws TypeError("Evidence bundle manifests are not
canonical") when a bundle's manifest arrays don't match re-derived canonical
form. The catch block in buildReconstructionObligationLedgerEvidenceValidated
only guarded z.ZodError, letting TypeError fall through to AnalysisProtocolError
→ unreadable_output instead of AnalysisInputError → invalid_request

Add TypeError to the guard, consistent with ReconstructionCoverageService and
the existing TypeError support in workflowInputError's type signature

Add regression test covering both the error class and the issue payload


🔄 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/3288 **Author:** [@aakash-env](https://github.com/aakash-env) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`c96f3f5`](https://github.com/morluto/rea/commit/c96f3f5ac23a00b11ee9709160e1647d0dafe1dc) fix(ledger): map non-canonical bundle TypeError to AnalysisInputError (#3219) - [`7e9662a`](https://github.com/morluto/rea/commit/7e9662a7d20ad9fa569a75f1d314cf14141a23fb) test(ledger): assert resolver success and correct non-canonical test comments - [`78134d6`](https://github.com/morluto/rea/commit/78134d60808e19c081497ea6406deaf88ae229d2) Merge branch 'main' into main ### 📊 Changes **1 file changed** (+91 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `src/application/ReconstructionObligationLedger.noncanonical.test.ts` (+91 -0) </details> ### 📄 Description fix(ledger): route non-canonical bundle TypeError to invalid_request (#3219) parseEvidenceBundle() throws TypeError("Evidence bundle manifests are not canonical") when a bundle's manifest arrays don't match re-derived canonical form. The catch block in buildReconstructionObligationLedgerEvidenceValidated only guarded z.ZodError, letting TypeError fall through to AnalysisProtocolError → unreadable_output instead of AnalysisInputError → invalid_request Add TypeError to the guard, consistent with ReconstructionCoverageService and the existing TypeError support in workflowInputError's type signature Add regression test covering both the error class and the issue payload --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:08:46 +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#5703
No description provided.