Ravi Tharuma
4e214cba4e
fix(recovery): ignore empty summary-only assistant messages
2026-03-28 08:57:36 +01:00
YeonGyu-Kim
d2c576c510
fix: resolve 25 pre-publish blockers
...
- postinstall.mjs: fix alias package detection
- migrate-legacy-plugin-entry: dedupe + regression tests
- task_system: default consistency across runtime paths
- task() contract: consistent tool behavior
- runtime model selection, tool cap, stale-task cancellation
- recovery sanitization, context-limit gating
- Ralph semantic DONE hardening, Atlas fallback persistence
- native-skill description/content, skill path traversal guard
- publish workflow: platform awaited via reusable workflow job
- release: version edits reapplied before commit/tag
- JSONC plugin migration: top-level plugin key safety
- cold-cache: user fallback models skip disconnected providers
- docs/version/release framing updates
Verified: bun test (4599 pass), tsc --noEmit clean, bun run build clean
2026-03-28 15:24:18 +09:00
ewjin
b1735d4004
fix: detect empty text parts in messages with tool calls during session recovery
2026-03-27 11:04:42 +09:00
YeonGyu-Kim
8dd3d07efd
refactor: remove unused hasIgnoredParts variables from context-window-limit-recovery
2026-02-16 22:10:44 +09:00
YeonGyu-Kim
1a6810535c
refactor: create normalizeSDKResponse helper and replace scattered patterns across 37 files
2026-02-16 18:20:19 +09:00
YeonGyu-Kim
5a6a9e9800
fix: defensive SDK response handling & parts-reader normalization
...
- Replace all response.data ?? [] with (response.data ?? response)
pattern across 14 files to handle SDK array-shaped responses
- Normalize SDK parts in parts-reader.ts by injecting sessionID/
messageID before validation (P1: SDK parts lack these fields)
- Treat unknown part types as having content in
recover-empty-content-message-sdk.ts to prevent false placeholder
injection on image/file parts
- Replace local isRecord with shared import in parts-reader.ts
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
8edf6ed96f
fix: address 5 SDK compatibility issues from Cubic round 8
...
- P1: Use compacted timestamp check instead of nonexistent truncated
field in target-token-truncation.ts
- P1: Use defensive (response.data ?? response) pattern in
hook-message-injector/injector.ts to match codebase convention
- P2: Filter by tool type in countTruncatedResultsFromSDK to avoid
counting non-tool compacted parts
- P2: Treat thinking/meta-only messages as empty in both
empty-content-recovery-sdk.ts and message-builder.ts to align
SDK path with file-based logic
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
c2012c6027
fix: address 8-domain Oracle review findings (C1, C2, M1-M4)
...
- C1: thinking-prepend unique part IDs per message (global PK collision)
- C2: recover-thinking-disabled-violation try/catch guard on SDK call
- M1: remove non-schema truncated/originalSize fields from SDK interfaces
- M2: messageHasContentFromSDK treats thinking-only messages as non-empty
- M3: syncAllTasksToTodos persists finalTodos + no-id rename dedup guard
- M4: AbortSignal.timeout(30s) on HTTP fetch calls in opencode-http-api
All 2739 tests pass, typecheck clean.
2026-02-16 16:13:40 +09:00
YeonGyu-Kim
c799584e61
fix: address Cubic round-6 P2/P3 issues
...
- P2: treat unknown part types as non-content in message-builder messageHasContentFromSDK
- P3: reuse shared isRecord from record-type-guard.ts in opencode-http-api
2026-02-16 16:13:40 +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