-
由 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:Claude Opus 4.6 <noreply@anthropic.com>