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

@@ -1100,11 +1100,14 @@ it("attributes an adopted file to the ceiling that bounded its offer", () => {
let step = steps.next();
while (!step.done) step = steps.next();
projection.adoptFileProjection(step.value);
const limitation = projection
.finish(SHA256, semanticApplication)
.limitations.join("\n");
expect(limitation).toContain("max_semantic_nodes_per_file is 3");
expect(limitation).not.toContain("max_semantic_nodes is 10");
const finished = projection.finish(SHA256, semanticApplication);
expect(finished.coverage.controls).toEqual([
expect.objectContaining({
parameter: "max_semantic_nodes_per_file",
effective_value: 3,
applies_at: "next_call",
}),
]);
});
it("reports truncation only when a file exceeds its exact node budget", () => {