1.3 KiB
1.3 KiB
Task 4 Boundary Fix Report
- Status: DONE
- Changes: Updated
.pi/agent/extensions/context-manager/src/prune.tssoisBulky()does not count the final empty split segment when content ends with a trailing newline. This keeps exactly-150-line tool output at the non-bulky boundary while preserving the existing byte and over-threshold line behavior. Added a regression test in.pi/agent/extensions/context-manager/src/prune.test.tscovering an old tool result with exactly 150 real lines plus a trailing newline. - Tests:
cd /home/alex/dotfiles/.worktrees/context-manager-extension/.pi/agent/extensions/context-manager && npx tsx --test src/packet.test.ts src/prune.test.ts→ 8 passed, 0 failedcd /home/alex/dotfiles/.worktrees/context-manager-extension/.pi/agent/extensions/context-manager && npm test→ 24 passed, 0 failed
- Files changed:
.pi/agent/extensions/context-manager/src/prune.ts.pi/agent/extensions/context-manager/src/prune.test.ts.pi/reviews/context-manager-task4-boundary-fix-report.md
- Self-review findings: The fix is narrowly scoped to line counting inside
isBulky(), keeps the public API unchanged, and preserves the existing prune-window behavior for bulky vs. non-bulky tool results outside this exact trailing-newline boundary case. - Concerns: None.