YeonGyu-Kim
116b1f9e4e
fix(anthropic-recovery): fix retry timer memory leak in context window recovery
...
🤖 Generated with assistance of OhMyOpenCode
2026-03-31 17:33:24 -07:00
YeonGyu-Kim
69d0b23ab6
fix(anthropic-recovery): clear session state after successful summarize and fix timing test
...
- Add missing clearSessionState() call after successful summarize (line 117)
Without this, retry state persisted even after success, potentially causing
unnecessary retries on subsequent compaction events.
- Fix timing-sensitive test: adjust attempt=0 and firstAttemptTime to give
proper remainingTimeMs buffer for capped delay calculation.
Fixes #2225
Supersedes #2671
2026-03-24 16:23:11 +09:00
YeonGyu-Kim
fab820e919
fix(compaction): add timeout and ensure cleanup to prevent indefinite hangs on rate limit
...
Closes #2062
2026-02-26 20:58:01 +09:00
YeonGyu-Kim
bcf7fff9b9
feat(recovery-strategy): apply compaction model override in context window recovery
2026-02-22 17:19:43 +09:00
YeonGyu-Kim
62e4e57455
feat: wire context-window-recovery callers to async SDK/HTTP variants on SQLite
...
- empty-content-recovery: isSqliteBackend() branch delegating to extracted
empty-content-recovery-sdk.ts with SDK message scanning
- message-builder: sanitizeEmptyMessagesBeforeSummarize now async with SDK path
using replaceEmptyTextPartsAsync/injectTextPartAsync
- target-token-truncation: truncateUntilTargetTokens now async with SDK path
using findToolResultsBySizeFromSDK/truncateToolResultAsync
- aggressive-truncation-strategy: passes client to truncateUntilTargetTokens
- summarize-retry-strategy: await sanitizeEmptyMessagesBeforeSummarize
- client.ts: derive Client from PluginInput['client'] instead of manual defs
- executor.test.ts: .mockReturnValue() → .mockResolvedValue() for async fns
- storage.test.ts: add await for async truncateUntilTargetTokens
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
161d6e4159
refactor(context-window-recovery): split executor and storage into focused modules
...
Extract recovery strategies and storage management:
- recovery-strategy.ts, aggressive-truncation-strategy.ts
- summarize-retry-strategy.ts, target-token-truncation.ts
- empty-content-recovery.ts, message-builder.ts
- tool-result-storage.ts, storage-paths.ts, state.ts
- client.ts, tool-part-types.ts
2026-02-08 16:22:01 +09:00