Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tests/control_plane_ts/local_authority_runtime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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();
Expand Down
Loading