From b50c57472efa3b201a888196c6ee2cf04fd500ca Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 25 Sep 2026 00:00:25 -0700 Subject: [PATCH] test(native-chat): pin that a start dead before proving owes no settlement The removed restart handoff test pinned this branch; nothing else did. Co-Authored-By: Claude --- ...-session-eviction-settlement-latch.test.ts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main/runtime/agent-session-eviction-settlement-latch.test.ts b/src/main/runtime/agent-session-eviction-settlement-latch.test.ts index c6ae4fc2ffa..ebb893ef7e5 100644 --- a/src/main/runtime/agent-session-eviction-settlement-latch.test.ts +++ b/src/main/runtime/agent-session-eviction-settlement-latch.test.ts @@ -30,6 +30,32 @@ describe('proven-dead agent session eviction settlement', () => { }) }) + it('owes no settlement for a start that died before proving its handle', () => { + const record = agentSessionRecordFixture( + agentSessionLeaseFixture({ + runtimeKind: 'native', + claimStatus: 'reserved', + handoffStage: 'new-owner-proving', + handoffOperationId: 'attach-op-1', + unreconciled: true + }) + ) + + const evicted = applyAgentSessionRestartAdjudication({ + record, + probe: { outcome: 'pid-absent' }, + now: NOW + }) + + expect(evicted.lease).toMatchObject({ + claimStatus: 'released', + runtimeFence: 8, + handoffStage: null, + handoffOperationId: null + }) + expect(evicted.lease).not.toHaveProperty('settlementRetryRequired') + }) + it('latches recovery eviction from the same evicted disposition', () => { const record = agentSessionRecordFixture( agentSessionLeaseFixture({ runtimeKind: 'native', handoffStage: 'recovering' })