fix(compaction): add timeout and ensure cleanup to prevent indefinite hangs on rate limit

Closes #2062
This commit is contained in:
YeonGyu-Kim
2026-02-26 20:58:01 +09:00
parent 6f54404a51
commit fab820e919
6 changed files with 272 additions and 13 deletions
@@ -6,7 +6,7 @@ export function getOrCreateRetryState(
): RetryState {
let state = autoCompactState.retryStateBySession.get(sessionID)
if (!state) {
state = { attempt: 0, lastAttemptTime: 0 }
state = { attempt: 0, lastAttemptTime: 0, firstAttemptTime: 0 }
autoCompactState.retryStateBySession.set(sessionID, state)
}
return state