test: assert structured recovery facts instead of recovery wording in src tests (#12721)

* test: assert structured recovery facts instead of recovery wording in src tests

Replace recovery-sentence locks with the structured fields that already
carry those facts, and own Batch 4 temporary directories through
createTestTempDirectory.

* test(hopper): keep recovery order that retry_action does not carry

retry_action names restart or unknown. It does not say to read
provider_operation_health before retrying, or to close_binary before
opening and retrying. Those order checks stay.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-11-19 23:05:20 -05:00
1 parent dc2c31e76d
commit 74bdfd2ec2
19 files changed
+238 -273

No files matched your search

+11 -10
View File
@@ -728,9 +728,6 @@ it("keeps an unchanged SIGXFSZ retry uncertain when the inherited limit was not
undefined,
),
);
expect(projected.remediation.action).toContain(
"The effective inherited limit was not reported.",
);
expect(projected.remediation.action).toContain(
"an unchanged retry may succeed or may fail the same way",
);
@@ -774,13 +771,17 @@ it("treats a fixed command-output cap as a non-retryable capture allowance", asy
fixedAllowance: { kind: "capture", limit: 1024, unit: "bytes" },
});
const projected = projectAnalysisError(error);
expect(projected.retryable).toBe(false);
expect(projected.remediation.action).toContain(
"The retained command-output allowance of 1024 bytes",
);
expect(projected.remediation.action).toContain(
"this release has no runtime override",
);
expect(projected).toMatchObject({
retryable: false,
details: {
refusal: {
kind: "fixed_ceiling",
allowance_kind: "capture",
limit: 1024,
unit: "bytes",
},
},
});
expect(projected.remediation.action).not.toMatch(
/Review the reported worker memory limits/u,
);