From ef2d1ce649a33b1ac6c92acad890c119aee1a185 Mon Sep 17 00:00:00 2001 From: "duanjialing.777" Date: Fri, 2 Oct 2026 13:02:53 +0800 Subject: [PATCH] test(coordination): align claim contention recovery Signed-off-by: duanjialing.777 --- .../control_plane_ts/local_authority_runtime.test.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/control_plane_ts/local_authority_runtime.test.ts b/tests/control_plane_ts/local_authority_runtime.test.ts index bb41d86f22..f0f16d9b1b 100644 --- a/tests/control_plane_ts/local_authority_runtime.test.ts +++ b/tests/control_plane_ts/local_authority_runtime.test.ts @@ -1302,7 +1302,7 @@ for (const native of [false, true]) { }); } -test("receipt-only claims require head CAS and recover a lost commit response", async () => { +test("receipt-only claims revalidate CAS contention and recover a lost commit response", async () => { for (const fault of ["conflict", "lost_response"] as const) { const root = await mkdtemp(join(tmpdir(), "loopx-claim-no-change-fault-")); const directory = join(root, "authority", "file-v0"); @@ -1335,8 +1335,13 @@ test("receipt-only claims require head CAS and recover a lost commit response", claimed_by: "agent-a", actor_agent_id: "agent-a", registered_agents: ["agent-a"], operation_id: "no-change", observed_at: "2026-09-05T04:30:00Z", dry_run: false, }, {createStore: () => new FaultStore(directory, "goal-a")}); - assert.equal(result.changed, false); - assert.equal(result.status, fault === "conflict" ? "conflict" : "recovered"); + if (fault === "conflict") { + assert.equal(result.status, "failed"); + assert.equal(result.reason_code, "claim_owner_mismatch"); + } else { + assert.equal(result.changed, false); + assert.equal(result.status, "recovered"); + } const receipt = await store.readReceipt("no-change"); assert.equal(receipt.status, fault === "conflict" ? "missing" : "found"); const after = await store.loadAuthority();