Skip to content

refactor(focus): migrate tools and dispatch sources to shared allocation - #5574

Merged
joelteply merged 3 commits into
fable/working-windowfrom
codex/focus-tools
Oct 28, 2026
Merged

joelteply merged 3 commits into
fable/working-windowfrom
codex/focus-tools

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Draft subsystem branch for card23ad5675, based on fable/working-window at f883c28. Advances one shared focus allocation for persistent minds.

First step removes dispatch_listener's live-window head cut: preserve complete string/JSON completion into the working-memory source so its ending is available to the view. Adds a long Unicode completion fixture with a terminal failure message and structured JSON round trip. Diff check passes; Rust execution pending CI.

Not ready for independent deployment: Cormac's companion working-memory storage/levels migration must cover dispatched bodies (currently latest:String, handle-count bound only). Integration stays on Fable's shared branch until the complete migration reaches ratchet zero and passes the dyno.

Remaining in this branch: epoch-stable tools claim (core hands floor, hands plus learned-head want); tool/output independent-sizing removal; ContextBudget constructor consumer migration; focused/unfocused full-demand invariant fixture. Fable owns prompt/view allocation; coordinate its tools-claim seam before modifying shared assembly.

joelteply added a commit that referenced this pull request Oct 28, 2026
… level kept for the epoch (FLOW §2d, FLEX_TOOLS)

On Codex's tools API (#5574, merged into this base): the view prices her hands as the claim
'tools' (priority 7): floor = core hands (unconditional), target = the level this view epoch
already chose (min_tokens, given up only when the window cannot hold it, probed as
delib.tools.epoch_level_lost), want = her whole surface (claim_with_head). The surface is
selected from the grant after the allocation (select_tool_surface_granted); a grant below
core hands is a capacity refusal, never a handless send. The level is retained per view
epoch after fit_view (prompt/tools_epoch.rs), so the schemas ahead of every message stay
byte-identical within an epoch.

One decision: DeliberationPromptView carries the selection (tools) and its grant
(tools_grant); contribute sends exactly that, and a server refusing tail_tools gets the
activity surface at the same grant. Before, contribute re-selected against a window share
(ContextBudget::tool_surface_tokens) the allocation never saw. The pre-allocation room math
subtracts the core floor; the budget ledger's framing grant includes the tools grant.

Production no longer calls select_tool_surface or tool_surface_tokens; their deletion with
the test migration is Codex's slice. Test: an epoch keeps the level its allocation bought.

