Repository navigation
fix(errors): stop recommending retries for non-retryable failures - #1869
Conversation
Unreadable output and provider adapter failures project retryable=false, but their standard message and remediation said "Retry once", so a firmware run whose expected report was never published told callers to repeat a non-retryable operation. Point those failures at `rea doctor` and the reported details instead, leaving retryability decided once by the projected error code. Fixes #1855 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0037b5028c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (ADAPTER_FAILURE_TAGS.has(tag)) | ||
| return "Analysis could not complete. Retry once; if it continues, run `rea doctor`."; | ||
| return "Analysis could not complete. Run `rea doctor` and review the reported details; repeating the unchanged request is not expected to succeed."; |
There was a problem hiding this comment.
Align Hopper remote guidance with retryability
HopperRemoteError still bypasses this standard-message branch: hopperErrorUserMessage returns its diagnostic message first, and analysisErrorRemediationAction tells every non-invalid_request remote failure to “retry if the failure was transient.” Those errors project as execution_failure with retryable: false, including the normal bridge/remote-error path, so the newly updated documentation and stated invariant remain false for Hopper remote failures. Route that path to non-retry guidance or mark/document the explicit exception.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in a76e20e. A non-invalid_request HopperRemoteError projects as execution_failure with retryable: false, so its remediation no longer suggests a retry. It now says to review the Hopper diagnostic details, correct the request or target, run rea doctor if the provider itself is failing, and that repeating the unchanged request is not expected to succeed. invalid_request (retryable) still says to correct the arguments and retry. The new retry-guidance test now includes the bridge-exception remote failure.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Fixes #1855.
A firmware inspection whose expected report was never published returned a contradictory error:
code: unreadable_outputwithretryable: false, but a message and remediation saying "Retry once; if it continues, runrea doctor." The same contradiction applied to every non-retryable failure that falls back to the standard per-tag messages:AnalysisOutputError,AnalysisProtocolError,HopperProtocolError→unreadable_outputProviderAdapterError→execution_failureretryableis decided once, from the projected code (RETRYABLE_CODES), and neither code is retryable.Change
analysisErrorPresentation.tsnow send the caller torea doctorand the reported details, and state that repeating the unchanged request is not expected to succeed.userMessage, Hopper diagnostics, resource-limit remediation) are unchanged.detailsare untouched; nothing reinterprets the failure.docs/user-visible-errors.csvand the two MCP boundary tests that pin this text are updated.Validation
src/domain/analysisErrorProjection.test.tscases project a firmwareAnalysisOutputErrorand aProviderAdapterError. They assertretryable: falseand that neither the message nor the remediation recommends a retry. Both cases fail without the fix.npm run test:focusedpasses 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:fastandnpm run docs:checkpass.🤖 Generated with Claude Code