Commit 65c8450
committed
test(preemptive-compaction): add unit tests for smart compaction hook
- Add tests for compaction-logger utility (path verification)
- Add comprehensive tests for preemptive-compaction hook:
- Disabled state behavior
- Model filtering (Claude only)
- Threshold checking
- Cooldown mechanism
- Multi-phase flow (DCP + truncation + summarize)
- Custom threshold and model limit callbacks
- onBeforeSummarize callback1 parent 3ee71e4 commit 65c8450
File tree
2 files changed
+551
-0
lines changed- src/hooks/preemptive-compaction
2 files changed
+551
-0
lines changedLines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments