• Will Chen's avatar
    fix: add missing createdAt to mid-turn compaction test messages (#2624) · ceb61118
    Will Chen 提交于
    ## Summary
    - Two mid-turn compaction tests in `local_agent_handler.test.ts` were
    failing because mock messages lacked `createdAt` fields
    - `buildChatMessageHistory` and `getMidTurnCompactionSummaryIds` call
    `createdAt.getTime()` to detect mid-turn compaction summaries, causing a
    silent TypeError inside the async generator
    - Added `createdAt` timestamps to all mock messages and compaction
    summary messages in both tests
    
    ## Test plan
    - [x] `npm test` passes (786/786 tests)
    - [x] Both previously-failing mid-turn compaction tests now pass
    - [x] Lint, formatting, and type checks all pass
    
    #skip-bugbot
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    <!-- devin-review-badge-begin -->
    
    ---
    
    <a href="https://app.devin.ai/review/dyad-sh/dyad/pull/2624"
    target="_blank">
      <picture>
    <source media="(prefers-color-scheme: dark)"
    srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1">
    <img
    src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1"
    alt="Open with Devin">
      </picture>
    </a>
    <!-- devin-review-badge-end -->
    
    
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Fix failing mid-turn compaction tests by adding createdAt timestamps to
    mocked chat and summary messages. This prevents a silent TypeError in
    the async generator and restores test reliability.
    
    - **Bug Fixes**
    - Added createdAt to all test messages (including compaction summaries)
    so buildChatMessageHistory and getMidTurnCompactionSummaryIds can safely
    call createdAt.getTime().
    - Documented the createdAt requirement for compaction tests in
    AGENTS.md.
    
    <sup>Written for commit c8f0acb09058c5e3313f1423c585857ea61416f4.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    
    ---------
    Co-authored-by: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
    ceb61118
名称
最后提交
最后更新
..
__tests__ 正在载入提交数据...
app 正在载入提交数据...
atoms 正在载入提交数据...
client_logic 正在载入提交数据...
components 正在载入提交数据...
constants 正在载入提交数据...
contexts 正在载入提交数据...
db 正在载入提交数据...
hooks 正在载入提交数据...
i18n 正在载入提交数据...
ipc 正在载入提交数据...
lib 正在载入提交数据...
main 正在载入提交数据...
neon_admin 正在载入提交数据...
pages 正在载入提交数据...
paths 正在载入提交数据...
pro 正在载入提交数据...
prompts 正在载入提交数据...
routes 正在载入提交数据...
shared 正在载入提交数据...
store 正在载入提交数据...
styles 正在载入提交数据...
supabase_admin 正在载入提交数据...
utils 正在载入提交数据...
backup_manager.ts 正在载入提交数据...
main.ts 正在载入提交数据...
preload.ts 正在载入提交数据...
renderer.tsx 正在载入提交数据...
router.ts 正在载入提交数据...