Expand description
Resident context as paged memory (PSP-10 Definition 6, system 24).
The conversation projection is the backing store, not the prompt. Pages
are immutable and content-addressed; the mandatory dependency closure is
pinned; optional synopsis frames are chosen by deterministic greedy
weighted coverage (submodular, so greedy earns the 1 - 1/e factor on
the declared labels — a claim about labels, never about sufficiency).
An infeasible mandatory closure makes no model call.
Structs§
- Context
Budget - Definition 6’s reserves over one route’s context window.
- Context
Page - One immutable, content-addressed context page.
- Dependency
Env - The live state pages are validated against.
- Resident
Context - The resident pages of one request, in their ledgered order.
Enums§
- Resident
Outcome - The assembled resident set for one model request, or the recorded refusal when the mandatory closure cannot fit.
- State
Dependency - The explicit state a page depends on. The assembler checks it against the current branch before making the page resident; a state change invalidates the page, it never silently rewrites it.
Functions§
- assemble_
resident - Assemble the resident context per Definition 6.
- mandatory_
closure - Compute the mandatory dependency closure over
pagesstarting from themandatoryids, followingdepends_ontransitively. Order: the input page order, restricted to closure members (deterministic). - resident_
page_ digest - The canonical digest over a resident page-id sequence — the single rule shared by assembly and any post-assembly refit, so a fitted set and an assembled set with the same pages carry the same digest.
- select_
working_ set - Deterministic greedy weighted-coverage selection of at most
slotssynopsis frames. Ties break by page id (the content hash), so identical inputs select identically.