From b2a7d322ed0bafda04a0b78ce14e4f25c8d5d170 Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Mon, 9 Nov 2026 18:04:00 -0600 Subject: [PATCH] test: preserve runner commit stall acknowledgement invariants (#20383) Assert that stalled event commits do not advance acknowledgement or committed state. Clarify the limits of historical failure attribution. Preserve the production implementation already merged in #20385. Co-Authored-By: Paperclip --- doc/run-log-events.md | 3 +++ .../src/control-plane/durable-prp-control-plane.test.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/run-log-events.md b/doc/run-log-events.md index d3ba5d85fa4..161edb0bae5 100644 --- a/doc/run-log-events.md +++ b/doc/run-log-events.md @@ -995,3 +995,6 @@ long cause chains stop at the same four-object limit. This only improves the recorded cause. Event acknowledgement, replay integrity, the bounded stall policy, and operator recovery requirements stay unchanged. + +A later successful continuation does not establish the cause of an earlier +failure that recorded only `Error`. diff --git a/packages/paperclip-runner/src/control-plane/durable-prp-control-plane.test.ts b/packages/paperclip-runner/src/control-plane/durable-prp-control-plane.test.ts index afbe4839f43..9b78311876a 100644 --- a/packages/paperclip-runner/src/control-plane/durable-prp-control-plane.test.ts +++ b/packages/paperclip-runner/src/control-plane/durable-prp-control-plane.test.ts @@ -1538,6 +1538,8 @@ it.each([ expect(onProtocolIntegrityError).toHaveBeenCalledOnce(); const failure = onProtocolIntegrityError.mock.calls[0]![0] as Error; expect(failure).toMatchObject({ reason: "runner_event_commit_stalled", detail: `${code} at source seq 1` }); + expect(core.store.state.ackedSourceSeq).toBe(0); + expect(core.store.state.committedEvents).toHaveLength(0); expect(failure.message).toContain("runner_event_commit_stalled"); expect(failure.message).not.toContain("private-host-fixture"); expect(failure.message).not.toContain("private query");