fix(runner): keep warm run.attach events on ordinary accounting (#19707)

This commit is contained in:
Nicky Leach authored and GitHub committed 2026-11-06 23:09:57 -08:00
1 parent b03ea621c6
commit 167e39c4ef
6 files changed
+203 -5

No files matched your search

@@ -14322,6 +14322,10 @@ async function createRunnerdBackendWithinSessionClaim(
await current.acceptAccountingEvent(event);
} : undefined,
onRecoveryAccountingEvent: input.onAccountingEvent ? async (event: PrpEvent, source: Parameters<NonNullable<typeof recoveryUsage>>[1]) => {
// Only usage needs a proven recovery source. A lifecycle event that
// fails here closes the Runner connection without an ACK, and the
// Runner then replays that event without end.
if (!isNativeUsageAccountingEvent(event)) return;
const current = sessionToolAuthorityEpochs.get(sessionScopeId);
if (!current) throw new Error("native_recovery_usage_source_unproven");
await current.acceptRecoveryAccountingEvent(event, () => {