[PR #1869] [MERGED] fix(errors): stop recommending retries for non-retryable failures #4865

Closed
opened 2026-10-31 00:56:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/error-remediation-retryability


📝 Commits (2)

  • 0037b50 fix(errors): stop recommending retries for non-retryable failures
  • a76e20e fix(errors): align Hopper remote failure guidance with retryability

📊 Changes

5 files changed (+44 additions, -12 deletions)

View changed files

📝 docs/user-visible-errors.csv (+6 -6)
📝 src/domain/analysisErrorPresentation.ts (+3 -3)
📝 src/domain/analysisErrorProjection.test.ts (+32 -0)
📝 tests/boundary/mcp/enhancedTools.03-returns-typed-graph-failures-and.test.ts (+1 -1)
📝 tests/boundary/mcp/enhancedTools.callPathsAndBatches.test.ts (+2 -2)

📄 Description

Summary

Fixes #1855.

A firmware inspection whose expected report was never published returned a contradictory error: code: unreadable_output with retryable: false, but a message and remediation saying "Retry once; if it continues, run rea doctor." The same contradiction applied to every non-retryable failure that falls back to the standard per-tag messages:

  • AnalysisOutputError, AnalysisProtocolError, HopperProtocolError → unreadable_output
  • ProviderAdapterError → execution_failure

retryable is decided once, from the projected code (RETRYABLE_CODES), and neither code is retryable.

Change

  • The two standard messages in analysisErrorPresentation.ts now send the caller to rea doctor and the reported details, and state that repeating the unchanged request is not expected to succeed.
  • Retryability stays owned by the projected code, so the tagged outcome and the guidance no longer disagree.
  • Error-specific messages (userMessage, Hopper diagnostics, resource-limit remediation) are unchanged.
  • The exit/report-publication evidence and causes in details are untouched; nothing reinterprets the failure.
  • docs/user-visible-errors.csv and the two MCP boundary tests that pin this text are updated.

Validation

  • New src/domain/analysisErrorProjection.test.ts cases project a firmware AnalysisOutputError and a ProviderAdapterError. They assert retryable: false and that neither the message nor the remediation recommends a retry. Both cases fail without the fix.
  • npm run test:focused passes on the projection tests, the MCP boundary tests that pin this text, and the firmware suites (7 files passed, 3 skipped by platform).
  • npm run check:fast and npm run docs:check pass.

🤖 Generated with Claude Code


🔄 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/1869 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/11/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/error-remediation-retryability` --- ### 📝 Commits (2) - [`0037b50`](https://github.com/morluto/rea/commit/0037b5028cf732ae93f0c32450fb91c693a9c577) fix(errors): stop recommending retries for non-retryable failures - [`a76e20e`](https://github.com/morluto/rea/commit/a76e20ee92234bd7affd879249d6345dc2f1d3dc) fix(errors): align Hopper remote failure guidance with retryability ### 📊 Changes **5 files changed** (+44 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `docs/user-visible-errors.csv` (+6 -6) 📝 `src/domain/analysisErrorPresentation.ts` (+3 -3) 📝 `src/domain/analysisErrorProjection.test.ts` (+32 -0) 📝 `tests/boundary/mcp/enhancedTools.03-returns-typed-graph-failures-and.test.ts` (+1 -1) 📝 `tests/boundary/mcp/enhancedTools.callPathsAndBatches.test.ts` (+2 -2) </details> ### 📄 Description ## Summary Fixes #1855. A firmware inspection whose expected report was never published returned a contradictory error: `code: unreadable_output` with `retryable: false`, but a message and remediation saying "Retry once; if it continues, run `rea doctor`." The same contradiction applied to every non-retryable failure that falls back to the standard per-tag messages: - `AnalysisOutputError`, `AnalysisProtocolError`, `HopperProtocolError` → `unreadable_output` - `ProviderAdapterError` → `execution_failure` `retryable` is decided once, from the projected code (`RETRYABLE_CODES`), and neither code is retryable. ## Change - The two standard messages in `analysisErrorPresentation.ts` now send the caller to `rea doctor` and the reported details, and state that repeating the unchanged request is not expected to succeed. - Retryability stays owned by the projected code, so the tagged outcome and the guidance no longer disagree. - Error-specific messages (`userMessage`, Hopper diagnostics, resource-limit remediation) are unchanged. - The exit/report-publication evidence and causes in `details` are untouched; nothing reinterprets the failure. - `docs/user-visible-errors.csv` and the two MCP boundary tests that pin this text are updated. ## Validation - New `src/domain/analysisErrorProjection.test.ts` cases project a firmware `AnalysisOutputError` and a `ProviderAdapterError`. They assert `retryable: false` and that neither the message nor the remediation recommends a retry. Both cases fail without the fix. - `npm run test:focused` passes on the projection tests, the MCP boundary tests that pin this text, and the firmware suites (7 files passed, 3 skipped by platform). - `npm run check:fast` and `npm run docs:check` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 00:56:10 +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#4865
No description provided.