1.9 KiB
1.9 KiB
Context Manager Task 6 Mode Fix Report
- Status: DONE
- Changes:
- Updated
.pi/agent/extensions/context-manager/src/commands.tsso a successful/ctx-modeimmediately appends a serializedcontext-manager.snapshotentry afterruntime.setMode(...). - Kept the public command contract stable: the command name is unchanged, the invalid-usage warning string is unchanged, and the existing
turn_endsnapshot persistence path is still active. - Added an integration-style regression test in
.pi/agent/extensions/context-manager/src/extension.test.tsthat starts from abalancedsnapshot, runs/ctx-mode aggressive, and verifies the branch immediately persists a new snapshot withmode: "aggressive"before anyturn_end. - Updated the existing
/ctx-mode+turn_endtest to assert both snapshots: the immediate command-path snapshot and the laterturn_endsnapshot with refreshed token pressure data.
- Updated
- Tests:
cd /home/alex/dotfiles/.worktrees/context-manager-extension/.pi/agent/extensions/context-manager && npx tsx --test src/extension.test.ts→ 5 passed, 0 failedcd /home/alex/dotfiles/.worktrees/context-manager-extension/.pi/agent/extensions/context-manager && npm test→ 40 passed, 0 failed
- Files changed:
.pi/agent/extensions/context-manager/src/commands.ts.pi/agent/extensions/context-manager/src/extension.test.ts.pi/reviews/context-manager-task6-mode-fix-report.md
- Self-review findings:
- The fix is narrowly scoped to the
/ctx-modesuccess path and reuses the existing snapshot serializer and append-entry persistence mechanism. - The regression coverage exercises the actual command path instead of only verifying later
turn_endbehavior. turn_endpersistence remains intact and now appends a fresh follow-up snapshot with updated token usage, which is explicitly covered by the adjusted integration test.
- The fix is narrowly scoped to the
- Concerns: None.