Skip to main content

Module compaction

Module compaction 

Source
Expand description

Bounded, provider-neutral transcript compaction for cross-harness resume.

Structs§

CompactionBudget
The two sizes a compaction is bounded by. They are different numbers with different owners: page_bytes is how much transcript the summarizer can read in one request, and handoff_bytes is how much text the target harness accepts as its first message. Sizing pages from the target’s budget is what turned one incident’s transcript into 65 requests.

Enums§

CompactionFailure
What a failed compaction request means for the rest of the compaction.

Constants§

COMPACTION_CONCURRENCY
How many summarizer requests run at once. Every page is independent, and each round of the reduction is independent within itself, so the only reason to serialize them is politeness to the provider.
DEFAULT_CONTEXT_BYTES
HANDOFF_PREAMBLE
Opening sentence of every handoff this module writes. Generation and detection share it so a later resume can always recognize its own prior handoff turns.
LEGACY_HANDOFF_PREAMBLE
Opening sentence of the byte-truncating handoff this pipeline replaced. Sessions resumed by that build still carry it in their transcripts.
MIN_CONTEXT_BYTES

Traits§

CompactionBackend

Functions§

compact_snapshot
Produce the single synthetic handoff turn sent to the target session. Short transcripts take exactly one model request. Larger inputs are summarized in bounded pages and merged in as few requests as fit.