Uncompiled: built and tested in the next serving-down window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 13ba365 into fable/working-window Oct 28, 2026
13 of 15 checks passed
@joelteply
joelteply deleted the codex/focus-tools branch October 28, 2026 20:29
joelteply added a commit that referenced this pull request Oct 29, 2026
…king window, conversation, tools, grounding, recall) (#5564)

* Her prompt is fitted to a working window sized from the measured prefill rate, not the whole slot: prefill per request ~3x lower on the dyno

ContextBudget::working_window: 2 x INTERACTIVE_TTFT x the measured prefill rate (a turnover's
cold half fits the interactive minute), snapped to 8k so the rate's EMA does not move it act to
act, never above the served slot, the served window when nothing is measured. On the M5 the rate
reads 396 tok/s, so 48k.

The dyno found the same knee independently (continuum-context replay --append-tail 300 over
the residents' own captures): prefill per request Benchy 110 -> 41 s, Aiko 81 -> 24, Aris 113 -> 33,
Atlas 94 -> 20, zero handles dropped; 32k doubled turnovers.
The simulator forecasts model calls 79 -> ~45 s.

- prompt_fit fits to it. The result and room-update shares and the tool surface scale with it.
- The binding keeps the served window (serving reads it). The plan's demand samples are
  unchanged: a trimmed turn already records her untrimmed demand.
- Required input past the working window is fitted to the served window, once
  (delib.prompt.working_window_exceeded), never refused while the slot has room.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* context_budget: the working-window step is an associated constant

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The working window is the dyno's measured knee (48k), not a rate: stable under load, never moves mid-epoch

f45f090a6 derived it from the live prefill-rate EMA. Contention lowered the rate 396 -> 354 tok/s
and briefly lower, so the window moved 48k -> 40k -> 32k mid-epoch: Aris was refused twice at 32k
and epochs turned over 74 times in 37 minutes. That build was rolled back. The knee is a token count
of her own traffic (where turnovers start costing more than the smaller context saves), so it holds
whatever the engine's speed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* An epoch starts her growing sources at a quarter of what grounding leaves, not half: 10-25% less prefill per request on the dyno, fewer turnovers

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The working window's rule is a pure function the test runs at the knee, so the behavior live on the M5 is tested; and it compiles (Codex and Cormac on #5564)

working_window referenced Self::WORKING_WINDOW_TOKENS, a module-scope const: no such
associated item (Codex). The rule moves to working_window_when(served, serving), using
the const directly; working_window reads whether a model is served and delegates. The test
ran only the no-model branch; it now asserts 159,232 -> 49,152, 32,768 -> 32,768 (never
above the slot), not serving -> served, and 0 -> 0.

Not compiled locally (an Intel serving node, empty target); CI is the receipt.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* WORKING_WINDOW_TOKENS and working_window_when are associated items: call them through Self (corrects my f7ebc79 on #5564)

context_budget.rs keeps column-0 items inside impl ContextBudget (lines 85-570), so the
const at 319 and the helper at 323 are associated. b1acb40's Self::WORKING_WINDOW_TOKENS
was right; the 'module-scope' reading (Codex's, and mine in f7ebc79) was wrong, and
f7ebc79 broke the build (CI: E0425 cannot find WORKING_WINDOW_TOKENS / working_window_when,
'consider using the associated constant on Self'). The pure helper and its four asserts
stay; they now call Self:: and ContextBudget::.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

* source-hygiene: prompt_self_sizing ratchet counts every prompt-content size decided outside the one flexbox allocation (~40 today; may only fall; deleted at 0 when the sizing methods go private)

FLOW-IMPLEMENTATION-PLAN §2d. Predicate tests: recall's from_window(...).recall_tokens() and
compose_for_turn's adapter.allocate(...) count; the allocation in prompt/view.rs and the
definitions in context_budget.rs do not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Flexbox compliance step 0: the unused tool catalog (authorized_tool_catalog, tool_summary, ToolCatalogEntry) and its catalog_summary_chars fraction are deleted

No caller anywhere; the fraction existed only for it (prompt_self_sizing -1).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* refactor(focus): preserve dispatch completions for view allocation

* continuum_context: an item's whole may be stored, not resident (residency is not visibility)

Item.stored: Option<StoredWhole { chars, handle }>. The allocation prices a stored whole from its
measured size (whole_chars) and never reads it; only an item granted WHOLE is loaded, through its
own source's Source::load (default None: a source that spills bodies overrides it). Evicting a body
from RAM no longer changes what she can see (Cormac's proposal on FLOW plan §2d). Every literal Item
construction carries stored: None; Item::whole for the common case.

Uncompiled: built and tested in the next serving-down window with the conversation step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* feat(focus): expose grant-based tool levels and invariant demand

* feat(focus): pass epoch tools grant into learned-head selection

* Focus, conversation step: airc delivers every turn whole; her cursor moves on the read receipt of a sent prompt (FLOW §2d)

The airc source no longer sizes the conversation. Deleted: the per-turn cap and its head cut,
the anchor/natural/HISTORY_SLACK second view, grounding_for_budget (the staged depth is the
recipe grounding, at least the fetch window), and mark-read at delivery. pack_digest becomes
digest_items: receipt runs folded, quarantine kept, every unit whole. Her one view decides
what she sees.

Mark-read moves to after a sent prompt: BurstTurn carries its TurnSource {room, event,
lamport}; the view keys room turns by event (fixes same-ms/author key collisions);
View::renders(source, key) answers whether her view shows an item (collapsed = not read);
the deliberation faculty's ReadReceipt hook (read_receipt.rs) marks each room read through
the newest event the accepted prompt rendered. The supervisor installs her airc source as
the receipt; forks and evals mark nothing. A refused act or a collapsed turn stays unread,
and rag_inspect no longer moves a resident's real cursor.

Staged-digest reuse: served only when it holds at least what a rebuild would (the room's
events after any top-up), replacing the budget-derived proxy.

Codec: Item.stored (db36673) compiles; whole() keeps the start loop's fingerprint key.
Tests: codec renders/stored-whole contracts; whole delivery at any budget; delivery marks
nothing read and the receipt marks exactly the named event; rewritten packing pins.

Local, 19:53Z serving-down window on the M5: check --tests ok (context, cognition, mind);
context 35/0, cognition 1199/0, hygiene 69/0, mind 848/1 (serves_prestaged_digest: fixed by
the reuse rule above, re-run in the next window).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Focus, tools step: her hands are one claim in the one allocation, the level kept for the epoch (FLOW §2d, FLEX_TOOLS)

On Codex's tools API (#5574, merged into this base): the view prices her hands as the claim
'tools' (priority 7): floor = core hands (unconditional), target = the level this view epoch
already chose (min_tokens, given up only when the window cannot hold it, probed as
delib.tools.epoch_level_lost), want = her whole surface (claim_with_head). The surface is
selected from the grant after the allocation (select_tool_surface_granted); a grant below
core hands is a capacity refusal, never a handless send. The level is retained per view
epoch after fit_view (prompt/tools_epoch.rs), so the schemas ahead of every message stay
byte-identical within an epoch.

One decision: DeliberationPromptView carries the selection (tools) and its grant
(tools_grant); contribute sends exactly that, and a server refusing tail_tools gets the
activity surface at the same grant. Before, contribute re-selected against a window share
(ContextBudget::tool_surface_tokens) the allocation never saw. The pre-allocation room math
subtracts the core floor; the budget ledger's framing grant includes the tools grant.

Production no longer calls select_tool_surface or tool_surface_tokens; their deletion with
the test migration is Codex's slice. Test: an epoch keeps the level its allocation bought.

Uncompiled: built and tested in the next serving-down window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Remove independent tool-window budget after shared focus integration

* Focus, grounding and recall step: sources deliver every item at its levels; no source takes a size (FLOW §2d)

RagSource::deliver(ctx) takes no budget and no resolution; floor_tokens and budget_claim
leave the trait. RagItem gains a stable key and summary/pointer levels (RagItem::whole,
with_summary, with_pointer); RagDelivery::of/empty; old captures still read.

All 11 production sources migrated: no packing to a budget, no head cuts (doctrine, map,
wall), no 12-card cap (board), no budget-coupled state (active-work loss notice). The 7
grounding faculties no longer cut to a quarter of the window each (grounding_budget_for,
with_budget deleted); the contribution carries the source's units and her view's block
takes whole/summary/pointer from them (context_streams/blocks.rs). Recall drops its
window-share token ceiling (the measured count-by-capability ladder stays) and gives each
memory a gist and a handle. compose_for_turn's second flexbox is gone: it delivers airc and
the roster whole.

Deleted as dead: FlexboxRagBudgetAdapter, RagBudgetAdapter, ReservedTokens,
BudgetAllocation, ResolutionPreference, RagSourceBudget::retrieval/floorless_share,
ContextBudget::grounding_tokens/recall_tokens, EngramSource (its delivery was read by
nothing), RoomRosterSource (no production constructor), the BudgetAllocated capture event,
rag-inspect's allocation (inspection is now side-effect free).

Fixed: the awareness strip never reached her prompt (bound only to compose_for_turn, whose
delivery of it nothing read); it is now a grounding faculty.

Uncompiled at this commit; built and tested in the next serving-down window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Focus: compile fixes from the 20:19Z window; delete what the migration left dead

Typed literals in the ported allocator tests; Contribution literals carry units; the refit
fixture takes an empty tool surface (SelectedSurface::none is pub); the wall tests' stray
brace. Deleted: viewstate_rag's private estimate_tokens (a second chars/token estimator) and
roster_slot_from_member (only the deleted legacy roster used it).

Local, 20:19-20:25Z serving-down window on the M5: check --tests ok (context, cognition,
mind, academy, core); tests context 35/0, cognition 1199/0, mind 1138/0, academy 190/0,
source-hygiene 69/0 (new tests confirmed in the logs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Focus: room updates are conversation turns in her view; the inert reply-size default goes

Room messages that arrived during a turn rode the fresh tail as required input under a
quarter-of-the-window share (ROOM_UPDATE_SHARE_DENOM, split_room_updates): a second budget.
They are conversation turns now, keyed by their airc event after the burst (one already in
the burst keeps its place), so they append to her view like any turn and can never inflate
the required input (the 2026-09-09 mute: 53k of room payload on a 23k window). The read
receipt counts a room update only when her view shows it. Deleted: split_room_updates,
ROOM_UPDATE_SHARE_DENOM, PromptMessages.room_updates, RequiredParts.room_updates/_count.
Tests: the busy-room test keeps its no-mute guarantee and checks the updates ride her view.

SamplingProfile.max_new_tokens and its window-derived default were read by nothing (reply
length is the reply's claim in the one allocation): deleted, with
ContextBudget::default_response_tokens; TS binding updated. Orphaned RagInspectAllocation.ts
removed.

Uncompiled at this commit; built and tested in the next serving-down window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Use shared allocation receipts instead of rereading tool affordability

* Describe tool receipt against shared allocation

* Focus: an unread room update keeps a handle in her view, so one larger than her window never vanishes

As a conversation turn, a room update had no pointer level: one too large for her window
would leave her view unseen (it used to refuse the turn). Turn gains an optional pointer
that only room updates set: peer and event (shown_form), its size, and chat/history to
reread it. The burst's turns are unchanged (collapsed, they leave the view; the room's
history holds them). Not rendered whole, the update is not marked read.

Tests: the capacity test's room-update part now thinks instead of refusing and asserts the
handle reaches her prompt; only the oversized stimulus still refuses.

Window 20:29-20:31Z on 13ba365: check ok; context/mind/academy/hygiene green; cognition
1196/1 (this test, fixed here).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Focus: room updates get one index line that never collapses, not a handle each

A handle per update put every update in the conversation's floor and crowded out the
newest (the busy-room test: 40 handles took its room). Updates keep no pointer; one index
line after them (its own pointer) says how many arrived and to reread any not shown with
chat/history, so an update too large to show is never unknown and the newest keeps its
room. Capacity test: part 2 reaches the model, so its script carries a response.

Window 20:33-20:35Z on e687458: cognition 1195/2, the two tests this fixes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Card ids in the board, active-work and wall sources use airc_core's shown_form, never a hand slice

Eight hand-built 8-char prefixes (to_string().chars().take(8), simple()[..8]) become
shown_form, the one producer of the short id (same 8 hex, so the readers that decode these
lines are unaffected). Uncompiled; rides the next window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Focus, act_observe: her echoed args fold at a fixed rule; a settled reply reaches working memory whole

ContextBudget::echoed_arg_chars (a 64th of the window) sized how much of the arguments she
wrote is echoed in a result's header, and her intent line. Her tool call already carries
them whole, so this is a rule for showing her own words: ECHOED_ARG_CHARS, the fixed 600 it
was before it became a window share, beside recall's fixed 80. render_recency and
render_summary_part drop their budget parameter (callers in apply.rs, working_memory/ledger.rs
and two tests updated). settle_step recorded the head of her settled reply cut at
trail_head_chars; it records the whole and the trail's levels in her view decide.

Uncompiled; rides the next window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Focus: a tool result's custody is storage only: saved whole, handed back whole, her view chooses the level

The executor took a size (latest_action_chars, a window share; 8000/16000 elsewhere) and
spill's whole_or_handle cut any result over it to a head plus a handle at execution, before
her view's one allocation saw it. Now every result is saved whole and handed back whole with
its handle (RetentionFailed still carries the whole when the save fails); what she sees is
her view's levels for results, and RAM is working memory's storage bound (Cormac, #5573).

Deleted: Fitted::Stored, head_of, HEAD_SHARE_DENOM, the tool.output.spilled probe, the
share parameter (whole_or_handle, whole_or_handle_in, unsaved_whole), max_result_chars on
execute_native_batch(_pinned) and every implementor/caller, OBSERVE_RESULT_BOUND, apply.rs's
budget lookup. Test: a small and a 5000-line result both come back whole with a handle that
resolves byte-identical; a failed save still carries the whole.

Uncompiled; rides the next window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* StoredWhole ships with its first caller (#5573), not here; result_summary drops its unused budget

The unwired-machinery ratchet rose 42 -> 43 on this PR: the deferred-whole seam had no
constructor outside a test until Cormac's #5573 wires it, so the type, Source::load and
its test move to that PR with their use. The warning ratchet rose 13 -> 14 on the budget
parameter result_summary stopped reading.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* A result header and an open-view note size nothing: shape rules replace the echo bounds (one budget)

Joel: "I need complete purity." The context-budget guard caught ECHOED_ARG_CHARS = 600, and
ContextBudget::echoed_arg_chars (a 64th of the window) still sized the open-view note: two
readers deciding their own length.

- render_call_args: a single-line argument (a path, an id, a flag) shows whole; a multi-line
  body she wrote in the call is named by shape and hash (<N lines, M chars, #h: in your call>),
  because her own tool call already carries it. No size threshold anywhere.
- intent_label: the intent's first line, for the result header and the open-view note (the
  note was also a head cut of the whole intent).
- Deleted: ECHOED_ARG_CHARS, ContextBudget::echoed_arg_chars, clip_intent, the note's max_chars.
  The self-sizing ratchet keeps .echoed_arg_chars( so it cannot return.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The withheld-hands test asks with the work turn its window is calibrated on

Under the one allocation a smaller turn leaves room and her hands fit, which is the
allocation working, not a withheld surface.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* Her view gives back what a squeezed start collapsed, and a kept tool level is never a minimum

Live on the M5 (Aiko, 2026-10-29 15:49Z): her last fifteen results were handles in a 42k-char
prompt on a 55k-token window, so she re-read what she could not see. Two defects in #5564:

- The tool claim's minimum was the level her epoch kept, re-priced at the current calibration:
  after a refusal scaled it 1.9x, her tools took 22,167 of 29,440 tokens ahead of her whole
  conversation. The minimum is now her core hands; priority decides the rest, and a grant
  below the kept level is a surface change the epoch_level_lost probe reports.
- The view only appends, so items a squeezed start collapsed stayed collapsed while the window
  had room. View::start_would_restore asks whether a start under today's grants would show her
  more than the epoch holds; a fitting view turns over when it would, never otherwise.
  Test: a_start_with_room_restores_what_a_squeezed_start_collapsed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* A level replaces its pointer, so an item smaller than its own pointer gives the difference back (levels accounting)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* A start never collapses her newest end: the newest item is covered, and an epoch that turns over next act anyway holds no reserve

After a scaled calibration, re-entering a 160-turn room appended more than the growable room,
and the start still kept half back for growth the next act could never use: 1,887 chars,
less than one 2,040-char turn, so her history rendered empty. Such a start now takes the whole
growable room, and every start covers each growing source's newest item whole when it fits
(Claim::newest_chars).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* start_would_restore returns the typed GrantMismatch, never a quiet "nothing to restore" (Codex on #5564)

The fit says it like a turnover's refusal (delib.view.refused) and keeps her view. Regression:
an allocator answering for no sources is Err(GrantMismatch { claims: 1, grants: 0 }).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* A view that cannot be sized refuses the turn: GrantMismatch reaches budget_fault, never a prompt sent anyway (Codex on #5564)

fit_view and turn_over_view_with return the typed mismatch; the prompt assembly turns it into
the turn's budget_fault, which contribute refuses before dispatch. The held view stays as state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* A test drives the real boundary: an allocator answering for the wrong sources refuses the turn before dispatch (Codex on #5564)

Test seam: SHORT_GRANTS (cfg(test) thread-local) makes start_grants answer for one fewer source.
an_allocator_answering_for_the_wrong_sources_refuses_the_turn_before_dispatch asserts the
contribution is a fault naming the unsized view and the adapter is never called.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The context-codec rule types are private: used only in their own file, pub made them unwired machinery (43 vs 42)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

* The roster's RagRenderable projection is its own module (viewstate_rag/roster.rs), beside the generic adapter

The adapter and each kind it renders are separate concerns; the roster now constructs
RagRenderUnit outside the adapter's file, so the unwired-machinery ratchet no longer counts the
unit type #5564 gave a constructor (43 -> 42).

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant