fix(anthropic-context-window-limit-recovery): remove emergency fallback message revert logic

Remove the FallbackState interface and related fallback recovery mechanism that deleted message pairs when all other compaction attempts failed. This simplifies the recovery strategy by eliminating the last-resort fallback approach.

Changes:
- Removed FallbackState interface and FALLBACK_CONFIG from types.ts
- Removed fallbackStateBySession from AutoCompactState
- Removed getOrCreateFallbackState and getLastMessagePair functions
- Removed emergency revert block that deleted user+assistant message pairs
- Updated clearSessionState and timeout reset logic
- Removed related test cases

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-31 12:31:24 +09:00
parent dea17dc3ba
commit d49c221cb1
7 changed files with 183 additions and 186 deletions
+21
View File
@@ -31,6 +31,27 @@ describe("session-manager tools", () => {
expect(typeof result).toBe("string")
})
test("session_list filters by project_path", async () => {
// #given
const projectPath = "/Users/yeongyu/local-workspaces/oh-my-opencode"
// #when
const result = await session_list.execute({ project_path: projectPath }, mockContext)
// #then
expect(typeof result).toBe("string")
})
test("session_list uses process.cwd() as default project_path", async () => {
// #given - no project_path provided
// #when
const result = await session_list.execute({}, mockContext)
// #then - should not throw and return string (uses process.cwd() internally)
expect(typeof result).toBe("string")
})
test("session_read handles non-existent session", async () => {
const result = await session_read.execute({ session_id: "ses_nonexistent" }, mockContext)