fix: 确认 #11 LRU 缓存键已完整实现,添加 FileStateCache 测试 + 修复类型错误

审计确认 #11 FileStateCache 已完整实现(LRU 双重限制 max+maxSize +
sizeCalculation),归类从"未实现"修正为"已确认完整"。
- 添加 16 个 FileStateCache 测试覆盖 LRU 驱逐、大小计算、路径归一化
- 添加 6 个 coerceToolContentToString 测试覆盖类型强制转换
- 修复 replBridgePermissionHandlers 测试的类型断言错误

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-28 23:43:31 +08:00
parent 8d67b2250c
commit 1aed59203d
3 changed files with 149 additions and 4 deletions

View File

@@ -60,7 +60,7 @@ describe('pendingPermissionHandlers cleanup pattern', () => {
map.onResponse('req-1', (resp) => { received = resp })
const dispatched = map.handleResponse('req-1', { approved: true })
expect(dispatched).toBe(true)
expect(received).toEqual({ approved: true })
expect(received as unknown as { approved: boolean }).toEqual({ approved: true })
expect(map.size()).toBe(0)
})