Repository navigation
ONE-ACT stage 1/6: a work command's precondition decides both her surface and execution (draft for CI) - #5782
Merged
Merged
Conversation
joelteply
force-pushed
the
fable/state-driven-surface
branch
from
November 5, 2026 01:23
7cae292 to
3800229
Compare
…cumulated CPU time, never only a queued /slots (#5772) * engine: busy is not dead - a page switch reads the engine process's CPU, not only /slots A page switch judged engine progress only through /slots, which llama-server answers as a task on its main loop: during one long CPU batch it cannot answer, so a working engine read as stopped -> Uncertain -> quarantine -> replacement, dropping every resident's KV (IntelMac 2026-11-04 16:24:20Z: replaced while its main thread was in update_slots -> decode; every resident then cold-prefilled 24-32k tokens at 20-28 tok/s). - kernel process_tree: CpuWatch / CpuSample, a one-process CPU read through the same sysinfo usage, fenced by pid AND start time (shared same_process with still_present; a reused pid or an exited process is Gone). - turn_admission/page_liveness.rs (moved out of turn_admission.rs with the quiet wait and the receipt wait): PageLiveness folds each /slots probe with the engine process's CPU. Gone -> Stopped at once; CPU spent while /slots is silent -> "processing, unmoved", bounded by the measured unmoved window; CPU flat while silent -> Stopped. HTTP stays the richer signal. - CPU moving without a receipt past that window is PageOutcome::Unresolved: the engine is not replaced on that alone (requires_replacement only for Uncertain), the endpoint retains the in-flight request until its receipt arrives, and the page is held as an uncertain switch leaves it (not resident; a save's page not restorable). - EngineProbe::Stopped ends a wait at once, initial probe included. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * host+kernel: busy is read from ACCUMULATED CPU time, never a usage percentage Window 45 on the M5: CpuWatch read sysinfo's per-process cpu_usage, which on macOS needs the system-wide CPU refreshed with it and read 0 for a spinning process, so every busy engine would have read CPU-flat (stopped) on the IntelMac. - continuum-host process_usage: cpu_time(pid) -> Option<Duration>, the accumulated user + system counter. Logic once in mod.rs; adapters hold only the call: macOS proc_pid_rusage (rusage_info_v4 ri_user_time + ri_system_time, Mach units via mach_timebase_info), Linux /proc/<pid>/stat utime + stime over sysconf(_SC_CLK_TCK), elsewhere None (unknown). - kernel process_tree: cpu_time(identity) -> CpuTime { Used, Unreadable, Gone }, read first and fenced after by pid + start time + zombie (still_present); CpuWatch keeps the last reading and samples CpuSample::Alive { spent: Option<Duration> } | Gone. - page_liveness: busy = the counter advanced (spent > 0); flat = zero; probes carry engine_cpu_ms; Receipt::Unresolved carries cpu_spent. - kernel test asserts the counter advanced after a spin; pid-reuse and reaped-child cases kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: an unresolved page switch holds its slot's custody until the engine answers Codex on #5772 (CHANGES at b20008e): Unresolved kept only the HTTP future. The turn's error dropped its TurnAdmission, releasing the lane permit, slot permit, pin and endpoint reader, so a later turn could reuse the slot while the old restore was still queued in the engine (a late restore then overwrites another activity's KV), and a lifecycle transition no longer waited. Codified in the type: - PageOutcome::Unresolved(UnresolvedPage): the in-flight request, #[must_use], consumable only by UnresolvedPage::hold(custody), which moves the custody into the endpoint's paging task beside the request. Released only by the receipt, a stopped engine process (gone or no CPU, fenced by pid + start time; quarantines first) or a condemnation (the replacement's kill is the fence). - TurnAdmission::page_action consumes the admission: a terminal receipt hands it back, an unresolved switch holds it (the mind gate is let go: the mind is not the slot), so the compiler forbids reusing the slot while it lives and a transition's writer waits on its reader. The lifecycle checkpoint (already inside the writer) holds (). - Test through the real admission on a one-slot fake engine: the restore goes unresolved, a same-slot turn and then an engine transition are attempted before the receipt; neither gets in until the engine answers, and the receipt frees the slot and every lane. - turn_admission.rs 1,000 -> 946: the save-size quote moved whole to turn_admission/page_quote.rs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: until_condemned_on is re-exported for the unresolved page's custody, not only tests Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: an unresolved switch lets its slot go only on a verified receipt, a quarantine or a condemnation Codex's follow-up on #5772 (two holes at 279366b): 1. The held custody read any late reply as a receipt: a transport error became Receipt(0), the body was ignored, and the slot was let go without quarantine. A socket closed under the request, or a body cut mid-way, is not proof the engine ended the switch. - turn_admission/page_receipt.rs: terminal_receipt(), the ONE judge of a switch's reply, extracted from the bounded wait and called by both it and the late path. - Released { Verified(Terminal), Fenced(Quarantined), Condemned }: Quarantined is made only by quarantining the endpoint, so a release without a verified receipt cannot be written without quarantining first. 2. The lifecycle checkpoint's unresolved.hold(()) held nothing durable, and its error alone does not prove the engine retired: the checkpoint's save now stays pending, so its drop quarantines the endpoint as the writer lets go. Tests (the existing fake-engine harness, now with a /slots that never answers): a late reply cut mid-body quarantines the endpoint and no same-slot turn gets in; an unresolved checkpoint leaves the endpoint quarantined. lifecycle::boot is shared (pub(super)) rather than copied. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine test: the cut-reply test waits on the fake engine's own events, not virtual timeouts Window 49 on the M5: a_reply_cut_mid_body_quarantines_before_the_slot_is_let_go read landed == 0. Under a paused clock tokio auto-advances virtual time whenever no task is ready, which runs ahead of real socket IO, and nothing in this test waited for the restore's bytes to reach the fake engine: the virtual 120 s windows could expire, and the assertion run, before the POST arrived (the first custody test only passed because it waits for an admission that needs the real reply). The fake engine now signals `entered` and `cut`; the test waits on them, and on the custody's quarantine, bounded in real time (the socket's clock). It also checks, as the first custody test does, that the restore is unresolved (lane held, not quarantined) before the cut. Assertions kept: no same-slot turn is admitted; the endpoint is quarantined. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine test: the custody tests run on the real clock, each on its own fake engine Window 50 on the M5: an_unresolved_switch_holds_its_slot_until_the_engine_answers (green in windows 48 and 49) failed "the held custody keeps its lane", after window 49 had failed the cut-reply test on its engine counter. Both ran on a PAUSED clock against real sockets: tokio auto-advances virtual time whenever no task is ready, which runs ahead of the IO the fake engine and the paged request depend on, so where a restore was when its bounded wait ended (sent or not, probes answered or timed out) depended on scheduling, and the outcome with it. The lane semaphore is each test's own (admit_turn takes it as an argument), the fakes are per test on their own ports, the CPU seam is keyed by root, and nothing in the binary condemns the process-wide watch, so no shared global was involved. Now: - #[tokio::test] on the real clock for all three custody tests. - The fake's /slots answers at once with one slot processing and no counter moving, so the switch's measured unmoved window ends its wait one checkpoint (~10 s) after it starts: the outcome no longer depends on how probe timeouts race the request. (A silent /slots is tests/page_liveness.rs's subject.) - "Nothing gets in" checks are 3 s real windows; releases have 30 s to arrive. Every reviewed assertion is kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: a page switch reads its engine's condemnation from its liveness; fixtures are never condemned CI on #5772 at d818d99 (1436 passed, both custody tests failed "the held custody keeps its lane, left: 2", as on M5 window 50). Not ownership: the lane permit is inside the admission that moves into the custody (admit acquires it, turn_admission.rs:319, stores it in TurnAdmission::_permit at :345; retain_paging moves the admission into its operation, paging_lifetime.rs:66; page_action takes `mut self`, :113-114, and hands it to UnresolvedPage::hold, :135; the custody drops it only at unresolved_page.rs:142). The switch never went unresolved: the engine-crate tests share the process-wide condemnation watch. late_ready.rs's tests launch through launch_prepared, whose drain on a fresh endpoint condemns (engine_generation.rs:230, incumbent and generation both None), and only the serving daemon's ready snapshot (continuum-serving publication.rs) recovers it, so after them every restore_probe/engine_probe in the binary read Condemned: the bounded wait ended Stopped, the switch Uncertain, its admission (and lane) dropped and the endpoint quarantined. - PageLiveness carries its engine's Condemnation: Daemon (the process-wide watch) in production, Never for a fixture engine registered with watch_for_test, which no daemon serves. PageLiveness::probe reads it first and does not ask a condemned engine at all. - The page switch's probes read no condemnation themselves: slots_probe (engine_probe without the check; engine_probe keeps it for its other caller) and restore_probe (its one caller). - The held custody subscribes to and checks the same Condemnation. - PageLiveness::new takes the Condemnation; the unit tests pass Never. No #[derive(TS)] type is touched on this branch (diff against canary's merge base). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: the page-liveness fixture seam is gated to this crate's own tests (only they call it), so a test-fixtures build has no dead code Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…ped refusals (#5775) * work/submit + work/review: ids she was shown parse as airc Shown<T> Benchy on the M5 (2026-11-04 17:51:56Z): persona.act.refused command="work/submit" reason=... CommandRequest deserialization failed: UUID parsing failed: invalid length: expected length 32 for simple f... The verbs' submission_id (submit) and review_id / submission_id / review_claim_id (review) were raw Uuid, so the short id every surface shows died in serde before any handler could resolve it. These fields, plus submit's claim_id and review's card_id (both Option<String> through the String-error id_resolve path), now decode as airc_core::shown_id::Shown<T> (SubmissionId, WorkReviewId, ClaimId, WorkCardId) and resolve with Shown::resolve against what the verb already read: the card's own submissions (one helper, submission_named, for both verbs), its claim, the submission's reviews, the room's cards. A full id passes through; a shared prefix is ShownIdError::Ambiguous naming both; junk is refused at decode with the sentence naming the accepted form. Params become Deserialize-only (Shown is read, never re-rendered); TS bindings and schemas are unchanged in type. Tests: submission/tests.rs pins the receipt (short id on submit and review, full id, typed ambiguity, decode refusal names the form); training_credit fixtures build Shown ids from full ids. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work ids: no runtime 'id is required' complaint; tool docs back to canary length required_input_complaints: resolve_shown's empty-string branch is gone. Every caller's field is a non-optional String, and resolve_handle already refuses a blank (or any non-handle) naming the accepted form. prompt_shaping surface ceiling (17487 > 17486): the param doc text this branch added is reverted to canary's wording, so the schema she reads every act does not grow; the accepted form is named by the refusal itself. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * protocol: regenerated WorkSubmitParams/WorkReviewParams bindings (ts-rs, M5 window 51) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work ids: submit claim_id and review card_id back on canary's id_resolve path Cormac's CHANGES on #5775 at 79e9dec: these two were Strings through id_resolve and should not move to Shown until card 484b000b adds the 8-hex-group form there. Both fields and their handler lines are restored byte-for-byte to canary (String + resolve_shown). Shown stays only on the fields that were raw Uuid: submit submission_id, review review_id / submission_id / review_claim_id. Note for 484b000b: canary's path for these two is resolve_handle (strict), not the repairing id_resolve::resolve, so a one-char-corrupted full claim id was already refused on canary. The new test pins full + shown resolving and the corrupted form refused, naming the card that flips it. The params' struct doc became a plain comment so ts-rs and schemars emit nothing for it (bindings back to canary's bytes, no tool-surface growth). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…s in hand, her held work as keyed items Residents learned the work protocol by trial because the substrate knew their card state and hid it (the M5, 2026-11-04: Benchy on review card 32d53734 called commands/help 4 times and work/submit 5 times with work/review off her surface; Atlas called work/list 6 times to find where he stood). Plan goal 10 keyed by state, order-of-work line 2. - continuum-rooms card_moves: the board's transition table airc-work lacks. Pure, exhaustive moves_in(CardRole, CardState), held_moves(card, holder), Held. Each move's name is pinned to the registered command's NAME. - Tool surface: the room's declared set (or her core hands) UNION the moves her held cards give her, in canonical order and priced in her claim; ToolsEpoch re-selects only when those moves change (delib.tools.epoch_moves_changed). - Her held work is read once per tick (extensions::held_work, persona::held_work) and carried typed on the Workspace. A native continuum-context Source renders one item per held card keyed by the card, its occurrence (card, state), with "you can: <moves>"; ended and rejected claims are their own items. - Deleted: ActiveWorkSource (RagSource) and its registration, faculty_ids::ACTIVE_WORK and the two predicates that grepped [InProgress] from rendered text (now typed reads), and the active-work special cases in the legacy enrichment walk. AircWorkReader moved to persona::held_work. - docs/architecture/STATE-DRIVEN-SURFACE.md: failure class, five pieces and owners, the table, ratchets, receipts owed. Not compiled (written with serving up); cargo check and tests are owed on a non-serving executor. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… empty list Cormac's review of bf114fa. The table becomes data over (role, state, stance): moves_in(CardRole, CardState, Stance) -> Moves, with Moves::Some(MoveSet) | Moves::None(NoMove). MoveSet is non-empty by construction, so a refusal always carries moves or a typed reason (NoMove::Held { by }, NoMove::Ended(state)). That is the shape his refusal ratchet reads. moves_for(card, actor) reads the stance from the owner. Non-holder rows: Open -> work/claim, unowned working card -> work/claim, another's -> Held { by }, Review not hers and Merged/Closed -> Ended. held_moves is gone: Held reads moves_for, one table and no copy. One test per row, the non-holder rows included. The code/** move is pinned to a registered code/ command (code/run), so the subtree cannot match nothing. A held item with no moves renders its typed reason. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ides execution and the surface Codex's four corrections and the seam he named (Cormac concurring): - Removed the separate move table (card_moves). continuum-rooms work_preconditions holds each verb's PRECONDITION, a pure typed predicate over (card, actor, request). The handlers call it at the mutation boundary against the card as the board holds it now (decide -> Refusal with the refreshed card and her moves now). The surface, her held-work item and a refusal's next moves call it in the any-arguments form. Decisions read the time they are given, never the wall clock. - Checks moved out of the handlers: submit's holder/not-claimed checks and holder_guard (deleted); review's not-a-review-card / held-by-another / named-parent checks; state's open-by-holder refusal and review resume (resumes_held_review moved); claim's holder rule (live_holder -> holder_on_record, matching the projection's on-record rule). work/claim checks claim before publishing; an unowned InProgress card is claimable, proven through the real projection. - work/submit is allowed in Review. An identical submission (same publisher, patch hash, base, instance) answers as success, outcome AlreadySubmitted, naming the existing one; a changed patch submits. - A reviewer holding a satisfied review precondition gets code/** and work/submission (WorkVerb::grants), whatever the room declares. - Held-card occurrence = card + state entry (the board revision at the first read in that state) + rendered content. Heartbeats append nothing; a same-state refusal or a selection switch appends once; a re-entry is a fresh occurrence. Tested through the real View. ts-rs bindings for SubmitOutcome and WorkSubmitResult were hand-edited and must be regenerated. Not compiled (serving up). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…jection fact per card - continuum-rooms work_preconditions: `Unmet` derived Hash over airc's CardState, which has none (E0277 at work_preconditions.rs:127/129, the one compile error behind every crate's lib tests). Nothing hashes Unmet; the derive is dropped. - work/review after the rebase onto #5775: her stated review claim resolves through Shown<ClaimId> against the review card's claim, then the precondition decides; the named submission resolves through submission_named against the parent the precondition returned. - AircCitizen::claim_card (trait default, stub and runtime impls) had no caller; deleted with its text match on "[denied]" (error_text_matches ratchet) and the stub's `claimed` recorder. - claim_rejections: the per-persona count cap becomes one fact per card (newest), bounded by the cards she tried inside the TTL; how many cards' facts she sees is her view's budget, each a keyed held-work item (self_sized ratchet). - epoch test: the source order now includes held-work beside the settled blocks, as epoch.rs places it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…lf_sized sites and the receipts Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
force-pushed
the
fable/state-driven-surface
branch
from
November 5, 2026 01:34
3800229 to
291ed2d
Compare
…er line
- work/list: WORK_LIST_DEFAULT_LIMIT is deleted. Every match is listed unless she passes `limit`;
how much of a big board she sees is her act's one allocation (the newest result's level, saved
with its handle).
- spill::result_text: an object with no string field went on as ONE compact line whatever its size
(`else { return compact }`), so a board without a `note` was the 198k-char line again. The size
threshold PRETTY_JSON_OVER_CHARS becomes a shape rule (`structured_lines`): a value holding
records goes on one field and one compact record per line, still the same JSON; scalars-only
stays one line.
- Test: a board larger than the window shows its first card whole, a middle card behind the
handle, and the counts after the list.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…e content hash's address; the tail fits the read - spill.rs: every saved result goes through the `tool-output` disk class's writer (ClassWriter::of, owned_by(persona)): publish_new for the immutable content address, and the existing owner's new fence_existing for a reused one. The two direct OpenOptions writes are gone, and so is spill_root's hand-built ~/.continuum path: the class row (standard_tracked_dirs, kept under the continuum home) is the one source, and its eviction owner is the tool-output-spill pool (eviction_decisions). - The handle is ContentHash::address (continuum-context), the hash's leading 64 bits as 16 hex digits: the same form every saved handle already has, so checkpoints still resolve; no slice. - result_scalars reads the header at its two named places (the opening line, or the line after a stored head's pointer), never a count of lines. - DEFAULT_TAIL_LINES is gone: a read with neither pattern nor range shows the newest lines whose rows fit its own budget, measured in the count pass (TailFit), so the tail grows with the budget, always ends at the last line, and is never truncated. - continuum-host: the held-directory publish and re-fence honour the injected fence failure like the path forms, so the #5036 regression test still proves a visible-but-unfenced object is not reused. - Tests: the store's tests inject the class; a saved result reopens by its handle byte-identical (and the handle keeps its form); the tail follows the budget. Six tests that saved through the production path wrote into the real ~/.continuum; they now prepare the kernel's writer fixture (spill::prepare_store_fixture). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…r view carries both - work_burst: the card lines are gone (each held card is its own held-work item with what she can do on it), and so is the `[progress]` receipt list with PROGRESS_READ_KEEP, PROGRESS_RAN_KEEP and the 72-char object cut: her actions source holds every act's record across turns and restarts (working_memory::tests::action_log::a_restart_keeps_every_act_as_she_read_it) and her open views which lines of each file she read, each a keyed item her one allocation sizes. Deleted, not moved: a second rendering of what her view already holds. - The stimulus keeps the fixed instructions, her last thoughts and the checkpoint line, so credit and gene selection read the same text (gene selection reads its last unbracketed line, the instructions, so the card lines never fed it). - act_question: the progress fold is gone; the card's id in the thought scope renders through shown_form, never a slice. - Tests: the work turn never drops her newest entry (her newest thought whole and last, the checkpoint after it); the stimulus points at [my work] and lists no card; the progress test goes with the receipts. - Still owed (STATE-DRIVEN-SURFACE.md, receipts): her last thoughts are paged off the room store because her thoughts share working memory's capacity-bounded entries ring; WORK_GATE_PAGE_ROWS and the older-thought head cut stay until thoughts become a log like her actions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…, never a page of room rows - working_memory::thought_log: one record per thought (occurrence, text, time), kept whole and checkpointed in VolatileSnapshot.thoughts like her action log. `record` writes the log, never the capacity-bounded entries ring, so a turn of many acts and a restart both keep every thought (an older checkpoint's ring thoughts move into the log on restore). Her thoughts count in her resident bytes as pinned charge. The ring keeps receipts, facts and settlements. - context_streams::thoughts reads the whole log with her settlements, in her memory's one order: her newest thought whole, the older ones at the level her one allocation affords, collapsed only at an epoch start. - act_question: the room-page read is gone with WORK_GATE_PAGE_ROWS, the 4/400 keep-count and length and the card-scoped resume block; the write-less count reads her action log from the hold boundary (WorkingMemory::operations_since). work_burst: own_recent_thoughts_about and its older-thought head cut are deleted; the stimulus is the fixed instructions and the checkpoint, which credit and gene selection read. - Tests: a_restart_keeps_every_act_as_she_read_it now also keeps her thoughts across a twelve-act turn on an eight-entry ring and a restart, under their occurrences; the legacy snapshot test moves a ring thought into the log; her newest thought is whole and the allocation levels the older ones (context_streams); the ring/log contract and the write-less count over her calls. The resume-block tests go with the block. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… drift CI on a21efc4 ("lib tests continuum-context"): the replay example failed to compile, E0308 at examples/replay/acts/layers.rs:89, `[(&str, Layer); 23]` holding 24 tags. This branch added the `[my work]` tag beside `[active-work]` without the count. The tags are a `&[(&str, Layer)]` now: the list is its own length. Local runs had built `--lib` only; the example builds and its 21 tests pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
marked this pull request as ready for review
November 5, 2026 05:41
… takeover, one sequence
1. Tail read: when not even the newest line fits the budget, the read says so (truncated, the
line's byteOffset, a header naming it) instead of a complete-looking "last 0 lines". The newest
line would also exceed the scan allowance, so it is never selected; she reads on by bytes.
2. Thoughts shed like results: ThoughtRecord takes the action record's shape (body while resident,
summary built once, handle, measured length). One `Resident` trait and one shed verb
(`evict_resident_results_over`) move both kinds by a typed `RecordId`; ActionLog's own
evictable/collapse_over are deleted. The memory owner saves her unsaved thoughts at shed time
(never the act that thought them), outside her lock; thought handles are live and protected in
the checkpoint; a shed thought is loaded whole through its handle, byte-identical.
3. work/state: one decision. `state` routes another's held card as `Takeover { from }`, and
`check(State)` offers the verb exactly when some requested state routes. Execution takes the
card over through airc's claim (ClaimReleased { taken_over_from } by her, then her claim) before
the column moves.
4. One sequence: WmEntry::occurrence is checkpointed; a restore keeps every occurrence (thoughts and
entries), so her chain reads in the same order under the same keys.
5. The write-less count reads her action log for the turn's room since the board's claim decision
time (durable across a reboot), reset by an act whose commands declare `ToolEffect::Changes`.
The display-label split, the verb-name lists and the in-process hold-boundary map are deleted;
an unknown hold start shows no checkpoint (None), never a count of zero.
6. A staging file (`durable::is_staging_name`) written in this life is protected from the pool's
eviction (a save in flight); one older than this life's first save is a leftover and evicted.
7. A list of scalars goes on one element per line too, so a level keeps whole paths.
Tests in the existing mods for each; the restore-order test, the shed-thought test, the takeover
agreement test, the write-less count test, the staging test and the one-line-log test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ecided by the one precondition
Anyone may take any card at any time; the takeover is attributed (Joel, 2026-10-06: default to more
agency, pull back only on a demonstrated problem).
- work_preconditions::claim returns a typed ClaimRoute: Fresh, Resume, or Takeover { from } for a
card whose claim is another's (live or on record). Settled states still refuse. check(Claim),
and so her surface and a refusal's next moves, offer it exactly as it executes; work/state's
claimed/in_progress go through the same claim.
- work/claim executes it through airc's claim, which already records ClaimReleased
{ taken_over_from } by her and then her claim; the previous holder learns of it from that
release. The contention refusal path is deleted: ClaimRefusal::HeldByPeer, the "held by peer"
message, and the Denied class for it.
- Tests: a non-holder's claim on a held card is a takeover naming the holder, offered by the
surface, and the events airc publishes for it land under the new owner through the real
projection; the claim rules and the refusal classification updated to the rule.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
added a commit
that referenced
this pull request
Nov 5, 2026
… reads by region, measured token density) (#5779) * working_set: an overflow bound is measured, never residency (revert #5773's wish raise) ONE-ACT slice 2 part A (stage 3). #5773 raised her wish AND her residency need to a censored overflow bound; the grant read the bound `within` one sequence, so one mind took the pool (the M5, 2026-11-04 20:15-20:35Z: 125,696 -> {Aiko: 114,592}, three residents dark 20 min). An overflow is first reducible: the view collapses older items to handles. - held_need: `resident_need` (new): the exact held median raised to the irreducible floor, bounds excluded; `need_tokens` stays the typed measurement (Observed / NeedSample, max-with-bound) and says it never authorizes residency. Shared ring split and median helpers. - requirements_for: wish = her measured requirement, unraised; need = resident_need, Exact. - Observed::transpose: its only caller is gone, deleted. - Test: the 114,592 bound is still measured as AtLeast, residency reads 30,000, no wish raise, no bound reaches the grant (replaces the test that asserted the raise). Follow-up (Codex, stage 4): the bound's consumer is admission's typed growth decision; with no AtLeast reaching LaneRequirement from cognition, Observed::within's bound branch is reachable only from tests and is admission's to keep or delete. No GrowthRequest type added: irreducible growth is today the floor, already exact, and its admission policy is stage 4's. Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * view: a read returns her selection; the newest result is whole or a summary, never a bare pointer ONE-ACT slice 2 part C (stage 2; HER-TOOLS §Answer: the view is the only sizer). - act_observe/page_budget.rs deleted: an unranged read no longer gets `headroom / reads` (a division by a count) stamped on its dispatched copy. Her calls run as she made them. - continuum-hands: PageBudget (file_engine/page.rs), CodeReadParams.page_budget and its answer path deleted; code/read's description says a read without a range returns the whole file. - WorkingMemory::view_headroom deleted (its only caller was the page budget). - prompt/newest_result.rs: Level::Pointer deleted. A newest result over her window goes down its mipmap chain: operation_level's summary, then each coarser `levels::summarize(Shape::Output)` of it (each at most a quarter of the one above), with the note and handle; a chain that ends over the room keeps its coarsest level and the turn is refused for capacity, never sent emptied (goal 7). Probe gains `depth`. - continuum-context levels: Output's ends fall back to head/tail by characters when no line is a keepable unit (one compact JSON line), so such a result has a level at all. Tests: levels `a_single_line_output_keeps_its_ends_by_characters`; prompt_shaping `a_result_whose_summary_is_still_over_her_window_comes_in_coarser_never_a_pointer` (423k-char build log at a 30,000 window: content from both ends, handle, below the first summary, no capacity error). Not in this commit (part B, design note): older reconstructible items already go to a level at a turnover (View::turn_over); the per-act prompt-token measurement over a recorded coding sequence needs the one allocation as a continuum-context policy (part B) to drive recorded items, so it lands with B. The replay example's `--paged-reads` variant still models the deleted page budget as a counterfactual; staged_evidence_page.rs's comment names card 441af5ec's now-void plan. Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * prompt: the fit prices at her measured density's bound, both ways, never only the bytes/3 guard ONE-ACT slice 2 part D. On the M5 (2026-11-04, `delib.prompt.density`, n=131) the bytes/3 guard read HIGH by 14% on average and up to 22% (Aris 13,449 estimated, 11,111 counted), and its densest ratio was 0.99: wasteful and not safe. The engine's count was retained per reply, but `charge` never priced below the estimate, so a lighter density changed nothing. - types.rs: `Density`, a ring of (estimate, engine count) per reply over RECENT_TURNS; `observe` returns the next ring, its PRICE (the densest ratio in the ring, compared exactly) and a typed `DensityReading { mean_milli, bound_milli }`. `charge` / `prompt_budget` are plain two-sided ratios; `PromptCalibration::observed` (a refusal's or refit's price) clamps at the estimate, so a refusal still only raises the price (its old behaviour, exactly). - view.rs: `learn_prompt_density` observes into her density on this binding and stores its bound; the probe adds density_mean_milli / density_bound_milli. `density_on(binding)`: the ring her feedback carries when it applies to this binding. - contribute.rs: a refusal's feedback carries her density through. - The engine's refusal stays the final authority on fit: `InferenceError::ContextExceeded { requested, available }` already exists and refits at the refusal's price. Tests (types.rs, its one test mod): the window admits >= 13% more estimate at the measured density than unmeasured (Aris + two samples at the day's mean); the bound charges every recorded prompt at or above the engine's count, the 0.99 case included; a dense prompt ages out of the ring; a refusal never prices below its estimate and a zero count measures nothing. Not done (follow-ups, named): - GUARD_CHARS_PER_TOKEN is NOT deleted: it remains the estimate's unit at every faculty site (fit.rs:17,26,380,647; epoch.rs:74; types.rs for_input; llm_deliberation_faculty.rs:38; newest_result.rs; segments.rs; system.rs) and outside the view (continuum-prompt context_budget.rs, continuum-engine serving_guard.rs, continuum-mind awareness.rs, tool schema pricing). The density now corrects that unit both ways at the one place every claim is charged (`charge` / `prompt_budget`); deleting the unit is the bytes-and-density migration of those sites, one owner in continuum-base token_estimate. - Unmeasured (no reply yet on this binding) still prices at the estimate itself (PromptCalibration::default()); the typed first-act answer is one engine /tokenize count or the model's measured density on the node. - Integration tests through `contribute` with HeuristicInferenceAdapter now learn its count (chars/4 + 1, ~0.75 of the guard) as a lighter density from the second act; any test that pinned exact grants across two acts may move. Not run here. Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * flex: the one allocator moves into continuum-context (pure move; RagSourceBudget -> FlexClaim) ONE-ACT slice 2 part B, step 1 (MIND-CONTEXT's module table: "flex moves into continuum-context as the one allocator"). Its only production callers are the deliberation faculty's prompt allocation; nothing else in grounding used it. - continuum-context/src/flex.rs: flex_allocate, turn_need, FlexClaim (was RagSourceBudget, a misnomer: the claims are framing, reply, tools, view sources, not RAG sources), SourceAllocation, AllocationState, FlexAllocation (+ `of(id)`). The algorithm is unchanged; its `expect` on the input-order report is gone (the report starts filled). - flex/tests.rs: the allocator's ten tests, moved from continuum-grounding rag_budget/tests.rs. - continuum-grounding: flex_allocate.rs and the four types deleted; StubRagSource keeps its own file (stub_source.rs); its test stays. - continuum-cognition: every reference migrated to continuum_context::flex. - source-hygiene self_sized: ALLOCATOR is continuum-context/src/flex.rs (and flex/). Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * allocation: an act's one allocation, run once, in continuum-context; side budgets and two runs deleted ONE-ACT slice 2 part B, step 2 (stage 2: the one allocation run ONCE per act; MIND-CONTEXT's "flex moves into continuum-context as the one allocator"). continuum_context::allocation (new): - `allocate(window, ActClaims) -> ActPlan`, one flex_allocate. Claims: framing, required input, NEWEST result (floor: its coarsest level with its handle; min = want: whole, so it is whole whenever the window holds it, goal 7), tools, grounding (optional, floor 0, min = the standing minimums), history (floor = her last move), the reply (floor capped by the other floors, its uncapped floor kept as her need), each view source `view/<source>`. - `ActPlan`: granted, claims (the receipt), view_granted, room, start_room (her view's start as if the reply held its want: arithmetic replacing the second allocation with the reply seated at its want), shed_view_sources, held_need, irreducible, irreducible_shortfall. - `IrreducibleShortfall { needed, window }`: required floors past the window, typed apart from a view that outgrew its grant (reducible: a turnover, recorded as her censored need, never a grant). - `start_shares(start, &[StartSource])`: a start's per-source shares by arithmetic on the one plan (floors, fixed sources to their grant, the rest by what each lacks), replacing the third flex_allocate inside `start_grants`. - fixtures.rs: `item` and `Fake` (moved from view/tests.rs, now shared; `Fake::shaped` gives items their output summary level). continuum-cognition, deleted: `after_reserves`, `view_floor` / `irreducible_room`, `grounding_budget` / `payload_overflow`, the separate `fit_newest_result` room arithmetic, `seated_at_want`, the `start_plan` run, the inner flex_allocate in `start_grants`, the grounding soft floor's `after_framing / 2`, the grounding's expansion into leftover window (it fills its own grant), FLEX_* ids (now `allocation::id`). - view.rs: claims built once; her newest result is fitted to its grant; the grounding plan is fitted to its grant (shedding, never refusing); `delib.payload.over_window` fires on the typed IrreducibleShortfall; `delib.window.flex` reports the newest claim. - newest_result.rs: `newest_result_floor` (the coarsest level's cost, no probe) and `fit_newest_result(prompt, room)` share one `level_newest`. - epoch.rs: `fit_view(prompt, view, &ActPlan, calibration)`. - self_sized: TURN_ALLOCATION is continuum-context/src/allocation.rs; the faculty calling the allocator directly is now a violation (test pinned). Tests (continuum-context allocation/tests.rs): newest whole when the window holds it, coarsest floor when not; required floors past the window are an IrreducibleShortfall; a pass and the act after it start her view alike from one plan; start_shares keeps floors and grants; `reproduction_7_...`: Aris's recorded items (44k-token view, 17k/43k-char appends, 9 acts, her 55,672 window) through the one allocation and the view: every prompt fits, her newest item shows, her oldest read is never kept verbatim, no grant growth, and a per-act table of verbatim vs view prompt tokens and prefill (--nocapture). Numbers not reported: not run here. Behaviour that moves (named for review, not run): grounding no longer takes leftover window beyond its grant; the newest result's reduction is now decided by the min pass (with history's floor among the floors ahead of it); a start shares the growing room by what each source lacks rather than by equal-priority flex growth. Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * review gates for #5779: density typed per served model, safety stays the engine's count; C proven at the boundary Codex's gates on slice 2 (D and C), folded in after part B. D, the density: - `Density` is a typed state: `Unmeasured` (no reply on this binding and model yet: priced at the estimate itself) or `Measured { served, samples }`. Its ring is keyed by the model the engine reported serving each reply (`TextGenerationResponse::model`, passed in by contribute): a reply from another served model starts a fresh ring. Named limitation: no engine-reported tokenizer or chat-template revision reaches this seam; when the fork reports one it joins the key. A binding change (adapter, model, window) already drops the ring with its feedback. - Documented in the type: Density is PROMPT bytes per prompt token for sizing her text, never KV bytes per token. The compile-level separation is visibility: it is private to the deliberation faculty, so no capacity/grant/footprint crate can name it; what it converts is tokens, and her need is recorded in tokens, never converted to bytes. - Documented: the ring's bound is an observed envelope, not a proof; the SAFETY authority is the engine's exact count of the finalized request before generation (`/input_tokens` as `PromptCount::Measured { prompt, reply }`, unchanged), whose ContextExceeded refits her first. - The "14%" is stated as an estimate correction in the sample, never as useful context or acts/hour (doc and test text; bad9f451d's message said "left 14% of every window unused" and the test name said "admits more": both are estimate statements, corrected here). - Tests: `a_denser_reply_is_covered_within_one_reply` (a light ring, then one 0.99 reply: the next price covers it); `another_served_model_starts_a_fresh_ring`; window_feedback `a_prompt_denser_than_her_measured_density_is_refit_before_generation` (sparse history at 3/4, then the engine counts a prompt that alone fits but with her reply does not: refused before generation, refit once smaller, refit + allowance within the window at the refusal's price, allowance at least the reply floor). C: - an_action_result_cannot_mute_a_citizen: the coarser newest result is SEMANTIC (every shown line besides the note and markers is a line of her result) and names the handle her act's whole is saved under (byte-identical reopen pinned by spill_then_resolve_round_trips). - continuum-hands filesystem tests: `a_read_returns_exactly_the_selection_asked_for_whole_or_its_range` (5,000-line file: unranged = every line; 2,400-2,402 = exactly those three numbered lines). Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * self_sized: the Aris receipts become a recorded fixture; levels derive their ratio and indent CI on #5779 (164e0a653), source-hygiene self_sized: 6 sites in touched files. Fixed, not exempted. - continuum-context allocation/tests.rs: ARIS_VIEW_TOKENS, ARIS_WINDOW, HEAD_CHARS, REPLY_TOKENS (and the rest of the recorded inputs) move to allocation/2026-11-04.json, the dyno's shape ({value, receipt}, `aris_view` as fable/dyno capacity/dyno/2026-11-04.json records it), loaded by include_str! into a typed `Recorded`; every fact must carry a receipt. A copy, not a share: that file lives in continuum-engine on fable/dyno, not on this branch. - continuum-context levels.rs, both constants gone, derived: - LEVEL_RATIO (each level <= a quarter): a budgeted level (Output, List) is now the rung between the item's floor (its own elision marker, the least that still carries content) and its whole: their geometric mean. Summarizing a level again is the next rung; the ladder converges on the floor and ends when nothing smaller carries content. A level is offered only when it is smaller than what it stands for: `levels::is_a_level`, the one rule (ledger.rs's multi-part receipt summary now uses it too). The list head reserves its marker. - DECLARATION_INDENT (4): the file's own indent unit, the most common positive step between consecutive lines' leading spaces; tabs are one level each. A declaration is depth <= 1. - Tests: `the_indent_unit_is_the_files_own` (2-space, 4-space and tab files keep the method and elide its body; a fixed 4 kept a 2-space body); `a_ladder_of_levels_reaches_the_floor` (strictly shrinking rungs, more than one, terminating near the marker, the first keeping both ends); existing outline / single-line tests assert `is_a_level` in place of the ratio. - examples/summarize.rs and replay/outline.rs: the ratio references removed. Behaviour that moves (named): Output and List summaries are now geometric rungs, much smaller than a quarter for large items (a 400k-char log: ~4.3k chars rather than up to 100k); the view's allocation chooses among whole, rung and pointer as before. Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * CI on 5b5d25e4a: the newest result is a discrete level choice; a level carries content; the density fixture checks the price `lib tests continuum-cognition`: 912 passed, 3 failed. Each was a code defect or a wrong fixture precondition, named here. (1) capacity_and_wire::prompt_preserves_stimulus_and_large_action_on_the_wire ("room updates must survive"). Cause: allocation.rs (8c1a21547) made the newest result a SPAN claim, floor = coarsest, min = whole, at priority 10. When its whole could not fit (the 17k-token stimulus is required beside a 22k-token result on a 32,768 window), the min pass gave it EVERY token left; the view then showed the largest level under that grant and the rest was wasted, so her view's sources (the conversation, where room updates live) got only their floors. Fix, in the claim shape: `Newest { levels }` (each level's cost, whole first); the one allocation chooses the largest level that fits beside every other floor (the reply's need included), else the coarsest, and claims exactly that (`ActPlan::newest_level`). What the level leaves goes to her view. - newest_result.rs: `newest_result_levels` records each level's cost from the same descent `fit_newest_result` takes; the note no longer prints the room, so a level costs the same priced or shown. view.rs fits the result to the chosen level's cost. - Test: allocation `the_newest_result_is_the_largest_of_its_levels_that_fits_and_the_rest_reaches_her_view`. (2) window_feedback::a_prompt_denser_than_her_measured_density_is_refit_before_generation ("5638 then 5638"). Cause: the FIXTURE's precondition was wrong, not the wiring. Her view is an epoch that only appends, so a lighter price does not regrow a view that already fits; the estimate correctly stayed at 5,638. The precondition now asserts what the act learned, the price (`prompt_fit` charges an estimate below itself); the refit assertions are the real check. (3) working_memory a_batch_receipts_summary_keeps_every_operation ("the later error survives"). Cause: levels.rs (5b5d25e4a), the geometric rung had no lower limit: a batch's short error body (~60 chars) got a "level" of 3 characters at each end of its marker, losing the operation's outcome. Fix: a level carries content: each end char_ends keeps, the lines line_ends keeps, and the entries head keeps must be at least as long as their own marker; else the item is its own smallest level (kept whole). The ladder then ends at about three markers, never below content. - Test: levels `an_operations_short_outcome_has_no_level_below_itself`. Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * cognition: Density::samples is read only by the ring's tests, so it is cfg(test) (warning ratchet: dead_code types.rs:156) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * allocation: optional claims shed before her newest result or her reply's need (Cormac on #5779, goal 7) Cormac's finding: `allocate` chose the newest result's level against `turn_need(&all)` plus the reply's floor, and `turn_need` sums EVERY floor, the optional ones included (grounding, history, every optional view source). So enrichment and older history pushed her newest result to a summary on a window that held it whole: allocate(15_500) with levels [9,000, 2,000, 900] chose level 1 (2,000) though the required floors 6,300 + the whole 9,000 = 15,300 <= 15,500. - The level is chosen against the REQUIRED floors and the reply's need only; optional claims shed in the floor pass, which is what optional means. - The same defect in the reply's floor cap, fixed the same way: it was capped against every floor, so in Cormac's case the reply was cut to 200 of its 800 while optional history and view kept theirs. It is now capped against the required floors (her newest result at its chosen level among them): it never takes from a required floor (the 8,192-window refusal at 275 of 0), and an optional floor sheds before it. - Tests: `optional_claims_shed_before_her_newest_result_is_shown_smaller` (Cormac's case: level 0, 9,000 granted, history + grounding + view within the 200 left, no shortfall); the 12,000 case keeps level 1 (6,300 + 9,000 > 12,000), its comment now counting required floors only. Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * allocation: her last move is a required claim; the rest of history is optional and sheds first Coordinator's decision on the trade-off named in 1a744dbdf (goal 7: the newest complete interaction is whole; ONE-ACT stage 2: her required working set is whole). Her last move (her newest complete act and its result, what history's floor was) was the floor of an OPTIONAL history claim, so a tight window could shed it before the reply's need. - continuum-context allocation: `ActClaims::last_move`, a required fixed claim `last_move`, beside `history`, now the optional rest of the fresh tail (older acts, facts, the clock), both built from the same source in the faculty. One claim per role. Her last move counts among the required floors the newest result's level and the reply's floor are chosen against. - view.rs: `last_move` = the recent-move evidence floor; `history` wants the rest. Every reader of the fresh tail's grant (the message budget, the budget ledger, the flex probe) adds both. - Tests (allocation/tests.rs): - `on_a_tight_window_her_last_move_and_reply_floor_survive_and_optional_claims_shed`: on 6,600 (required 6,500) her last move is whole, her reply keeps its floor, the optional view source sheds below its floor and older history gets at most the 100 left. - `the_newest_result_is_whole_at_the_exact_boundary_and_the_next_level_one_token_under` (Codex): required floors + reply floor + the whole newest result = the window exactly (15,500): whole; 15,499: the next level. - Cormac's 15,500 case still yields level 0; her last move is 200 and the optional claims 0. The 12,000 case keeps level 1 (6,500 + 9,000 > 12,000); comments count the last move as required. Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * view: a view the one allocation granted nothing is held, not shown; required content keeps its room CI on e33bcf7bd: capacity_and_wire::an_8192_window_keeps_required_content_under_a_large_measured_need refused with `PromptCapacityError { required_tokens: 275, budget_tokens: 0 }`. Cause: 1a744dbdf (allocation.rs, `allocate`) caps the reply's floor against the REQUIRED floors only, as decided (optional claims shed before her reply's measured need). On an 8,192 window with a 9,000-token measured answer, the reply then takes every token the required floors leave, and her view's optional sources are granted 0. `fit_view` (prompt/epoch.rs) kept the held view in the prompt whole whenever nothing was allowed (`turnover_due`'s `allowed == 0` guard: never start her view empty), so the view took the room the allocation had given her required input, and the tail fit (`fit_messages`, budget = msg_budget - the view's cost) refused 275 of 0. The allocation was right; the view ignored its grant of nothing. Fix (epoch.rs, `fit_view`): when the act's one allocation grants her view nothing (its sources' grants plus the room no claim took is 0), her held view stays as state (still never started empty) but is not shown this act: its messages leave the prompt, `grounding_at` and the result pointers shift with them, probed as `delib.view.unshown`. Required content (her last move included) keeps the floor the allocation gave it; her reply keeps its measured need. Cormac's and Codex's allocation tests are unaffected (pure allocation). Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * allocation: on an act her view's floor is required; a reply need past the window is the typed shortfall (reverts e0f2a78af) Cormac's decision on #5779 (option B plus the typed shortfall), replacing e0f2a78af. - REVERTED e0f2a78af's "a view granted nothing is not shown" (fit_view, delib.view.unshown). Dropping her view broke append-only (the next act re-prefills all of it, worst on a tight window) and left her acting blind; her view's floor is already its collapsed minimum (handles, fold blocks), so holding it is cheap. - view.rs: on an ACT every view source's floor is a REQUIRED claim (her view at its collapsed minimum), so the reply's want above its own floor never displaces it; the reply gets what the required floors leave (its floor is capped against them, 1a744dbdf). On a pass optional view sources shed first as before. - allocation.rs: `irreducible_shortfall` is the required floors plus the reply's MEASURED need (uncapped) past the window, typed `IrreducibleShortfall { needed, window }` for admission (ONE-ACT stage 3/4: her need grows, a larger window, or she waits). This act still proceeds with the reply at what is left; a cut answer is continued and visible in its receipt. - Test (Cormac's spec): `a_reply_need_past_the_window_keeps_her_view_floor_and_reports_the_shortfall`: 8,192 window, reply need 9,000, a required view floor of 600: the view keeps >= its floor, the reply is granted exactly 8,192 - 6,300 (the required floors), and the shortfall is `Some { needed: 15,300, window: 8,192 }`. capacity_and_wire's `an_8192_window_keeps_required_content_under_a_large_measured_need` is the faculty-level check. Cormac's 15,500, the 12,000, the tight 6,600 and Codex's exact-boundary tests are unchanged in outcome (their reply needs fit, so no shortfall). Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * start: a view start holds every required floor or refuses typed; a cut tool call never runs (pinned) Codex on #5779 at 89b2940bb. Gap: `ActPlan::start_room` subtracted the reply's want beyond its grant from (view grants + room) without protecting REQUIRED view floors. In the 8,192 / 9,000 / 600 case: view 600, reply 1,892, room 0, reply short 7,108 -> start room 0, and at an epoch START `start_shares` could drop the required 600 (a floor that did not fit started its source empty). - flex.rs: `SourceAllocation::required` (the plan reports each claim's requiredness, so no consumer can share a required floor away). - allocation.rs: `start_room` is never below `required_view_floors()`. `StartSource::required`; `start_shares` grants every required floor first and returns the typed `StartRefused { required, start }` when the start cannot hold them (never a silent drop). - epoch.rs `start_grants`: sources carry `required`; the start is at least their floors; a `StartRefused` is probed (`delib.view.start_refused`) and answered with no grants, the view's own typed refusal (GrantMismatch): the turn is refused, the held view stays. - Tests: allocation `a_reply_need_past_the_window_keeps_her_view_floor_and_reports_the_shortfall` now drives start_room + start_shares (her view starts at >= 600); `a_start_too_small_for_a_required_floor_is_refused_typed`; capacity_and_wire `an_8192_window_keeps_required_content_under_a_large_measured_need` asserts her view is shown at its epoch start (that first view starts and sizes her epoch) with no budget fault. Cut tool calls (Codex: an incomplete tool call must never execute): confirmed in verdict/contribute.rs (the `FinishReason::Length` + tool_calls branch, ~:735): every call that reached the output limit is replaced by `tools/<cut at the output limit>` (`CUT_AT_LIMIT_SENTINEL`), which `is_reported_sentinel` never executes and S2 never marks (act_observe/tests/apply.rs pins the latter). Already pinned for a malformed write; now also pinned for a call whose arguments parse whole (capacity_and_wire `a_tool_call_cut_at_the_limit_is_an_answer_cut_held_for_the_retry`, second case). Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * start: required means refuse if underfunded, never mint budget; the cause reaches the turn typed Codex on #5779 at d292a92a2: `start_shares` allowed a required floor above its grant, and `start_grants` raised the start above what was available (`max(required_floors)`). - allocation.rs: - `StartRefused` is an enum: `Underfunded { floor, grant }` (a required source the plan granted less than its floor) and `OverRoom { required, start }` (required floors past the start); `needed_and_had()` for the turn's refusal. - `start_shares` rejects both, typed, before sharing anything, and no share ever exceeds its grant (no minting). - `start_room` is never more than the plan has: what the plan granted her required view sources (each up to its floor) is protected from the reply's want; only the rest is reduced by it (the 600 / 1,892 case still starts at 600, now because the plan funded it). - epoch.rs: `start_grants` returns `Result<_, StartRefused>`; its start is raised toward the required floors only up to `available`. `fit_view` returns the typed `ViewSizing { Mismatch, Start }`: the view's closure contract answers grants only, so the refusal is held in a cell and returned in place of the mismatch its empty answer raises (no empty-vector sentinel erasing it). - view.rs: `ViewSizing::Start` is the turn's `capacity_error` (`PromptCapacityError { required, budget }`); a mismatch stays a budget fault. Distinct from the reply-only IrreducibleShortfall, with which an act still proceeds at what is left. - Tests: allocation `an_underfunded_required_floor_is_refused_never_minted` (floor 600, grant 500, start 600: `Underfunded`, not a raised start); `a_start_too_small_for_a_required_floor_is_refused_typed` now expects `OverRoom`; capacity_and_wire `a_turn_whose_input_floors_exactly_fit_proceeds_and_one_token_short_is_refused_typed` (her act's input floors read from the allocation receipt at a roomy window: that exact window proceeds with no capacity error or fault; one token less is a typed capacity refusal, not a fault). a_busy_room_keeps_its_prefix calls start_grants through its Result. Not compiled here. The exact-fit faculty case assumes the assembled prompt costs what its claims' floors priced (template overhead included in `message_cost`); CI will say if it is off by one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * ONE-ACT stage 1/6: a work command's precondition decides both her surface and execution (draft for CI) (#5782) * A busy engine is not dead: page-switch liveness reads the engine's accumulated CPU time, never only a queued /slots (#5772) * engine: busy is not dead - a page switch reads the engine process's CPU, not only /slots A page switch judged engine progress only through /slots, which llama-server answers as a task on its main loop: during one long CPU batch it cannot answer, so a working engine read as stopped -> Uncertain -> quarantine -> replacement, dropping every resident's KV (IntelMac 2026-11-04 16:24:20Z: replaced while its main thread was in update_slots -> decode; every resident then cold-prefilled 24-32k tokens at 20-28 tok/s). - kernel process_tree: CpuWatch / CpuSample, a one-process CPU read through the same sysinfo usage, fenced by pid AND start time (shared same_process with still_present; a reused pid or an exited process is Gone). - turn_admission/page_liveness.rs (moved out of turn_admission.rs with the quiet wait and the receipt wait): PageLiveness folds each /slots probe with the engine process's CPU. Gone -> Stopped at once; CPU spent while /slots is silent -> "processing, unmoved", bounded by the measured unmoved window; CPU flat while silent -> Stopped. HTTP stays the richer signal. - CPU moving without a receipt past that window is PageOutcome::Unresolved: the engine is not replaced on that alone (requires_replacement only for Uncertain), the endpoint retains the in-flight request until its receipt arrives, and the page is held as an uncertain switch leaves it (not resident; a save's page not restorable). - EngineProbe::Stopped ends a wait at once, initial probe included. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * host+kernel: busy is read from ACCUMULATED CPU time, never a usage percentage Window 45 on the M5: CpuWatch read sysinfo's per-process cpu_usage, which on macOS needs the system-wide CPU refreshed with it and read 0 for a spinning process, so every busy engine would have read CPU-flat (stopped) on the IntelMac. - continuum-host process_usage: cpu_time(pid) -> Option<Duration>, the accumulated user + system counter. Logic once in mod.rs; adapters hold only the call: macOS proc_pid_rusage (rusage_info_v4 ri_user_time + ri_system_time, Mach units via mach_timebase_info), Linux /proc/<pid>/stat utime + stime over sysconf(_SC_CLK_TCK), elsewhere None (unknown). - kernel process_tree: cpu_time(identity) -> CpuTime { Used, Unreadable, Gone }, read first and fenced after by pid + start time + zombie (still_present); CpuWatch keeps the last reading and samples CpuSample::Alive { spent: Option<Duration> } | Gone. - page_liveness: busy = the counter advanced (spent > 0); flat = zero; probes carry engine_cpu_ms; Receipt::Unresolved carries cpu_spent. - kernel test asserts the counter advanced after a spin; pid-reuse and reaped-child cases kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: an unresolved page switch holds its slot's custody until the engine answers Codex on #5772 (CHANGES at b20008ed6): Unresolved kept only the HTTP future. The turn's error dropped its TurnAdmission, releasing the lane permit, slot permit, pin and endpoint reader, so a later turn could reuse the slot while the old restore was still queued in the engine (a late restore then overwrites another activity's KV), and a lifecycle transition no longer waited. Codified in the type: - PageOutcome::Unresolved(UnresolvedPage): the in-flight request, #[must_use], consumable only by UnresolvedPage::hold(custody), which moves the custody into the endpoint's paging task beside the request. Released only by the receipt, a stopped engine process (gone or no CPU, fenced by pid + start time; quarantines first) or a condemnation (the replacement's kill is the fence). - TurnAdmission::page_action consumes the admission: a terminal receipt hands it back, an unresolved switch holds it (the mind gate is let go: the mind is not the slot), so the compiler forbids reusing the slot while it lives and a transition's writer waits on its reader. The lifecycle checkpoint (already inside the writer) holds (). - Test through the real admission on a one-slot fake engine: the restore goes unresolved, a same-slot turn and then an engine transition are attempted before the receipt; neither gets in until the engine answers, and the receipt frees the slot and every lane. - turn_admission.rs 1,000 -> 946: the save-size quote moved whole to turn_admission/page_quote.rs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: until_condemned_on is re-exported for the unresolved page's custody, not only tests Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: an unresolved switch lets its slot go only on a verified receipt, a quarantine or a condemnation Codex's follow-up on #5772 (two holes at 279366b96): 1. The held custody read any late reply as a receipt: a transport error became Receipt(0), the body was ignored, and the slot was let go without quarantine. A socket closed under the request, or a body cut mid-way, is not proof the engine ended the switch. - turn_admission/page_receipt.rs: terminal_receipt(), the ONE judge of a switch's reply, extracted from the bounded wait and called by both it and the late path. - Released { Verified(Terminal), Fenced(Quarantined), Condemned }: Quarantined is made only by quarantining the endpoint, so a release without a verified receipt cannot be written without quarantining first. 2. The lifecycle checkpoint's unresolved.hold(()) held nothing durable, and its error alone does not prove the engine retired: the checkpoint's save now stays pending, so its drop quarantines the endpoint as the writer lets go. Tests (the existing fake-engine harness, now with a /slots that never answers): a late reply cut mid-body quarantines the endpoint and no same-slot turn gets in; an unresolved checkpoint leaves the endpoint quarantined. lifecycle::boot is shared (pub(super)) rather than copied. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine test: the cut-reply test waits on the fake engine's own events, not virtual timeouts Window 49 on the M5: a_reply_cut_mid_body_quarantines_before_the_slot_is_let_go read landed == 0. Under a paused clock tokio auto-advances virtual time whenever no task is ready, which runs ahead of real socket IO, and nothing in this test waited for the restore's bytes to reach the fake engine: the virtual 120 s windows could expire, and the assertion run, before the POST arrived (the first custody test only passed because it waits for an admission that needs the real reply). The fake engine now signals `entered` and `cut`; the test waits on them, and on the custody's quarantine, bounded in real time (the socket's clock). It also checks, as the first custody test does, that the restore is unresolved (lane held, not quarantined) before the cut. Assertions kept: no same-slot turn is admitted; the endpoint is quarantined. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine test: the custody tests run on the real clock, each on its own fake engine Window 50 on the M5: an_unresolved_switch_holds_its_slot_until_the_engine_answers (green in windows 48 and 49) failed "the held custody keeps its lane", after window 49 had failed the cut-reply test on its engine counter. Both ran on a PAUSED clock against real sockets: tokio auto-advances virtual time whenever no task is ready, which runs ahead of the IO the fake engine and the paged request depend on, so where a restore was when its bounded wait ended (sent or not, probes answered or timed out) depended on scheduling, and the outcome with it. The lane semaphore is each test's own (admit_turn takes it as an argument), the fakes are per test on their own ports, the CPU seam is keyed by root, and nothing in the binary condemns the process-wide watch, so no shared global was involved. Now: - #[tokio::test] on the real clock for all three custody tests. - The fake's /slots answers at once with one slot processing and no counter moving, so the switch's measured unmoved window ends its wait one checkpoint (~10 s) after it starts: the outcome no longer depends on how probe timeouts race the request. (A silent /slots is tests/page_liveness.rs's subject.) - "Nothing gets in" checks are 3 s real windows; releases have 30 s to arrive. Every reviewed assertion is kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: a page switch reads its engine's condemnation from its liveness; fixtures are never condemned CI on #5772 at d818d9981 (1436 passed, both custody tests failed "the held custody keeps its lane, left: 2", as on M5 window 50). Not ownership: the lane permit is inside the admission that moves into the custody (admit acquires it, turn_admission.rs:319, stores it in TurnAdmission::_permit at :345; retain_paging moves the admission into its operation, paging_lifetime.rs:66; page_action takes `mut self`, :113-114, and hands it to UnresolvedPage::hold, :135; the custody drops it only at unresolved_page.rs:142). The switch never went unresolved: the engine-crate tests share the process-wide condemnation watch. late_ready.rs's tests launch through launch_prepared, whose drain on a fresh endpoint condemns (engine_generation.rs:230, incumbent and generation both None), and only the serving daemon's ready snapshot (continuum-serving publication.rs) recovers it, so after them every restore_probe/engine_probe in the binary read Condemned: the bounded wait ended Stopped, the switch Uncertain, its admission (and lane) dropped and the endpoint quarantined. - PageLiveness carries its engine's Condemnation: Daemon (the process-wide watch) in production, Never for a fixture engine registered with watch_for_test, which no daemon serves. PageLiveness::probe reads it first and does not ask a condemned engine at all. - The page switch's probes read no condemnation themselves: slots_probe (engine_probe without the check; engine_probe keeps it for its other caller) and restore_probe (its one caller). - The held custody subscribes to and checks the same Condemnation. - PageLiveness::new takes the Condemnation; the unit tests pass Never. No #[derive(TS)] type is touched on this branch (diff against canary's merge base). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: the page-liveness fixture seam is gated to this crate's own tests (only they call it), so a test-fixtures build has no dead code Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * Work verbs accept the short ids she sees: Shown<T> from airc_core, typed refusals (#5775) * work/submit + work/review: ids she was shown parse as airc Shown<T> Benchy on the M5 (2026-11-04 17:51:56Z): persona.act.refused command="work/submit" reason=... CommandRequest deserialization failed: UUID parsing failed: invalid length: expected length 32 for simple f... The verbs' submission_id (submit) and review_id / submission_id / review_claim_id (review) were raw Uuid, so the short id every surface shows died in serde before any handler could resolve it. These fields, plus submit's claim_id and review's card_id (both Option<String> through the String-error id_resolve path), now decode as airc_core::shown_id::Shown<T> (SubmissionId, WorkReviewId, ClaimId, WorkCardId) and resolve with Shown::resolve against what the verb already read: the card's own submissions (one helper, submission_named, for both verbs), its claim, the submission's reviews, the room's cards. A full id passes through; a shared prefix is ShownIdError::Ambiguous naming both; junk is refused at decode with the sentence naming the accepted form. Params become Deserialize-only (Shown is read, never re-rendered); TS bindings and schemas are unchanged in type. Tests: submission/tests.rs pins the receipt (short id on submit and review, full id, typed ambiguity, decode refusal names the form); training_credit fixtures build Shown ids from full ids. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work ids: no runtime 'id is required' complaint; tool docs back to canary length required_input_complaints: resolve_shown's empty-string branch is gone. Every caller's field is a non-optional String, and resolve_handle already refuses a blank (or any non-handle) naming the accepted form. prompt_shaping surface ceiling (17487 > 17486): the param doc text this branch added is reverted to canary's wording, so the schema she reads every act does not grow; the accepted form is named by the refusal itself. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * protocol: regenerated WorkSubmitParams/WorkReviewParams bindings (ts-rs, M5 window 51) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work ids: submit claim_id and review card_id back on canary's id_resolve path Cormac's CHANGES on #5775 at 79e9dec89: these two were Strings through id_resolve and should not move to Shown until card 484b000b adds the 8-hex-group form there. Both fields and their handler lines are restored byte-for-byte to canary (String + resolve_shown). Shown stays only on the fields that were raw Uuid: submit submission_id, review review_id / submission_id / review_claim_id. Note for 484b000b: canary's path for these two is resolve_handle (strict), not the repairing id_resolve::resolve, so a one-char-corrupted full claim id was already refused on canary. The new test pins full + shown resolving and the corrupted form refused, naming the card that flips it. The params' struct doc became a plain comment so ts-rs and schemars emit nothing for it (bindings back to canary's bytes, no tool-surface growth). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * The surface follows her card's state: one transition table, held moves in hand, her held work as keyed items Residents learned the work protocol by trial because the substrate knew their card state and hid it (the M5, 2026-11-04: Benchy on review card 32d53734 called commands/help 4 times and work/submit 5 times with work/review off her surface; Atlas called work/list 6 times to find where he stood). Plan goal 10 keyed by state, order-of-work line 2. - continuum-rooms card_moves: the board's transition table airc-work lacks. Pure, exhaustive moves_in(CardRole, CardState), held_moves(card, holder), Held. Each move's name is pinned to the registered command's NAME. - Tool surface: the room's declared set (or her core hands) UNION the moves her held cards give her, in canonical order and priced in her claim; ToolsEpoch re-selects only when those moves change (delib.tools.epoch_moves_changed). - Her held work is read once per tick (extensions::held_work, persona::held_work) and carried typed on the Workspace. A native continuum-context Source renders one item per held card keyed by the card, its occurrence (card, state), with "you can: <moves>"; ended and rejected claims are their own items. - Deleted: ActiveWorkSource (RagSource) and its registration, faculty_ids::ACTIVE_WORK and the two predicates that grepped [InProgress] from rendered text (now typed reads), and the active-work special cases in the legacy enrichment walk. AircWorkReader moved to persona::held_work. - docs/architecture/STATE-DRIVEN-SURFACE.md: failure class, five pieces and owners, the table, ratchets, receipts owed. Not compiled (written with serving up); cargo check and tests are owed on a non-serving executor. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * card_moves answers every actor: moves or a typed reason, never a bare empty list Cormac's review of bf114fac1. The table becomes data over (role, state, stance): moves_in(CardRole, CardState, Stance) -> Moves, with Moves::Some(MoveSet) | Moves::None(NoMove). MoveSet is non-empty by construction, so a refusal always carries moves or a typed reason (NoMove::Held { by }, NoMove::Ended(state)). That is the shape his refusal ratchet reads. moves_for(card, actor) reads the stance from the owner. Non-holder rows: Open -> work/claim, unowned working card -> work/claim, another's -> Held { by }, Review not hers and Merged/Closed -> Ended. held_moves is gone: Held reads moves_for, one table and no copy. One test per row, the non-holder rows included. The code/** move is pinned to a registered code/ command (code/run), so the subtree cannot match nothing. A held item with no moves renders its typed reason. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Preconditions are the one owner: each work verb's typed predicate decides execution and the surface Codex's four corrections and the seam he named (Cormac concurring): - Removed the separate move table (card_moves). continuum-rooms work_preconditions holds each verb's PRECONDITION, a pure typed predicate over (card, actor, request). The handlers call it at the mutation boundary against the card as the board holds it now (decide -> Refusal with the refreshed card and her moves now). The surface, her held-work item and a refusal's next moves call it in the any-arguments form. Decisions read the time they are given, never the wall clock. - Checks moved out of the handlers: submit's holder/not-claimed checks and holder_guard (deleted); review's not-a-review-card / held-by-another / named-parent checks; state's open-by-holder refusal and review resume (resumes_held_review moved); claim's holder rule (live_holder -> holder_on_record, matching the projection's on-record rule). work/claim checks claim before publishing; an unowned InProgress card is claimable, proven through the real projection. - work/submit is allowed in Review. An identical submission (same publisher, patch hash, base, instance) answers as success, outcome AlreadySubmitted, naming the existing one; a changed patch submits. - A reviewer holding a satisfied review precondition gets code/** and work/submission (WorkVerb::grants), whatever the room declares. - Held-card occurrence = card + state entry (the board revision at the first read in that state) + rendered content. Heartbeats append nothing; a same-state refusal or a selection switch appends once; a re-entry is a fresh occurrence. Tested through the real View. ts-rs bindings for SubmitOutcome and WorkSubmitResult were hand-edited and must be regenerated. Not compiled (serving up). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Preconditions compile: Unmet drops Hash, dead claim_card goes, one rejection fact per card - continuum-rooms work_preconditions: `Unmet` derived Hash over airc's CardState, which has none (E0277 at work_preconditions.rs:127/129, the one compile error behind every crate's lib tests). Nothing hashes Unmet; the derive is dropped. - work/review after the rebase onto #5775: her stated review claim resolves through Shown<ClaimId> against the review card's claim, then the precondition decides; the named submission resolves through submission_named against the parent the precondition returned. - AircCitizen::claim_card (trait default, stub and runtime impls) had no caller; deleted with its text match on "[denied]" (error_text_matches ratchet) and the stub's `claimed` recorder. - claim_rejections: the per-persona count cap becomes one fact per card (newest), bounded by the cards she tried inside the TTL; how many cards' facts she sees is her view's budget, each a keyed held-work item (self_sized ratchet). - epoch test: the source order now includes held-work beside the settled blocks, as epoch.rs places it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work_burst renders card ids through shown_form; doc names the owed self_sized sites and the receipts Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work/list lists every match; a structured result goes on one record per line - work/list: WORK_LIST_DEFAULT_LIMIT is deleted. Every match is listed unless she passes `limit`; how much of a big board she sees is her act's one allocation (the newest result's level, saved with its handle). - spill::result_text: an object with no string field went on as ONE compact line whatever its size (`else { return compact }`), so a board without a `note` was the 198k-char line again. The size threshold PRETTY_JSON_OVER_CHARS becomes a shape rule (`structured_lines`): a value holding records goes on one field and one compact record per line, still the same JSON; scalars-only stays one line. - Test: a board larger than the window shows its first card whole, a middle card behind the handle, and the counts after the list. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The tool-result store writes through its disk class; its handle is the content hash's address; the tail fits the read - spill.rs: every saved result goes through the `tool-output` disk class's writer (ClassWriter::of, owned_by(persona)): publish_new for the immutable content address, and the existing owner's new fence_existing for a reused one. The two direct OpenOptions writes are gone, and so is spill_root's hand-built ~/.continuum path: the class row (standard_tracked_dirs, kept under the continuum home) is the one source, and its eviction owner is the tool-output-spill pool (eviction_decisions). - The handle is ContentHash::address (continuum-context), the hash's leading 64 bits as 16 hex digits: the same form every saved handle already has, so checkpoints still resolve; no slice. - result_scalars reads the header at its two named places (the opening line, or the line after a stored head's pointer), never a count of lines. - DEFAULT_TAIL_LINES is gone: a read with neither pattern nor range shows the newest lines whose rows fit its own budget, measured in the count pass (TailFit), so the tail grows with the budget, always ends at the last line, and is never truncated. - continuum-host: the held-directory publish and re-fence honour the injected fence failure like the path forms, so the #5036 regression test still proves a visible-but-unfenced object is not reused. - Tests: the store's tests inject the class; a saved result reopens by its handle byte-identical (and the handle keeps its form); the tail follows the budget. Six tests that saved through the production path wrote into the real ~/.continuum; they now prepare the kernel's writer fixture (spill::prepare_store_fixture). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The work turn's stimulus lists neither her cards nor her progress: her view carries both - work_burst: the card lines are gone (each held card is its own held-work item with what she can do on it), and so is the `[progress]` receipt list with PROGRESS_READ_KEEP, PROGRESS_RAN_KEEP and the 72-char object cut: her actions source holds every act's record across turns and restarts (working_memory::tests::action_log::a_restart_keeps_every_act_as_she_read_it) and her open views which lines of each file she read, each a keyed item her one allocation sizes. Deleted, not moved: a second rendering of what her view already holds. - The stimulus keeps the fixed instructions, her last thoughts and the checkpoint line, so credit and gene selection read the same text (gene selection reads its last unbracketed line, the instructions, so the card lines never fed it). - act_question: the progress fold is gone; the card's id in the thought scope renders through shown_form, never a slice. - Tests: the work turn never drops her newest entry (her newest thought whole and last, the checkpoint after it); the stimulus points at [my work] and lists no card; the progress test goes with the receipts. - Still owed (STATE-DRIVEN-SURFACE.md, receipts): her last thoughts are paged off the room store because her thoughts share working memory's capacity-bounded entries ring; WORK_GATE_PAGE_ROWS and the older-thought head cut stay until thoughts become a log like her actions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Her thoughts are a log like her actions; the work turn reads her view, never a page of room rows - working_memory::thought_log: one record per thought (occurrence, text, time), kept whole and checkpointed in VolatileSnapshot.thoughts like her action log. `record` writes the log, never the capacity-bounded entries ring, so a turn of many acts and a restart both keep every thought (an older checkpoint's ring thoughts move into the log on restore). Her thoughts count in her resident bytes as pinned charge. The ring keeps receipts, facts and settlements. - context_streams::thoughts reads the whole log with her settlements, in her memory's one order: her newest thought whole, the older ones at the level her one allocation affords, collapsed only at an epoch start. - act_question: the room-page read is gone with WORK_GATE_PAGE_ROWS, the 4/400 keep-count and length and the card-scoped resume block; the write-less count reads her action log from the hold boundary (WorkingMemory::operations_since). work_burst: own_recent_thoughts_about and its older-thought head cut are deleted; the stimulus is the fixed instructions and the checkpoint, which credit and gene selection read. - Tests: a_restart_keeps_every_act_as_she_read_it now also keeps her thoughts across a twelve-act turn on an eight-entry ring and a restart, under their occurrences; the legacy snapshot test moves a ring thought into the log; her newest thought is whole and the allocation levels the older ones (context_streams); the ring/log contract and the write-less count over her calls. The resume-block tests go with the block. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * replay example: the layer tags are a slice, so no hand-kept count can drift CI on a21efc4bf ("lib tests continuum-context"): the replay example failed to compile, E0308 at examples/replay/acts/layers.rs:89, `[(&str, Layer); 23]` holding 24 tags. This branch added the `[my work]` tag beside `[active-work]` without the count. The tags are a `&[(&str, Layer)]` now: the list is its own length. Local runs had built `--lib` only; the example builds and its 21 tests pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Cormac's review of #5782: newest tail line, thoughts shed, attributed takeover, one sequence 1. Tail read: when not even the newest line fits the budget, the read says so (truncated, the line's byteOffset, a header naming it) instead of a complete-looking "last 0 lines". The newest line would also exceed the scan allowance, so it is never selected; she reads on by bytes. 2. Thoughts shed like results: ThoughtRecord takes the action record's shape (body while resident, summary built once, handle, measured length). One `Resident` trait and one shed verb (`evict_resident_results_over`) move both kinds by a typed `RecordId`; ActionLog's own evictable/collapse_over are deleted. The memory owner saves her unsaved thoughts at shed time (never the act that thought them), outside her lock; thought handles are live and protected in the checkpoint; a shed thought is loaded whole through its handle, byte-identical. 3. work/state: one decision. `state` routes another's held card as `Takeover { from }`, and `check(State)` offers the verb exactly when some requested state routes. Execution takes the card over through airc's claim (ClaimReleased { taken_over_from } by her, then her claim) before the column moves. 4. One sequence: WmEntry::occurrence is checkpointed; a restore keeps every occurrence (thoughts and entries), so her chain reads in the same order under the same keys. 5. The write-less count reads her action log for the turn's room since the board's claim decision time (durable across a reboot), reset by an act whose commands declare `ToolEffect::Changes`. The display-label split, the verb-name lists and the in-process hold-boundary map are deleted; an unknown hold start shows no checkpoint (None), never a count of zero. 6. A staging file (`durable::is_staging_name`) written in this life is protected from the pool's eviction (a save in flight); one older than this life's first save is a leftover and evicted. 7. A list of scalars goes on one element per line too, so a level keeps whole paths. Tests in the existing mods for each; the restore-order test, the shed-thought test, the takeover agreement test, the write-less count test, the staging test and the one-line-log test. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work/claim takes a held card over on the record: Joel's 10/06 rule, decided by the one precondition Anyone may take any card at any time; the takeover is attributed (Joel, 2026-10-06: default to more agency, pull back only on a demonstrated problem). - work_preconditions::claim returns a typed ClaimRoute: Fresh, Resume, or Takeover { from } for a card whose claim is another's (live or on record). Settled states still refuse. check(Claim), and so her surface and a refusal's next moves, offer it exactly as it executes; work/state's claimed/in_progress go through the same claim. - work/claim executes it through airc's claim, which already records ClaimReleased { taken_over_from } by her and then her claim; the previous holder learns of it from that release. The contention refusal path is deleted: ClaimRefusal::HeldByPeer, the "held by peer" message, and the Denied class for it. - Tests: a non-holder's claim on a held card is a takeover naming the holder, offered by the surface, and the events airc publishes for it land under the new owner through the real projection; the claim rules and the refusal classification updated to the rule. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
joelteply
added a commit
that referenced
this pull request
Nov 5, 2026
…ainst the engine's count (live cut-think regression) (#5787) * working_set: an overflow bound is measured, never residency (revert #5773's wish raise) ONE-ACT slice 2 part A (stage 3). #5773 raised her wish AND her residency need to a censored overflow bound; the grant read the bound `within` one sequence, so one mind took the pool (the M5, 2026-11-04 20:15-20:35Z: 125,696 -> {Aiko: 114,592}, three residents dark 20 min). An overflow is first reducible: the view collapses older items to handles. - held_need: `resident_need` (new): the exact held median raised to the irreducible floor, bounds excluded; `need_tokens` stays the typed measurement (Observed / NeedSample, max-with-bound) and says it never authorizes residency. Shared ring split and median helpers. - requirements_for: wish = her measured requirement, unraised; need = resident_need, Exact. - Observed::transpose: its only caller is gone, deleted. - Test: the 114,592 bound is still measured as AtLeast, residency reads 30,000, no wish raise, no bound reaches the grant (replaces the test that asserted the raise). Follow-up (Codex, stage 4): the bound's consumer is admission's typed growth decision; with no AtLeast reaching LaneRequirement from cognition, Observed::within's bound branch is reachable only from tests and is admission's to keep or delete. No GrowthRequest type added: irreducible growth is today the floor, already exact, and its admission policy is stage 4's. Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * view: a read returns her selection; the newest result is whole or a summary, never a bare pointer ONE-ACT slice 2 part C (stage 2; HER-TOOLS §Answer: the view is the only sizer). - act_observe/page_budget.rs deleted: an unranged read no longer gets `headroom / reads` (a division by a count) stamped on its dispatched copy. Her calls run as she made them. - continuum-hands: PageBudget (file_engine/page.rs), CodeReadParams.page_budget and its answer path deleted; code/read's description says a read without a range returns the whole file. - WorkingMemory::view_headroom deleted (its only caller was the page budget). - prompt/newest_result.rs: Level::Pointer deleted. A newest result over her window goes down its mipmap chain: operation_level's summary, then each coarser `levels::summarize(Shape::Output)` of it (each at most a quarter of the one above), with the note and handle; a chain that ends over the room keeps its coarsest level and the turn is refused for capacity, never sent emptied (goal 7). Probe gains `depth`. - continuum-context levels: Output's ends fall back to head/tail by characters when no line is a keepable unit (one compact JSON line), so such a result has a level at all. Tests: levels `a_single_line_output_keeps_its_ends_by_characters`; prompt_shaping `a_result_whose_summary_is_still_over_her_window_comes_in_coarser_never_a_pointer` (423k-char build log at a 30,000 window: content from both ends, handle, below the first summary, no capacity error). Not in this commit (part B, design note): older reconstructible items already go to a level at a turnover (View::turn_over); the per-act prompt-token measurement over a recorded coding sequence needs the one allocation as a continuum-context policy (part B) to drive recorded items, so it lands with B. The replay example's `--paged-reads` variant still models the deleted page budget as a counterfactual; staged_evidence_page.rs's comment names card 441af5ec's now-void plan. Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * prompt: the fit prices at her measured density's bound, both ways, never only the bytes/3 guard ONE-ACT slice 2 part D. On the M5 (2026-11-04, `delib.prompt.density`, n=131) the bytes/3 guard read HIGH by 14% on average and up to 22% (Aris 13,449 estimated, 11,111 counted), and its densest ratio was 0.99: wasteful and not safe. The engine's count was retained per reply, but `charge` never priced below the estimate, so a lighter density changed nothing. - types.rs: `Density`, a ring of (estimate, engine count) per reply over RECENT_TURNS; `observe` returns the next ring, its PRICE (the densest ratio in the ring, compared exactly) and a typed `DensityReading { mean_milli, bound_milli }`. `charge` / `prompt_budget` are plain two-sided ratios; `PromptCalibration::observed` (a refusal's or refit's price) clamps at the estimate, so a refusal still only raises the price (its old behaviour, exactly). - view.rs: `learn_prompt_density` observes into her density on this binding and stores its bound; the probe adds density_mean_milli / density_bound_milli. `density_on(binding)`: the ring her feedback carries when it applies to this binding. - contribute.rs: a refusal's feedback carries her density through. - The engine's refusal stays the final authority on fit: `InferenceError::ContextExceeded { requested, available }` already exists and refits at the refusal's price. Tests (types.rs, its one test mod): the window admits >= 13% more estimate at the measured density than unmeasured (Aris + two samples at the day's mean); the bound charges every recorded prompt at or above the engine's count, the 0.99 case included; a dense prompt ages out of the ring; a refusal never prices below its estimate and a zero count measures nothing. Not done (follow-ups, named): - GUARD_CHARS_PER_TOKEN is NOT deleted: it remains the estimate's unit at every faculty site (fit.rs:17,26,380,647; epoch.rs:74; types.rs for_input; llm_deliberation_faculty.rs:38; newest_result.rs; segments.rs; system.rs) and outside the view (continuum-prompt context_budget.rs, continuum-engine serving_guard.rs, continuum-mind awareness.rs, tool schema pricing). The density now corrects that unit both ways at the one place every claim is charged (`charge` / `prompt_budget`); deleting the unit is the bytes-and-density migration of those sites, one owner in continuum-base token_estimate. - Unmeasured (no reply yet on this binding) still prices at the estimate itself (PromptCalibration::default()); the typed first-act answer is one engine /tokenize count or the model's measured density on the node. - Integration tests through `contribute` with HeuristicInferenceAdapter now learn its count (chars/4 + 1, ~0.75 of the guard) as a lighter density from the second act; any test that pinned exact grants across two acts may move. Not run here. Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * flex: the one allocator moves into continuum-context (pure move; RagSourceBudget -> FlexClaim) ONE-ACT slice 2 part B, step 1 (MIND-CONTEXT's module table: "flex moves into continuum-context as the one allocator"). Its only production callers are the deliberation faculty's prompt allocation; nothing else in grounding used it. - continuum-context/src/flex.rs: flex_allocate, turn_need, FlexClaim (was RagSourceBudget, a misnomer: the claims are framing, reply, tools, view sources, not RAG sources), SourceAllocation, AllocationState, FlexAllocation (+ `of(id)`). The algorithm is unchanged; its `expect` on the input-order report is gone (the report starts filled). - flex/tests.rs: the allocator's ten tests, moved from continuum-grounding rag_budget/tests.rs. - continuum-grounding: flex_allocate.rs and the four types deleted; StubRagSource keeps its own file (stub_source.rs); its test stays. - continuum-cognition: every reference migrated to continuum_context::flex. - source-hygiene self_sized: ALLOCATOR is continuum-context/src/flex.rs (and flex/). Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * allocation: an act's one allocation, run once, in continuum-context; side budgets and two runs deleted ONE-ACT slice 2 part B, step 2 (stage 2: the one allocation run ONCE per act; MIND-CONTEXT's "flex moves into continuum-context as the one allocator"). continuum_context::allocation (new): - `allocate(window, ActClaims) -> ActPlan`, one flex_allocate. Claims: framing, required input, NEWEST result (floor: its coarsest level with its handle; min = want: whole, so it is whole whenever the window holds it, goal 7), tools, grounding (optional, floor 0, min = the standing minimums), history (floor = her last move), the reply (floor capped by the other floors, its uncapped floor kept as her need), each view source `view/<source>`. - `ActPlan`: granted, claims (the receipt), view_granted, room, start_room (her view's start as if the reply held its want: arithmetic replacing the second allocation with the reply seated at its want), shed_view_sources, held_need, irreducible, irreducible_shortfall. - `IrreducibleShortfall { needed, window }`: required floors past the window, typed apart from a view that outgrew its grant (reducible: a turnover, recorded as her censored need, never a grant). - `start_shares(start, &[StartSource])`: a start's per-source shares by arithmetic on the one plan (floors, fixed sources to their grant, the rest by what each lacks), replacing the third flex_allocate inside `start_grants`. - fixtures.rs: `item` and `Fake` (moved from view/tests.rs, now shared; `Fake::shaped` gives items their output summary level). continuum-cognition, deleted: `after_reserves`, `view_floor` / `irreducible_room`, `grounding_budget` / `payload_overflow`, the separate `fit_newest_result` room arithmetic, `seated_at_want`, the `start_plan` run, the inner flex_allocate in `start_grants`, the grounding soft floor's `after_framing / 2`, the grounding's expansion into leftover window (it fills its own grant), FLEX_* ids (now `allocation::id`). - view.rs: claims built once; her newest result is fitted to its grant; the grounding plan is fitted to its grant (shedding, never refusing); `delib.payload.over_window` fires on the typed IrreducibleShortfall; `delib.window.flex` reports the newest claim. - newest_result.rs: `newest_result_floor` (the coarsest level's cost, no probe) and `fit_newest_result(prompt, room)` share one `level_newest`. - epoch.rs: `fit_view(prompt, view, &ActPlan, calibration)`. - self_sized: TURN_ALLOCATION is continuum-context/src/allocation.rs; the faculty calling the allocator directly is now a violation (test pinned). Tests (continuum-context allocation/tests.rs): newest whole when the window holds it, coarsest floor when not; required floors past the window are an IrreducibleShortfall; a pass and the act after it start her view alike from one plan; start_shares keeps floors and grants; `reproduction_7_...`: Aris's recorded items (44k-token view, 17k/43k-char appends, 9 acts, her 55,672 window) through the one allocation and the view: every prompt fits, her newest item shows, her oldest read is never kept verbatim, no grant growth, and a per-act table of verbatim vs view prompt tokens and prefill (--nocapture). Numbers not reported: not run here. Behaviour that moves (named for review, not run): grounding no longer takes leftover window beyond its grant; the newest result's reduction is now decided by the min pass (with history's floor among the floors ahead of it); a start shares the growing room by what each source lacks rather than by equal-priority flex growth. Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * review gates for #5779: density typed per served model, safety stays the engine's count; C proven at the boundary Codex's gates on slice 2 (D and C), folded in after part B. D, the density: - `Density` is a typed state: `Unmeasured` (no reply on this binding and model yet: priced at the estimate itself) or `Measured { served, samples }`. Its ring is keyed by the model the engine reported serving each reply (`TextGenerationResponse::model`, passed in by contribute): a reply from another served model starts a fresh ring. Named limitation: no engine-reported tokenizer or chat-template revision reaches this seam; when the fork reports one it joins the key. A binding change (adapter, model, window) already drops the ring with its feedback. - Documented in the type: Density is PROMPT bytes per prompt token for sizing her text, never KV bytes per token. The compile-level separation is visibility: it is private to the deliberation faculty, so no capacity/grant/footprint crate can name it; what it converts is tokens, and her need is recorded in tokens, never converted to bytes. - Documented: the ring's bound is an observed envelope, not a proof; the SAFETY authority is the engine's exact count of the finalized request before generation (`/input_tokens` as `PromptCount::Measured { prompt, reply }`, unchanged), whose ContextExceeded refits her first. - The "14%" is stated as an estimate correction in the sample, never as useful context or acts/hour (doc and test text; bad9f451d's message said "left 14% of every window unused" and the test name said "admits more": both are estimate statements, corrected here). - Tests: `a_denser_reply_is_covered_within_one_reply` (a light ring, then one 0.99 reply: the next price covers it); `another_served_model_starts_a_fresh_ring`; window_feedback `a_prompt_denser_than_her_measured_density_is_refit_before_generation` (sparse history at 3/4, then the engine counts a prompt that alone fits but with her reply does not: refused before generation, refit once smaller, refit + allowance within the window at the refusal's price, allowance at least the reply floor). C: - an_action_result_cannot_mute_a_citizen: the coarser newest result is SEMANTIC (every shown line besides the note and markers is a line of her result) and names the handle her act's whole is saved under (byte-identical reopen pinned by spill_then_resolve_round_trips). - continuum-hands filesystem tests: `a_read_returns_exactly_the_selection_asked_for_whole_or_its_range` (5,000-line file: unranged = every line; 2,400-2,402 = exactly those three numbered lines). Not compiled (serving node, edit-only task). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * self_sized: the Aris receipts become a recorded fixture; levels derive their ratio and indent CI on #5779 (164e0a653), source-hygiene self_sized: 6 sites in touched files. Fixed, not exempted. - continuum-context allocation/tests.rs: ARIS_VIEW_TOKENS, ARIS_WINDOW, HEAD_CHARS, REPLY_TOKENS (and the rest of the recorded inputs) move to allocation/2026-11-04.json, the dyno's shape ({value, receipt}, `aris_view` as fable/dyno capacity/dyno/2026-11-04.json records it), loaded by include_str! into a typed `Recorded`; every fact must carry a receipt. A copy, not a share: that file lives in continuum-engine on fable/dyno, not on this branch. - continuum-context levels.rs, both constants gone, derived: - LEVEL_RATIO (each level <= a quarter): a budgeted level (Output, List) is now the rung between the item's floor (its own elision marker, the least that still carries content) and its whole: their geometric mean. Summarizing a level again is the next rung; the ladder converges on the floor and ends when nothing smaller carries content. A level is offered only when it is smaller than what it stands for: `levels::is_a_level`, the one rule (ledger.rs's multi-part receipt summary now uses it too). The list head reserves its marker. - DECLARATION_INDENT (4): the file's own indent unit, the most common positive step between consecutive lines' leading spaces; tabs are one level each. A declaration is depth <= 1. - Tests: `the_indent_unit_is_the_files_own` (2-space, 4-space and tab files keep the method and elide its body; a fixed 4 kept a 2-space body); `a_ladder_of_levels_reaches_the_floor` (strictly shrinking rungs, more than one, terminating near the marker, the first keeping both ends); existing outline / single-line tests assert `is_a_level` in place of the ratio. - examples/summarize.rs and replay/outline.rs: the ratio references removed. Behaviour that moves (named): Output and List summaries are now geometric rungs, much smaller than a quarter for large items (a 400k-char log: ~4.3k chars rather than up to 100k); the view's allocation chooses among whole, rung and pointer as before. Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * CI on 5b5d25e4a: the newest result is a discrete level choice; a level carries content; the density fixture checks the price `lib tests continuum-cognition`: 912 passed, 3 failed. Each was a code defect or a wrong fixture precondition, named here. (1) capacity_and_wire::prompt_preserves_stimulus_and_large_action_on_the_wire ("room updates must survive"). Cause: allocation.rs (8c1a21547) made the newest result a SPAN claim, floor = coarsest, min = whole, at priority 10. When its whole could not fit (the 17k-token stimulus is required beside a 22k-token result on a 32,768 window), the min pass gave it EVERY token left; the view then showed the largest level under that grant and the rest was wasted, so her view's sources (the conversation, where room updates live) got only their floors. Fix, in the claim shape: `Newest { levels }` (each level's cost, whole first); the one allocation chooses the largest level that fits beside every other floor (the reply's need included), else the coarsest, and claims exactly that (`ActPlan::newest_level`). What the level leaves goes to her view. - newest_result.rs: `newest_result_levels` records each level's cost from the same descent `fit_newest_result` takes; the note no longer prints the room, so a level costs the same priced or shown. view.rs fits the result to the chosen level's cost. - Test: allocation `the_newest_result_is_the_largest_of_its_levels_that_fits_and_the_rest_reaches_her_view`. (2) window_feedback::a_prompt_denser_than_her_measured_density_is_refit_before_generation ("5638 then 5638"). Cause: the FIXTURE's precondition was wrong, not the wiring. Her view is an epoch that only appends, so a lighter price does not regrow a view that already fits; the estimate correctly stayed at 5,638. The precondition now asserts what the act learned, the price (`prompt_fit` charges an estimate below itself); the refit assertions are the real check. (3) working_memory a_batch_receipts_summary_keeps_every_operation ("the later error survives"). Cause: levels.rs (5b5d25e4a), the geometric rung had no lower limit: a batch's short error body (~60 chars) got a "level" of 3 characters at each end of its marker, losing the operation's outcome. Fix: a level carries content: each end char_ends keeps, the lines line_ends keeps, and the entries head keeps must be at least as long as their own marker; else the item is its own smallest level (kept whole). The ladder then ends at about three markers, never below content. - Test: levels `an_operations_short_outcome_has_no_level_below_itself`. Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * cognition: Density::samples is read only by the ring's tests, so it is cfg(test) (warning ratchet: dead_code types.rs:156) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * allocation: optional claims shed before her newest result or her reply's need (Cormac on #5779, goal 7) Cormac's finding: `allocate` chose the newest result's level against `turn_need(&all)` plus the reply's floor, and `turn_need` sums EVERY floor, the optional ones included (grounding, history, every optional view source). So enrichment and older history pushed her newest result to a summary on a window that held it whole: allocate(15_500) with levels [9,000, 2,000, 900] chose level 1 (2,000) though the required floors 6,300 + the whole 9,000 = 15,300 <= 15,500. - The level is chosen against the REQUIRED floors and the reply's need only; optional claims shed in the floor pass, which is what optional means. - The same defect in the reply's floor cap, fixed the same way: it was capped against every floor, so in Cormac's case the reply was cut to 200 of its 800 while optional history and view kept theirs. It is now capped against the required floors (her newest result at its chosen level among them): it never takes from a required floor (the 8,192-window refusal at 275 of 0), and an optional floor sheds before it. - Tests: `optional_claims_shed_before_her_newest_result_is_shown_smaller` (Cormac's case: level 0, 9,000 granted, history + grounding + view within the 200 left, no shortfall); the 12,000 case keeps level 1 (6,300 + 9,000 > 12,000), its comment now counting required floors only. Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * allocation: her last move is a required claim; the rest of history is optional and sheds first Coordinator's decision on the trade-off named in 1a744dbdf (goal 7: the newest complete interaction is whole; ONE-ACT stage 2: her required working set is whole). Her last move (her newest complete act and its result, what history's floor was) was the floor of an OPTIONAL history claim, so a tight window could shed it before the reply's need. - continuum-context allocation: `ActClaims::last_move`, a required fixed claim `last_move`, beside `history`, now the optional rest of the fresh tail (older acts, facts, the clock), both built from the same source in the faculty. One claim per role. Her last move counts among the required floors the newest result's level and the reply's floor are chosen against. - view.rs: `last_move` = the recent-move evidence floor; `history` wants the rest. Every reader of the fresh tail's grant (the message budget, the budget ledger, the flex probe) adds both. - Tests (allocation/tests.rs): - `on_a_tight_window_her_last_move_and_reply_floor_survive_and_optional_claims_shed`: on 6,600 (required 6,500) her last move is whole, her reply keeps its floor, the optional view source sheds below its floor and older history gets at most the 100 left. - `the_newest_result_is_whole_at_the_exact_boundary_and_the_next_level_one_token_under` (Codex): required floors + reply floor + the whole newest result = the window exactly (15,500): whole; 15,499: the next level. - Cormac's 15,500 case still yields level 0; her last move is 200 and the optional claims 0. The 12,000 case keeps level 1 (6,500 + 9,000 > 12,000); comments count the last move as required. Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * view: a view the one allocation granted nothing is held, not shown; required content keeps its room CI on e33bcf7bd: capacity_and_wire::an_8192_window_keeps_required_content_under_a_large_measured_need refused with `PromptCapacityError { required_tokens: 275, budget_tokens: 0 }`. Cause: 1a744dbdf (allocation.rs, `allocate`) caps the reply's floor against the REQUIRED floors only, as decided (optional claims shed before her reply's measured need). On an 8,192 window with a 9,000-token measured answer, the reply then takes every token the required floors leave, and her view's optional sources are granted 0. `fit_view` (prompt/epoch.rs) kept the held view in the prompt whole whenever nothing was allowed (`turnover_due`'s `allowed == 0` guard: never start her view empty), so the view took the room the allocation had given her required input, and the tail fit (`fit_messages`, budget = msg_budget - the view's cost) refused 275 of 0. The allocation was right; the view ignored its grant of nothing. Fix (epoch.rs, `fit_view`): when the act's one allocation grants her view nothing (its sources' grants plus the room no claim took is 0), her held view stays as state (still never started empty) but is not shown this act: its messages leave the prompt, `grounding_at` and the result pointers shift with them, probed as `delib.view.unshown`. Required content (her last move included) keeps the floor the allocation gave it; her reply keeps its measured need. Cormac's and Codex's allocation tests are unaffected (pure allocation). Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * allocation: on an act her view's floor is required; a reply need past the window is the typed shortfall (reverts e0f2a78af) Cormac's decision on #5779 (option B plus the typed shortfall), replacing e0f2a78af. - REVERTED e0f2a78af's "a view granted nothing is not shown" (fit_view, delib.view.unshown). Dropping her view broke append-only (the next act re-prefills all of it, worst on a tight window) and left her acting blind; her view's floor is already its collapsed minimum (handles, fold blocks), so holding it is cheap. - view.rs: on an ACT every view source's floor is a REQUIRED claim (her view at its collapsed minimum), so the reply's want above its own floor never displaces it; the reply gets what the required floors leave (its floor is capped against them, 1a744dbdf). On a pass optional view sources shed first as before. - allocation.rs: `irreducible_shortfall` is the required floors plus the reply's MEASURED need (uncapped) past the window, typed `IrreducibleShortfall { needed, window }` for admission (ONE-ACT stage 3/4: her need grows, a larger window, or she waits). This act still proceeds with the reply at what is left; a cut answer is continued and visible in its receipt. - Test (Cormac's spec): `a_reply_need_past_the_window_keeps_her_view_floor_and_reports_the_shortfall`: 8,192 window, reply need 9,000, a required view floor of 600: the view keeps >= its floor, the reply is granted exactly 8,192 - 6,300 (the required floors), and the shortfall is `Some { needed: 15,300, window: 8,192 }`. capacity_and_wire's `an_8192_window_keeps_required_content_under_a_large_measured_need` is the faculty-level check. Cormac's 15,500, the 12,000, the tight 6,600 and Codex's exact-boundary tests are unchanged in outcome (their reply needs fit, so no shortfall). Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * start: a view start holds every required floor or refuses typed; a cut tool call never runs (pinned) Codex on #5779 at 89b2940bb. Gap: `ActPlan::start_room` subtracted the reply's want beyond its grant from (view grants + room) without protecting REQUIRED view floors. In the 8,192 / 9,000 / 600 case: view 600, reply 1,892, room 0, reply short 7,108 -> start room 0, and at an epoch START `start_shares` could drop the required 600 (a floor that did not fit started its source empty). - flex.rs: `SourceAllocation::required` (the plan reports each claim's requiredness, so no consumer can share a required floor away). - allocation.rs: `start_room` is never below `required_view_floors()`. `StartSource::required`; `start_shares` grants every required floor first and returns the typed `StartRefused { required, start }` when the start cannot hold them (never a silent drop). - epoch.rs `start_grants`: sources carry `required`; the start is at least their floors; a `StartRefused` is probed (`delib.view.start_refused`) and answered with no grants, the view's own typed refusal (GrantMismatch): the turn is refused, the held view stays. - Tests: allocation `a_reply_need_past_the_window_keeps_her_view_floor_and_reports_the_shortfall` now drives start_room + start_shares (her view starts at >= 600); `a_start_too_small_for_a_required_floor_is_refused_typed`; capacity_and_wire `an_8192_window_keeps_required_content_under_a_large_measured_need` asserts her view is shown at its epoch start (that first view starts and sizes her epoch) with no budget fault. Cut tool calls (Codex: an incomplete tool call must never execute): confirmed in verdict/contribute.rs (the `FinishReason::Length` + tool_calls branch, ~:735): every call that reached the output limit is replaced by `tools/<cut at the output limit>` (`CUT_AT_LIMIT_SENTINEL`), which `is_reported_sentinel` never executes and S2 never marks (act_observe/tests/apply.rs pins the latter). Already pinned for a malformed write; now also pinned for a call whose arguments parse whole (capacity_and_wire `a_tool_call_cut_at_the_limit_is_an_answer_cut_held_for_the_retry`, second case). Not compiled here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * start: required means refuse if underfunded, never mint budget; the cause reaches the turn typed Codex on #5779 at d292a92a2: `start_shares` allowed a required floor above its grant, and `start_grants` raised the start above what was available (`max(required_floors)`). - allocation.rs: - `StartRefused` is an enum: `Underfunded { floor, grant }` (a required source the plan granted less than its floor) and `OverRoom { required, start }` (required floors past the start); `needed_and_had()` for the turn's refusal. - `start_shares` rejects both, typed, before sharing anything, and no share ever exceeds its grant (no minting). - `start_room` is never more than the plan has: what the plan granted her required view sources (each up to its floor) is protected from the reply's want; only the rest is reduced by it (the 600 / 1,892 case still starts at 600, now because the plan funded it). - epoch.rs: `start_grants` returns `Result<_, StartRefused>`; its start is raised toward the required floors only up to `available`. `fit_view` returns the typed `ViewSizing { Mismatch, Start }`: the view's closure contract answers grants only, so the refusal is held in a cell and returned in place of the mismatch its empty answer raises (no empty-vector sentinel erasing it). - view.rs: `ViewSizing::Start` is the turn's `capacity_error` (`PromptCapacityError { required, budget }`); a mismatch stays a budget fault. Distinct from the reply-only IrreducibleShortfall, with which an act still proceeds at what is left. - Tests: allocation `an_underfunded_required_floor_is_refused_never_minted` (floor 600, grant 500, start 600: `Underfunded`, not a raised start); `a_start_too_small_for_a_required_floor_is_refused_typed` now expects `OverRoom`; capacity_and_wire `a_turn_whose_input_floors_exactly_fit_proceeds_and_one_token_short_is_refused_typed` (her act's input floors read from the allocation receipt at a roomy window: that exact window proceeds with no capacity error or fault; one token less is a typed capacity refusal, not a fault). a_busy_room_keeps_its_prefix calls start_grants through its Result. Not compiled here. The exact-fit faculty case assumes the assembled prompt costs what its claims' floors priced (template overhead included in `message_cost`); CI will say if it is off by one. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * act room: her measured reasoning plus answer, priced against the engine's count (live cut-think regression) Live on the M5 (2026-11-04 21:31Z-01:09Z, build a95afe3d1, 414 resident acts): 302 acts ended at max_tokens exactly, caps 72-89 while window minus the engine's prompt count left a median 2,517 free; every cut was reasoning only and she looped (83 consecutive cuts). - reply_claim: an act's floor is ONE claim, OutputNeed::act_room (think, raised to reasoning_at_least after a cut, plus answer), never the answer alone; Unmeasured is a typed ActRoom state that reserves nothing, not a number. Upward test: the doubled bound under the measured time term. - view: the recorded floor is act.irreducible() + her measured reply need (COMPLETION_FLOOR_TOKENS deleted from it); an act whose need does not fit is the typed IrreducibleShortfall (#5779's type, reused), refused before any request and parked on readiness: no implicit residency, no retry of the unchanged window. - PromptCalibration: a price below the raw estimate only behind the engine's exact count (PromptAdmission::EngineCounted, from AIProviderAdapter::counts_prompts_exactly); the request carries that guard (admission_window), checked by the engine's quote against HER window; on its ContextExceeded the cap is recomputed once from the exact count (PromptCalibration::counted); an engine that cannot count refuses typed (InferenceError::AdmissionUncounted) and the act is re-priced at the estimate. - think budget: ACT_REASONING_BUDGET (1024) deleted; an act's request carries reasoning_budget = her grant past her measured answer (act_room.rs); the classifier reads the budget sent. - receipt: AllocationReceipt.output_room carries model, cap, think budget, need, density identity and admission beside the build revision; probe delib.act.output_room. - cut note: ReportedNote typed once and answered before the router (no routing.acl.refused, never dispatched); a reported note as her newest result has one level, whole. - moves: request_allowance to act_room.rs; segment attribution out of contribute.rs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * grant lease: a request reserves the grant it was priced against at dispatch; a regrant honors it until its terminal receipt Atlas on the M5 (0b2854327, 01:25Z): rendered against 148,838, re-homed to 40,282 during a 26.3 s lane wait, 139,007 counted tokens sent. RequestAdmission { window, grant, priced } rides the request; lane_send compare-and-reserves her lease (window_grant::reserve) with the engine's exact count after the lane wait, refusing typed (GrantChanged / ContextExceeded at her grant), nothing sent; the serving daemon publishes grants under the reservations, so a shrink defers until the request's guard drops. Cognition re-renders once against the grant she now has. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * dispatch terms: her think budget and admission ride beside the request, enforced by the adapter at dispatch The request type is unchanged (no exhaustive literal across 20 files, distiller.rs untouched): AIProviderAdapter::generate_admitted(request, DispatchTerms, sink) carries the admission (window, leased grant, how it was priced) and the think budget; an adapter that cannot enforce an admission refuses typed. The think budget has one owner, the faculty's measured need (grant past her measured answer; unmeasured, past the smallest usable reply): ACT_REASONING_BUDGET and the quarter-share DELIBERATION_ANSWER_SHARE_DIVISOR deleted; a sensory description does not think. Segment attribution moves to prompt/segments.rs, its owner. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * ratchets: an untagged overflow is never read from its prose; the reservations stay private to the grant owner Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * grant lease: identified by a monotonic GrantRevision per publish, re-issued on a new engine incarnation (ABA closed) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * act cap bounded by her leased and physical window less the exact count and the fork's one free cell; zero is a think budget; lease identity is revision + engine incarnation + grant owner - request_allowance refuses typed (ShortRoom) when the room is below the reply's grant: the grant is the minimum room to keep, never a second maximum (the old .max(reserve) sent caps past the window). The margin is the fork's: /input_tokens counts the template's generation prompt and BOS (handle_count_tokens, tokenize_mixed add_special), admission refuses n_tokens >= n_ctx. - ThinkBudget(u32): 0 is a budget (the fork forces the end tag at once, reasoning-budget.cpp); a mind's turn always carries one, never unbounded. - GrantLease = tokens + GrantRevision + engine incarnation + GrantOwner; reserve compares the identity. - Tests: grant smaller than the slot bounds the cap; a prompt that eats the reserve is re-rendered or refused, never sent past the window; a large write keeps its room while the think stays at its budget; ToolsTrap declared as a fixture in the module wiring guard. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * act_room: the act's room-short and grant-moved refusals move to their owner (contribute.rs stays under 1,000 lines) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * dispatch terms are required of every adapter; grant reservations are fixed claims held to the engine's terminal receipt, on the served incarnation - DispatchTermsPolicy is a supertrait of AIProviderAdapter with no default: the managed engine carries the think budget on the body and reserves the lease; the grid lane forwards the budget on the wire (RemoteInferenceRequest::think -> GenerateParams::think) only to a seat advertising CapabilityId::RemoteThinkBudget, else ThinkUnenforceable; the in-process llama adapter (no reasoning-budget sampler in our bindings) refuses a think budget typed; adapters that never think (Anthropic sends no thinking block, the heuristic and test fixtures) keep any budget and refuse an admission they cannot enforce (generate_without_thinking, dispatch_without_thinking!). - Overcommit: reservations are fixed claims taken off the pool before the policy shares the rest (grant_with_reservations), including a mind absent from the demands; sum(grants) <= pool pinned with pool 100, A reserved 60 and gone, B asking 100. - Custody: a reservation ends on the engine's terminal receipt (the stream's final frame) or a fence; a dropped stream leaves it unresolved, held until her next request on the same engine completes or the engine incarnation changes. - Identity: the lease's engine is the served EngineIncarnation (pid + OS start time + port, the serving layer's served_incarnation), so a restarted pid is another engine. - Bindings regenerated (GenerateParams, RemoteInferenceRequest, ThinkBudget). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * gossip: the beacon's build-digit width has one owner, read by both directions Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * The heuristic adapter's think-budget policy carries its module's test-fixtures gate; drop an unused import and mut (CI: every non-test build of continuum-engine failed) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Drop three imports a non-test build reports unused (DispatchTermsPolicy is a supertrait now; WindowPolicy lost its last use): continuum-core's warning ratchet back to its baseline Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * lease custody: released only on the engine's finish frame; every retry re-reserves before its POST; a receipt releases only its own entry and same-slot predecessors - consume_sse_stream reports a typed TerminalReceipt only when the engine's final frame carried a finish reason; a bare EOF is no receipt, and settle() leaves the reservation held unresolved. - lane_send re-reserves on EVERY attempt (reserve_attempt): the unsent previous attempt releases its own entry, the lease is compared against her grant now, so a retry that lands on a replacement engine with a smaller grant is refused typed with zero POSTs under the old lease. - complete() releases the request's own entry plus UNRESOLVED predecessors issued before it on the same engine AND the same slot (TurnAdmission's pinned slot); a newer entry, or one with no slot evidence, stays held. - Tests: a truncated SSE stream carries no receipt; an older receipt leaves a newer unresolved entry held; a retry on engine B with a smaller grant is refused and nothing stays reserved. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * lease custody: a receipt releases only its own reservation; the lease is bound to the engine its endpoint admission holds - Reservation ids are issued before the POST, so id order proves no engine execution order: a receipt (or an unsent attempt) releases ONLY its own entry. An unresolved reservation ends on explicit evidence: the engine fence today; a cancel receipt or slot-drained observation is the follow-up. Until then a cancelled request holds her grant fixed until the fence. - The dispatch binds the lease to the engine incarnation the request's EndpointAdmission is bound to (its pool ledger's stamped pid + start time, held against replacement by the admission's read lease), never to the published watch: a lease on another incarnation, or none the admission can name, is refused typed before any POST. - Tests: an older request delayed past a newer one's receipt stays held; an HTTP fixture engine counts zero POSTs for a stale lease, a lease on engine B and an unbound admission; the reserve helper's retry test is named and described as the helper-level test it is. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine stamp: every ready shared-pool admission names its engine, owned or adopted, with or without a page ledger The lease binding refuses an act whose endpoint admission names no engine, so the stamp is now the pool's own (KvSlotPool::incarnation), set independent of the page ledger: - owned engine verified ready: llama_server/ready_tail.rs:253 -> slots::stamp_engine_incarnation -> KvSlotPool::stamp_incarnation -> mark_incarnation (before, the stamp lived only in the ledger, so an engine with no page dir or fingerprint was never stamped); - relaunch / replacement: a new pool per engine generation (slots/engine_generation.rs:589), stamped by its own ready; nothing carries over; - adopted running engine: slots/discover.rs:208 marks the pool with the live lane's verified pid + start time before the ledger adoption, so a lane with no page dir is stamped too; - warm-ahead, restore, scratch and borrow admit through the same endpoint pool. Tests: a ready pool with no ledger carries the stamp into an admission; a pool names one engine for life; a replacement pool starts unstamped; a stamped admission on her current lease dispatches with exactly one POST. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * ONE-ACT stage 1/6: a work command's precondition decides both her surface and execution (draft for CI) (#5782) * A busy engine is not dead: page-switch liveness reads the engine's accumulated CPU time, never only a queued /slots (#5772) * engine: busy is not dead - a page switch reads the engine process's CPU, not only /slots A page switch judged engine progress only through /slots, which llama-server answers as a task on its main loop: during one long CPU batch it cannot answer, so a working engine read as stopped -> Uncertain -> quarantine -> replacement, dropping every resident's KV (IntelMac 2026-11-04 16:24:20Z: replaced while its main thread was in update_slots -> decode; every resident then cold-prefilled 24-32k tokens at 20-28 tok/s). - kernel process_tree: CpuWatch / CpuSample, a one-process CPU read through the same sysinfo usage, fenced by pid AND start time (shared same_process with still_present; a reused pid or an exited process is Gone). - turn_admission/page_liveness.rs (moved out of turn_admission.rs with the quiet wait and the receipt wait): PageLiveness folds each /slots probe with the engine process's CPU. Gone -> Stopped at once; CPU spent while /slots is silent -> "processing, unmoved", bounded by the measured unmoved window; CPU flat while silent -> Stopped. HTTP stays the richer signal. - CPU moving without a receipt past that window is PageOutcome::Unresolved: the engine is not replaced on that alone (requires_replacement only for Uncertain), the endpoint retains the in-flight request until its receipt arrives, and the page is held as an uncertain switch leaves it (not resident; a save's page not restorable). - EngineProbe::Stopped ends a wait at once, initial probe included. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * host+kernel: busy is read from ACCUMULATED CPU time, never a usage percentage Window 45 on the M5: CpuWatch read sysinfo's per-process cpu_usage, which on macOS needs the system-wide CPU refreshed with it and read 0 for a spinning process, so every busy engine would have read CPU-flat (stopped) on the IntelMac. - continuum-host process_usage: cpu_time(pid) -> Option<Duration>, the accumulated user + system counter. Logic once in mod.rs; adapters hold only the call: macOS proc_pid_rusage (rusage_info_v4 ri_user_time + ri_system_time, Mach units via mach_timebase_info), Linux /proc/<pid>/stat utime + stime over sysconf(_SC_CLK_TCK), elsewhere None (unknown). - kernel process_tree: cpu_time(identity) -> CpuTime { Used, Unreadable, Gone }, read first and fenced after by pid + start time + zombie (still_present); CpuWatch keeps the last reading and samples CpuSample::Alive { spent: Option<Duration> } | Gone. - page_liveness: busy = the counter advanced (spent > 0); flat = zero; probes carry engine_cpu_ms; Receipt::Unresolved carries cpu_spent. - kernel test asserts the counter advanced after a spin; pid-reuse and reaped-child cases kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: an unresolved page switch holds its slot's custody until the engine answers Codex on #5772 (CHANGES at b20008ed6): Unresolved kept only the HTTP future. The turn's error dropped its TurnAdmission, releasing the lane permit, slot permit, pin and endpoint reader, so a later turn could reuse the slot while the old restore was still queued in the engine (a late restore then overwrites another activity's KV), and a lifecycle transition no longer waited. Codified in the type: - PageOutcome::Unresolved(UnresolvedPage): the in-flight request, #[must_use], consumable only by UnresolvedPage::hold(custody), which moves the custody into the endpoint's paging task beside the request. Released only by the receipt, a stopped engine process (gone or no CPU, fenced by pid + start time; quarantines first) or a condemnation (the replacement's kill is the fence). - TurnAdmission::page_action consumes the admission: a terminal receipt hands it back, an unresolved switch holds it (the mind gate is let go: the mind is not the slot), so the compiler forbids reusing the slot while it lives and a transition's writer waits on its reader. The lifecycle checkpoint (already inside the writer) holds (). - Test through the real admission on a one-slot fake engine: the restore goes unresolved, a same-slot turn and then an engine transition are attempted before the receipt; neither gets in until the engine answers, and the receipt frees the slot and every lane. - turn_admission.rs 1,000 -> 946: the save-size quote moved whole to turn_admission/page_quote.rs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: until_condemned_on is re-exported for the unresolved page's custody, not only tests Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: an unresolved switch lets its slot go only on a verified receipt, a quarantine or a condemnation Codex's follow-up on #5772 (two holes at 279366b96): 1. The held custody read any late reply as a receipt: a transport error became Receipt(0), the body was ignored, and the slot was let go without quarantine. A socket closed under the request, or a body cut mid-way, is not proof the engine ended the switch. - turn_admission/page_receipt.rs: terminal_receipt(), the ONE judge of a switch's reply, extracted from the bounded wait and called by both it and the late path. - Released { Verified(Terminal), Fenced(Quarantined), Condemned }: Quarantined is made only by quarantining the endpoint, so a release without a verified receipt cannot be written without quarantining first. 2. The lifecycle checkpoint's unresolved.hold(()) held nothing durable, and its error alone does not prove the engine retired: the checkpoint's save now stays pending, so its drop quarantines the endpoint as the writer lets go. Tests (the existing fake-engine harness, now with a /slots that never answers): a late reply cut mid-body quarantines the endpoint and no same-slot turn gets in; an unresolved checkpoint leaves the endpoint quarantined. lifecycle::boot is shared (pub(super)) rather than copied. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine test: the cut-reply test waits on the fake engine's own events, not virtual timeouts Window 49 on the M5: a_reply_cut_mid_body_quarantines_before_the_slot_is_let_go read landed == 0. Under a paused clock tokio auto-advances virtual time whenever no task is ready, which runs ahead of real socket IO, and nothing in this test waited for the restore's bytes to reach the fake engine: the virtual 120 s windows could expire, and the assertion run, before the POST arrived (the first custody test only passed because it waits for an admission that needs the real reply). The fake engine now signals `entered` and `cut`; the test waits on them, and on the custody's quarantine, bounded in real time (the socket's clock). It also checks, as the first custody test does, that the restore is unresolved (lane held, not quarantined) before the cut. Assertions kept: no same-slot turn is admitted; the endpoint is quarantined. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine test: the custody tests run on the real clock, each on its own fake engine Window 50 on the M5: an_unresolved_switch_holds_its_slot_until_the_engine_answers (green in windows 48 and 49) failed "the held custody keeps its lane", after window 49 had failed the cut-reply test on its engine counter. Both ran on a PAUSED clock against real sockets: tokio auto-advances virtual time whenever no task is ready, which runs ahead of the IO the fake engine and the paged request depend on, so where a restore was when its bounded wait ended (sent or not, probes answered or timed out) depended on scheduling, and the outcome with it. The lane semaphore is each test's own (admit_turn takes it as an argument), the fakes are per test on their own ports, the CPU seam is keyed by root, and nothing in the binary condemns the process-wide watch, so no shared global was involved. Now: - #[tokio::test] on the real clock for all three custody tests. - The fake's /slots answers at once with one slot processing and no counter moving, so the switch's measured unmoved window ends its wait one checkpoint (~10 s) after it starts: the outcome no longer depends on how probe timeouts race the request. (A silent /slots is tests/page_liveness.rs's subject.) - "Nothing gets in" checks are 3 s real windows; releases have 30 s to arrive. Every reviewed assertion is kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: a page switch reads its engine's condemnation from its liveness; fixtures are never condemned CI on #5772 at d818d9981 (1436 passed, both custody tests failed "the held custody keeps its lane, left: 2", as on M5 window 50). Not ownership: the lane permit is inside the admission that moves into the custody (admit acquires it, turn_admission.rs:319, stores it in TurnAdmission::_permit at :345; retain_paging moves the admission into its operation, paging_lifetime.rs:66; page_action takes `mut self`, :113-114, and hands it to UnresolvedPage::hold, :135; the custody drops it only at unresolved_page.rs:142). The switch never went unresolved: the engine-crate tests share the process-wide condemnation watch. late_ready.rs's tests launch through launch_prepared, whose drain on a fresh endpoint condemns (engine_generation.rs:230, incumbent and generation both None), and only the serving daemon's ready snapshot (continuum-serving publication.rs) recovers it, so after them every restore_probe/engine_probe in the binary read Condemned: the bounded wait ended Stopped, the switch Uncertain, its admission (and lane) dropped and the endpoint quarantined. - PageLiveness carries its engine's Condemnation: Daemon (the process-wide watch) in production, Never for a fixture engine registered with watch_for_test, which no daemon serves. PageLiveness::probe reads it first and does not ask a condemned engine at all. - The page switch's probes read no condemnation themselves: slots_probe (engine_probe without the check; engine_probe keeps it for its other caller) and restore_probe (its one caller). - The held custody subscribes to and checks the same Condemnation. - PageLiveness::new takes the Condemnation; the unit tests pass Never. No #[derive(TS)] type is touched on this branch (diff against canary's merge base). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * engine: the page-liveness fixture seam is gated to this crate's own tests (only they call it), so a test-fixtures build has no dead code Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * Work verbs accept the short ids she sees: Shown<T> from airc_core, typed refusals (#5775) * work/submit + work/review: ids she was shown parse as airc Shown<T> Benchy on the M5 (2026-11-04 17:51:56Z): persona.act.refused command="work/submit" reason=... CommandRequest deserialization failed: UUID parsing failed: invalid length: expected length 32 for simple f... The verbs' submission_id (submit) and review_id / submission_id / review_claim_id (review) were raw Uuid, so the short id every surface shows died in serde before any handler could resolve it. These fields, plus submit's claim_id and review's card_id (both Option<String> through the String-error id_resolve path), now decode as airc_core::shown_id::Shown<T> (SubmissionId, WorkReviewId, ClaimId, WorkCardId) and resolve with Shown::resolve against what the verb already read: the card's own submissions (one helper, submission_named, for both verbs), its claim, the submission's reviews, the room's cards. A full id passes through; a shared prefix is ShownIdError::Ambiguous naming both; junk is refused at decode with the sentence naming the accepted form. Params become Deserialize-only (Shown is read, never re-rendered); TS bindings and schemas are unchanged in type. Tests: submission/tests.rs pins the receipt (short id on submit and review, full id, typed ambiguity, decode refusal names the form); training_credit fixtures build Shown ids from full ids. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work ids: no runtime 'id is required' complaint; tool docs back to canary length required_input_complaints: resolve_shown's empty-string branch is gone. Every caller's field is a non-optional String, and resolve_handle already refuses a blank (or any non-handle) naming the accepted form. prompt_shaping surface ceiling (17487 > 17486): the param doc text this branch added is reverted to canary's wording, so the schema she reads every act does not grow; the accepted form is named by the refusal itself. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * protocol: regenerated WorkSubmitParams/WorkReviewParams bindings (ts-rs, M5 window 51) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work ids: submit claim_id and review card_id back on canary's id_resolve path Cormac's CHANGES on #5775 at 79e9dec89: these two were Strings through id_resolve and should not move to Shown until card 484b000b adds the 8-hex-group form there. Both fields and their handler lines are restored byte-for-byte to canary (String + resolve_shown). Shown stays only on the fields that were raw Uuid: submit submission_id, review review_id / submission_id / review_claim_id. Note for 484b000b: canary's path for these two is resolve_handle (strict), not the repairing id_resolve::resolve, so a one-char-corrupted full claim id was already refused on canary. The new test pins full + shown resolving and the corrupted form refused, naming the card that flips it. The params' struct doc became a plain comment so ts-rs and schemars emit nothing for it (bindings back to canary's bytes, no tool-surface growth). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --------- Co-authored-by: Claude Opus 5.5 <[email protected]> * The surface follows her card's state: one transition table, held moves in hand, her held work as keyed items Residents learned the work protocol by trial because the substrate knew their card state and hid it (the M5, 2026-11-04: Benchy on review card 32d53734 called commands/help 4 times and work/submit 5 times with work/review off her surface; Atlas called work/list 6 times to find where he stood). Plan goal 10 keyed by state, order-of-work line 2. - continuum-rooms card_moves: the board's transition table airc-work lacks. Pure, exhaustive moves_in(CardRole, CardState), held_moves(card, holder), Held. Each move's name is pinned to the registered command's NAME. - Tool surface: the room's declared set (or her core hands) UNION the moves her held cards give her, in canonical order and priced in her claim; ToolsEpoch re-selects only when those moves change (delib.tools.epoch_moves_changed). - Her held work is read once per tick (extensions::held_work, persona::held_work) and carried typed on the Workspace. A native continuum-context Source renders one item per held card keyed by the card, its occurrence (card, state), with "you can: <moves>"; ended and rejected claims are their own items. - Deleted: ActiveWorkSource (RagSource) and its registration, faculty_ids::ACTIVE_WORK and the two predicates that grepped [InProgress] from rendered text (now typed reads), and the active-work special cases in the legacy enrichment walk. AircWorkReader moved to persona::held_work. - docs/architecture/STATE-DRIVEN-SURFACE.md: failure class, five pieces and owners, the table, ratchets, receipts owed. Not compiled (written with serving up); cargo check and tests are owed on a non-serving executor. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * card_moves answers every actor: moves or a typed reason, never a bare empty list Cormac's review of bf114fac1. The table becomes data over (role, state, stance): moves_in(CardRole, CardState, Stance) -> Moves, with Moves::Some(MoveSet) | Moves::None(NoMove). MoveSet is non-empty by construction, so a refusal always carries moves or a typed reason (NoMove::Held { by }, NoMove::Ended(state)). That is the shape his refusal ratchet reads. moves_for(card, actor) reads the stance from the owner. Non-holder rows: Open -> work/claim, unowned working card -> work/claim, another's -> Held { by }, Review not hers and Merged/Closed -> Ended. held_moves is gone: Held reads moves_for, one table and no copy. One test per row, the non-holder rows included. The code/** move is pinned to a registered code/ command (code/run), so the subtree cannot match nothing. A held item with no moves renders its typed reason. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Preconditions are the one owner: each work verb's typed predicate decides execution and the surface Codex's four corrections and the seam he named (Cormac concurring): - Removed the separate move table (card_moves). continuum-rooms work_preconditions holds each verb's PRECONDITION, a pure typed predicate over (card, actor, request). The handlers call it at the mutation boundary against the card as the board holds it now (decide -> Refusal with the refreshed card and her moves now). The surface, her held-work item and a refusal's next moves call it in the any-arguments form. Decisions read the time they are given, never the wall clock. - Checks moved out of the handlers: submit's holder/not-claimed checks and holder_guard (deleted); review's not-a-review-card / held-by-another / named-parent checks; state's open-by-holder refusal and review resume (resumes_held_review moved); claim's holder rule (live_holder -> holder_on_record, matching the projection's on-record rule). work/claim checks claim before publishing; an unowned InProgress card is claimable, proven through the real projection. - work/submit is allowed in Review. An identical submission (same publisher, patch hash, base, instance) answers as success, outcome AlreadySubmitted, naming the existing one; a changed patch submits. - A reviewer holding a satisfied review precondition gets code/** and work/submission (WorkVerb::grants), whatever the room declares. - Held-card occurrence = card + state entry (the board revision at the first read in that state) + rendered content. Heartbeats append nothing; a same-state refusal or a selection switch appends once; a re-entry is a fresh occurrence. Tested through the real View. ts-rs bindings for SubmitOutcome and WorkSubmitResult were hand-edited and must be regenerated. Not compiled (serving up). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * Preconditions compile: Unmet drops Hash, dead claim_card goes, one rejection fact per card - continuum-rooms work_preconditions: `Unmet` derived Hash over airc's CardState, which has none (E0277 at work_preconditions.rs:127/129, the one compile error behind every crate's lib tests). Nothing hashes Unmet; the derive is dropped. - work/review after the rebase onto #5775: her stated review claim resolves through Shown<ClaimId> against the review card's claim, then the precondition decides; the named submission resolves through submission_named against the parent the precondition returned. - AircCitizen::claim_card (trait default, stub and runtime impls) had no caller; deleted with its text match on "[denied]" (error_text_matches ratchet) and the stub's `claimed` recorder. - claim_rejections: the per-persona count cap becomes one fact per card (newest), bounded by the cards she tried inside the TTL; how many cards' facts she sees is her view's budget, each a keyed held-work item (self_sized ratchet). - epoch test: the source order now includes held-work beside the settled blocks, as epoch.rs places it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work_burst renders card ids through shown_form; doc names the owed self_sized sites and the receipts Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo * work/list lists every match; a structured result goes on one record per line - work/list: WORK_LIST_DEFAULT_LIMIT is deleted. Every match is listed …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ONE-ACT stages 1 and 6 (docs/architecture/STATE-DRIVEN-SURFACE.md): her tool surface follows her card's state, and her view carries what the work turn used to paste in. Based on #5779 (fable/one-view).
Preconditions, one owner (continuum-rooms
work_preconditions.rs): each work verb's typed predicate decides both execution and her surface.work/claimandwork/stateon a card someone else holds are attributed takeovers (Joel, 2026-10-06: anyone may take any card at any time); airc recordsClaimReleased { taken_over_from }, then her claim. AlreadySubmitted for an identical patch; a held card is one keyed item; a held review grantscode/**andwork/submission.Her view, sized by the one allocation
tool-outputdisk class; handles are the content hash's address; a read's default tail is the newest lines its budget holds, and a newest line longer than the budget is reported truncated with its offset.Ratchets vs fable/one-view: 0 failures; self_sized 472 → 459, unjustified_unwraps 1841 → 1837, writes_outside_a_class 195 → 193, error_text_matches 28 → 27, hand_built_homes 20 → 19, required_input_complaints 73 → 72, collapse_outside_the_view 1 → 0.
Measured after deploy (owed): the 15-minute live read on the M5 per resident: acts/hour, seconds per act, refused work/* calls, whether she resumes from her own conclusion.
Card 6cd6810f (kernel lock-test flakes, Cormac's), notes from this PR's runs on the M5: these fail only under parallel build load and pass alone; none is caused by this branch.
system_resources::disk_reporters::class_writer::tests::a_held_lock_refuses_a_second_holder: failed 3 of 6 full-suite runs while a cognition build ran alongside; 7 of 7 alone.system_resources::disk_eviction::tests::broker_reclaims_release_incremental_only_after_profile_custody: failed under build load; 3 of 3 alone.system_resources::disk_eviction::tests::serving_tier::a_held_lock_reads_as_contention_and_not_as_an_io_failure: failed once under build load.🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo