fix(errors): stop recommending retries for non-retryable failures (#1869)
* fix(errors): stop recommending retries for non-retryable failures 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 <noreply@anthropic.com> * fix(errors): align Hopper remote failure guidance with retryability Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
96547d373f
commit
fb94d9dde0
@@ -384,6 +384,38 @@ describe("analysis error projection: provider failures", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("analysis error projection: retry guidance", () => {
|
||||
it.each([
|
||||
[
|
||||
"unreadable output",
|
||||
new AnalysisOutputError("inspect_firmware_regions", "report missing"),
|
||||
"unreadable_output",
|
||||
],
|
||||
[
|
||||
"adapter failure",
|
||||
new ProviderAdapterError("firmware", "inspect_firmware_regions"),
|
||||
"execution_failure",
|
||||
],
|
||||
[
|
||||
"Hopper remote failure",
|
||||
new HopperRemoteError(7, "Hopper analysis failed", {
|
||||
diagnosticType: "bridge_exception",
|
||||
operation: "trace_feature",
|
||||
}),
|
||||
"execution_failure",
|
||||
],
|
||||
])(
|
||||
"does not recommend an unchanged retry for non-retryable %s",
|
||||
(_name, error, code) => {
|
||||
const projected = projectAnalysisError(error);
|
||||
|
||||
expect(projected).toMatchObject({ code, retryable: false });
|
||||
for (const text of [projected.message, projected.remediation.action])
|
||||
expect(text).not.toMatch(/\bretry\b/iu);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
describe("analysis error projection: caller contract", () => {
|
||||
it("preserves the reported output constraint without exposing its internal cause", () => {
|
||||
const projected = projectAnalysisError(
|
||||
|
||||
Reference in New Issue
Block a user