fix(cost): wire cost mode into actual enforcement (Priority 3) #65

Closed
clawdie wants to merge 1 commit from fix/cost-mode-enforcement into main

1 commit

Author SHA1 Message Date
214e845bdd fix(cost): wire cost mode into actual enforcement (Priority 3)
Some checks failed
CI / markdown (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
- session.rs: per-append compaction now derives thresholds from COLIBRI_COST_MODE
- session.rs: compact_tool_result() called on oversized tool results during append
- session.rs: build_prompt_assembly() now calls trim_to_budget()
- daemon.rs: session_rotation() logs escalation recommendation on insufficient compaction
- config.rs: COLIBRI_SESSION_MAX_BYTES / COLIBRI_MAX_UNCOMPACTED_TURNS deprecated
- socket.rs: updated set-cost-mode comment for accuracy

All four previously-untested functions now wired into production paths.
Escalation trigger fires, compaction runs, tool results trimmed, prompt budgeted.
2026-06-14 14:16:41 +02:00