loop_prune_test.go — three new prune tests: - ReadWriteReadCycle: pre-write read pruned, post-write read kept (primary invariant) - AssistantMessagesUnaffected: only role:"tool" messages are dropped, never assistant messages - NonExecuteCodeUnaffected: non-execute_code tool calls don't confuse the path tracker loop_cache_test.go — one new cache test: - IdenticalParallelReads: two goroutines simultaneously miss the cache, both execute, results are consistent and no panic (sync.Map race safety) cost_test.go — six computeCostUSD unit tests: - BaseTokens, ClaudeCacheReadDiscount (10%), NonClaudeCacheReadDiscount (50%), CacheCreationSurcharge (125%), AllFieldsCombined, UnknownModelZero openai_encode_test.go — four OpenRouter cache injection tests: - OpenRouterClaude_SystemCacheControl: system content encoded as array with cache_control - OpenRouterClaude_LastToolCacheControl: last tool gets cache_control:ephemeral - OpenRouterNonClaude_NoCacheControl: non-Claude model on openrouter gets no injection - OpenAI_NoCacheControl: plain openai backend never injects cache_control Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| commands.go | ||
| core.go | ||
| core_test.go | ||
| cost.go | ||
| cost_test.go | ||
| fifo_test.go | ||
| hooks.go | ||
| loop.go | ||
| loop_cache_test.go | ||
| loop_parallel_test.go | ||
| loop_prune.go | ||
| loop_prune_test.go | ||
| loop_truncate_test.go | ||
| prompt_resolver.go | ||
| session.go | ||
| state.go | ||
| types.go | ||
| waitchange_test.go | ||