open-standards/jouleclaw/jouleclaw-rs/crates/jouleclaw-session
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 3b33734b63
Some checks failed
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (push) Has been cancelled
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (push) Successful in 41s
jouleclaw: compaction in the turn loop that keeps the record
record_in_budget appends a turn and, when the context then runs past
its budget, summarizes the oldest items (turns and earlier summaries)
into one summary that stands for them in the context; the session keeps
every turn. A pinned turn, the person's instruction, is never covered;
the most recent turns up to a stated size are kept as they were. A
later compaction folds an earlier summary in and marks it superseded,
so every summary the context held stays on record. Each summary's
joules count in the session's total. A fork keeps its prefix's pins
and the compactions made wholly of it, recomputing which are
superseded, so one superseded only past the fork point is live there.
A session saved before compaction existed loads unchanged.

Falsified, each turns a test red: pins summarized, summary energy
dropped, earlier summaries never superseded, a fork keeping the source's
superseded flag, and the recent tail not kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-12 04:16:14 -05:00
..
src jouleclaw: compaction in the turn loop that keeps the record 2026-11-12 04:16:14 -05:00
Cargo.toml Cargo: no minimum-supported-version floor, because the policy is latest stable 2026-11-03 17:42:20 -05:00