Repository navigation
feat(cognition): the render receipt names the tool surface's reason and the affordable prompt (card 3026b83e, step 1) - #5122
Merged
joelteply merged 4 commits intoOct 19, 2026
Conversation
joelteply
added a commit
that referenced
this pull request
Oct 17, 2026
…ontextComposition stays coherent CI on #5122 (job 117275378277, 01:48:45Z) was the first compile of a28d803 and refused it: ContextComposition derives Default, and tests build it with ::default(), but the new surface_reason field had no Default. A default composition has tool_tokens 0, which is what NoTools means. So NoTools is the default, not a value that would contradict the composition's cost. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
added a commit
that referenced
this pull request
Oct 18, 2026
…ontextComposition stays coherent CI on #5122 (job 117275378277, 01:48:45Z) was the first compile of a28d803 and refused it: ContextComposition derives Default, and tests build it with ::default(), but the new surface_reason field had no Default. A default composition has tool_tokens 0, which is what NoTools means. So NoTools is the default, not a value that would contradict the composition's cost. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
force-pushed
the
3026b83e/tool-framing-cost-bounded-by-the-prefill
branch
from
October 18, 2026 22:59
371d559 to
510cb88
Compare
Contributor
Author
|
PASSED at 510cb88, with CI as the compile check. Reviewed by Fable (M5), 2026-10-18; I read it and compiled nothing. Verified:
🤖 Generated with Claude Code |
…nd the affordable prompt (card 3026b83e, step 1) Observation only; nothing sent changes. IntelMac, core 6b75b55, 2026-10-16T21:21:14Z: a pass rendered tools 10,542 + framing 2,853 + conversation 5,365 tokens. Its prefill held the only lane 609,933 ms, against an affordable prompt of 2,836 tokens interactive and 8,509 unattended (prefill_bound, 47.3 t/s fresh). 42 of 45 renders that day sent a 38-tool surface, yet delib.context.render could not say which SurfaceReason chose it. - ContextBudget::affordable_tokens(): the whole prompt the window affords, from the same total every share is a fraction of. No new constant. - ContextComposition carries the SelectedSurface's reason; both delib.context.render sites record surface_reason and affordable_tokens. - delib.tool_surface.over_affordable fires when tools + framing alone exceed that prompt. - Also moves the `1/denom` doc comment back onto `fraction`; #5112's is_known insert had split it from its fn. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…ontextComposition stays coherent CI on #5122 (job 117275378277, 01:48:45Z) was the first compile of a28d803 and refused it: ContextComposition derives Default, and tests build it with ::default(), but the new surface_reason field had no Default. A default composition has tool_tokens 0, which is what NoTools means. So NoTools is the default, not a value that would contradict the composition's cost. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…n/tool_surface.rs (card 3026b83e) SurfaceReason (why a turn's tool surface is what it is) and the new over-affordable receipt leave the 12,000-line deliberation faculty for their own module. The faculty re-exports SurfaceReason and makes one call. Also removes 8 orphan doc lines glued onto SurfaceReason's doc: the text of long-deleted constants, one a duplicate of GUARD_CHARS_PER_TOKEN's doc in deliberation_budget.rs. Net: the faculty file shrinks by 16 lines instead of growing by 33 (source-hygiene file_size, plan goal 4). Behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…on canary 88f1060 (card 3026b83e) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply
force-pushed
the
3026b83e/tool-framing-cost-bounded-by-the-prefill
branch
from
October 19, 2026 00:46
510cb88 to
3ae882b
Compare
Contributor
Author
|
PASSED at 3ae882b (the rebase). Re-verified by Fable.
Auto-merge is set, pinned to this head. 🤖 Generated with Claude Code |
joelteply
enabled auto-merge (squash)
October 19, 2026 00:47
joelteply
deleted the
3026b83e/tool-framing-cost-bounded-by-the-prefill
branch
October 19, 2026 01:31
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.
Card 3026b83e (owner Cormac), step 1: observation only. Nothing sent changes. Authorized by root via Codex b545afac. Overlap with Codex's shared-context-budget lane checked and cleared (6a1885f2). Codex independently reviewed a28d803's observation fields (59d82394).
Why
IntelMac, core 6b75b55, 2026-10-16T21:21:14Z: a pass rendered tools 10,542 + framing 2,853 + conversation 5,365 tokens (request 16,206).
delib.context.rendercould not say whichSurfaceReasonchose it.What
ContextBudget::affordable_tokens(): the whole prompt the window affords, from the existingtotal_chars. No new constant.ContextCompositioncarriesSelectedSurface.reason; bothdelib.context.rendersites recordsurface_reasonandaffordable_tokens.delib.tool_surface.over_affordablefires when tools + framing alone exceed the affordable prompt.1/denomdoc comment tofraction; fix: why the citizens never wrote or pushed, from turn evidence: the core's git identity, readable tool results, a bounded prompt, a bounded board #5112'sis_knowninsert had split it from its fn.Measured
cargo test -j 2 -p source-hygiene): 32 passed, 0 failed.Measured after deploy
Owner Cormac, on IntelMac, within 48 h of the deploy tracker adopting it: the
surface_reasondistribution and everyover_affordable. This answers which arm sends 38 tools on the CPU tier, and it gates step 2.Publication
Opened with
airc work state 3026b83e review --workspace ~/.airc/worktrees/3026b83e-obs(airc #1580, card 52bf7370). The card's canonical claim worktree had landed in the deploy repo's .git at a stale HEAD; both checkouts were left untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE