Add loop detector, budgets, and live session control
Milestone 8: the loop detector alerts when test failures repeat, budget caps limit context/cost/wall-time per session with compaction support, and live control lets you interrupt, message, or kill a running session from the TUI. Decisions can now be vetoed, which sends hx/message and rewinds the session to code. All 82 tests pass. - src/budget.rs: pure functions for active time, budgets and loop detect - src/runner.rs: Ctl control object polls for commands ~100ms, handles interrupt/message/abort/stop at every blocking point, re-runs on hints, and compacts when context is high - src/db.rs: commands table for TUI→runner control - src/detail.rs, src/goal.rs, src/tui/: loop detector box, budget caps, session keys (i/m/s/k/r), goal keys (v for veto), state forcing - tests/fake_acp_hx.py: slow mode and hx/message, hx/compact log - examples/machines/task.toml: [budget] with wall_secs, cost, compact_at Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7bf0986640
commit
bf609c2e0e
16 files changed
+1694
-55
No files matched your search
@@ -283,6 +283,9 @@ fn sessions_box(f: &mut Frame, area: Rect, o: &Overview, sel: usize) {
|
||||
if !r.retry.is_empty() {
|
||||
m2.push(Span::styled(format!(" {}", r.retry), fg(theme::ERR)));
|
||||
}
|
||||
if r.looping {
|
||||
m2.push(Span::styled(" · looping", bold(theme::WAIT)));
|
||||
}
|
||||
cell(&mut l2, m2, w_machine);
|
||||
let bg = if on {
|
||||
Style::new().bg(theme::SEL)
|
||||
|
||||
Reference in new issue
Block a user