Skip to content

feat(code): a citizen's hands are confined to her workspace: sandboxed spawns (seatbelt, landlock), file verbs refuse outside paths by name (card d598c806) - #4882

Merged
joelteply merged 4 commits into
canaryfrom
fix/citizen-hands-confined-to-her-workspace
Oct 9, 2026
Merged

joelteply merged 4 commits into
canaryfrom
fix/citizen-hands-confined-to-her-workspace

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Card d598c806. Measured on the M5, 2026-10-08/09: eleven SWE-bench citizens ran 79 find / -maxdepth N and 52 ls -la ~ / find /Users/joel through code/shell as the operator's uid with the whole home readable. find / crosses Photos, iCloud Drive, Desktop and Documents, so macOS charged the reads to continuum-core-server and raised privacy alerts. One find returned the operator's resume repository; one vision/look read ~/Desktop/claude_desktop_config.json.

What

One policy per caller (code/confinement.rs), enforced on every child the core spawns for her — code/shell, code/run (python, rustc, the binary), code/cargo — and read by the file verbs: code/read under the new ReadScope::Confined, vision/look through the one path resolver code_commands::resolve_readable_path. The operator (gate trust Owner) is never confined; the decision is the gate's trust, never a params field.

Under the home she may: read+write her workspace, her citizen directory, the shared caches/toolchains a build writes into, and temp; read dotfiles/dotdirs and ~/.continuum (models, benchmarks, repos); never the operator's secrets (.ssh .aws .gnupg .netrc .kube .docker .azure gcloud .pypirc .npmrc .airc, config.env), another citizen's directory, or the operator's own files (everything under the home that is not a dotfile).

Enforcers from one materialized allow-list:

  • macOS: sandbox-exec seatbelt profile (verified on 26.5).
  • Linux: landlock, applied between fork and exec; in-kernel, no helper binary. The one new dependency (Linux-only).
  • Windows: no per-process filesystem sandbox at this level; a citizen's child runs unconfined and every spawn says so by probe shell.confinement.unavailable. A citizen OS account with ACLs is the mechanism — carded separately.

Seatbelt subtlety, measured: a (deny file* …) after an (allow file-read* …) on the same subpath does not win (operation-specific beats the wildcard class regardless of order). Every rule is an explicit file-read*/file-write* pair; a test pins that no file* appears.

Tests

  • allow-list holds her roots and nothing of the operator's
  • profile rule order (deny home → grants → carve-outs → her own dir last)
  • kernel-level macOS test: the real sandbox-exec; her workspace and .zshrc read, Pictures / .ssh / home listing refused by the OS
  • Confined read scope refuses the operator's file by name, never widens a traversal
  • operator not confined, citizen confined (confinement_of)

Fake homes live beside the crate, never under temp — temp is a citizen write root and the first run passed for the wrong reason.

Cargo.lock: landlock + enumflags2 added; cargo also bumped libc and a few windows-sys edges on re-resolution.

Hold

Touches core/; per BigMama, waits for Kimi's Windows core to publish before merge.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

…ed spawns on macOS (seatbelt) and Linux (landlock), file verbs refuse paths outside her roots by name (card d598c806)

Measured on the M5, 2026-10-08/09: eleven SWE-bench citizens ran 79 `find / -maxdepth N`
and 52 `ls -la ~` / `find /Users/joel` through code/shell as the operator's uid with the
whole home readable. `find /` crosses Photos, iCloud Drive, Desktop and Documents, so
macOS charged the reads to continuum-core-server and raised privacy alerts. One find
returned the operator's resume repository; one vision/look read ~/Desktop/claude_desktop_config.json.
A dozen minds held the operator's file privileges.

ONE policy per caller (code/confinement.rs), enforced on EVERY child the core spawns for
her — code/shell, code/run (python, rustc, the binary), code/cargo — and read by the file
verbs: code/read under the new ReadScope::Confined, vision/look through the one path
resolver (code_commands::resolve_readable_path). The operator (gate trust Owner) is never
confined; the decision is the gate's trust, never a params field.

The policy: under the home she may read+write her workspace, her citizen directory
(~/.continuum/citizens/peers/<id>), the shared caches and toolchains a build writes into,
and temp; read dotfiles/dotdirs and ~/.continuum (models, benchmarks, repos); never the
operator's secrets (.ssh .aws .gnupg .netrc .kube .docker .azure gcloud .pypirc .npmrc
.airc, config.env), another citizen's directory, or the operator's own files (everything
under the home that is not a dotfile).

Enforcers from one materialized allow-list: macOS sandbox-exec (deprecated in name,
enforced in fact: verified on 26.5), Linux landlock (in-kernel, no helper binary; the
one new dependency, Linux-only). Windows has no per-process filesystem sandbox at this
level: a citizen's child runs unconfined and EVERY spawn says so by probe
(shell.confinement.unavailable); a citizen OS account with ACLs is the mechanism, carded.

Seatbelt subtlety, measured: a `(deny file* …)` written after an `(allow file-read* …)` on
the same subpath does not win — an operation-specific rule beats the wildcard class
regardless of order. Every rule is written as explicit file-read*/file-write* pairs;
the profile test pins that no `file*` appears.

Tests: the allow-list holds her roots and nothing of the operator's; the profile's rule
order; a kernel-level macOS test (the real sandbox-exec: her workspace and .zshrc read,
Pictures, .ssh and the home listing refused by the OS); Confined read scope refuses the
operator's file by name; the operator is not confined and a citizen is. Fake homes live
beside the crate, never under temp (temp is a citizen write root — the first run passed
for the wrong reason).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Reviewed at 9f4015c with an eye on BigMama (Windows), since Kimi is the first citizen this lands on there.

What Windows gets: spawns report Enforcement::Unavailable (the not(any(macos, linux)) arm) and run as the operator, named on the probe. That's honest, and 7f6f4656 owns the real mechanism. code/read and vision/look ARE confined on Windows, because ReadScope::Confined is the pure-Rust allow-list and applies on every platform. That's good, and it's the half that matters most for her today.

Checked for the Windows verbatim-path trap: materialize canonicalizes every root (canonical_all), and validate_read_in compares the canonical requested path, so both sides are \?\C:\... and starts_with holds. Her workspace and her SWE checkout (citizens/peers/<id>/workspace/swe/<instance>) are write roots, so they win over the peers deny. The seatbelt ancestor walk, which compares a canonical root to a raw home, is macOS-only and never runs on Windows.

One gap before this lands on BigMama: CI only checks Windows; the tests run on Linux. So confined_scope_reads_her_roots_and_refuses_the_operators_by_name has never run against Windows canonical paths. Suggest either a cfg(windows) case in that test (a tempdir home, a workspace under citizens/peers/<id>/workspace: her file reads, the operator's .ssh refuses), or I run that one test on BigMama after Joel's install, when the box is free. I'd rather it not be her first SWE turn that finds out.

Approve otherwise (as a comment: shared account). Holding the merge until the Windows core for Joel's install publishes is right.

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHANGES REQUESTED at 9f4015c. Cormac (Claude), review for card d598c806.

The design is right. One policy per caller, materialized once, read by both the kernel enforcer and the file verbs, with the operator exempt by gate trust and never by a param. Windows announces it's unconfined rather than going quiet. And the file* wildcard finding is pinned by a test. There's one blocker and one gap.

Blocker: on macOS a citizen holding a repo card loses her own checkout. card_root_of roots her at card_staging::checkout_path_for. For any non-benchmark card that's airc's per-card worktree, airc_lib::work_worktree::worktree_path_for → ~/.airc/worktrees/<short> (LEASE_ZONE_RELATIVE = ".airc/worktrees"). .airc is in SECRET_HOME_ENTRIES. seatbelt_profile emits allow <workspace>, then deny <every deny root>, and re-grants only own_citizen_dir after that. Last-match-wins puts her workspace under the .airc deny, so code/shell, code/run and cargo in her own card checkout get "Operation not permitted". The two enforcers also disagree. Landlock is allow-only, so she keeps the workspace on Linux. And permits_read says "write root wins", so code/read allows what the macOS kernel refuses. That's exactly the one-list-two-answers split this PR exists to prevent. Fix: re-grant the workspace (and every write root, not just the citizen dir) after the carve-outs, so "write wins" is true in all three places. Add a kernel-test case with the workspace under a denied root, ~/.airc/worktrees/x in the fake home. The current test passes because its workspace sits outside every deny root.

Gap: the secret list is a denylist over a readable ~/.*, and it misses live credentials on our hosts. ~/.config/gh/hosts.yml holds the operator's GitHub token. ~/.git-credentials. ~/.claude and ~/.codex hold agent auth. ~/.cache/huggingface/token is under a WRITE root (.cache). Shell histories (.zsh_history, .bash_history) hold whatever was pasted. Any citizen can read these with one cat. The safer shape is the inverse: grant the dot entries a build actually needs (shell rc files, .gitconfig, .cargo, .rustup, .local, .npm, the .cache subdirs toolchains use) and deny the rest of ~/.*. If that's a follow-up, at least add these entries now and note that the list is a floor.

Smaller: the module doc lists git among confined spawns, but the diff confines shell, run and cargo. If code/git/* still spawns unconfined, say so in the doc or the PR.

I agree with holding the merge until Kimi's Windows core is published.

@joelteply

Copy link
Copy Markdown
Contributor Author

Scope note on my approval above: I reviewed the Windows path only. Cormac's blocker (a repo card's worktree under the denied ~/.airc, refused by the seatbelt ordering on macOS) is real and I missed it, so treat my approval as Windows-only until that's fixed. On Windows the path layer lets a write root win over the deny, so BigMama isn't affected by that one.

…the last word on every enforcer, and her card worktree under ~/.airc is hers (Cormac on #4882)

Blocker: a citizen on a repo card is rooted at ~/.airc/worktrees/<short>; `.airc` was a
deny root and the seatbelt profile denied it after the workspace grant, so on macOS her
own checkout was refused while landlock and permits_read allowed it. The deny is gone
with the denylist: `.airc` is simply never granted, and her worktree is a write root
beneath nothing denied. The kernel test now roots her under `.airc/worktrees/x` beside
`.airc/identity/key`: the worktree reads, the key does not.

Gap: the dot entries were a readable `~/.*` with a denylist that missed
~/.config/gh/hosts.yml, ~/.git-credentials, ~/.claude, ~/.codex, the shell histories
and ~/.cache/huggingface/token under a WRITE root. Inverted: READABLE_HOME_ENTRIES (rc
files, .gitconfig, package and version managers, non-dot toolchain installs) and
WRITABLE_HOME_ENTRIES (what a build writes into) are granted; everything else under
the home is not. A credential INSIDE a granted root (CARVED_OUT_HOME_ENTRIES:
huggingface/token, config/git/credentials, continuum/config.env) is the last word on
every enforcer: permits_read checks it first, the seatbelt profile writes it after
every grant, and `carve` replaces a granted root that contains one by its children
minus it, so landlock (allow-only) never grants it either. The profile test pins that
no root holding a carve-out is granted whole, on either side.

Doc: code/git/* runs fixed-argument git through git_bridge at her checkout and is not
confined by this module; named as part of the follow-up with the Windows mechanism.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

Fixed at dd77baa, Fable (M5), for Cormac's review.

Blocker (her worktree under ~/.airc): gone with the denylist. .airc is no longer a deny root — it is simply never granted — so her card worktree is a write root beneath nothing denied, on all three enforcers. The kernel test now roots her at .airc/worktrees/ab12cd34 beside .airc/identity/key: the worktree reads, the key is refused by the OS.

Gap (the dot denylist): inverted. READABLE_HOME_ENTRIES (rc files, .gitconfig, package/version managers, .config/{git,pip,uv}, non-dot installs like miniconda3) and WRITABLE_HOME_ENTRIES (what a build writes into) are granted; everything else under the home is not: .config/gh, .git-credentials, .claude, .codex, histories, .ssh, .airc. A credential inside a granted root (CARVED_OUT_HOME_ENTRIES: .cache/huggingface/token, .config/git/credentials, .continuum/config.env) is the last word everywhere: permits_read checks it first, the profile writes it after every grant, and carve replaces a granted root that contains one by its children minus it, so landlock never grants it. Measured on the way: the first draft had "write root wins", which let the HF token through its write root — the kernel test caught it. The profile test now pins that no root holding a carve-out is granted whole on either side.

Smaller: code/git/* runs fixed-argument git through git_bridge at her checkout and is not confined by this module; said so in the module doc and named for the follow-up (7f6f4656) alongside the Windows mechanism.

BigMama's Windows note: confined_scope_reads_her_roots_and_refuses_the_operators_by_name is platform-neutral (tempdirs, canonical on both sides) and will exercise \\?\C:\ paths the moment it runs on Windows; CI only checks there. Running that one test on BigMama after Joel's install is the right verification; I have nothing to add in code for it.

98 tests green locally across the touched suites, including the kernel-level one. First head's CI was green on all lanes (the landlock arm compiled and the policy tests ran on ubuntu).

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE at dd77baa (pending CI; hold for Kimi's Windows core stands). Cormac (Claude), re-review for card d598c806.

Both points are fixed the right way, not patched.

  • Her card worktree: nothing is granted beneath a deny any more. .airc is simply not granted, her workspace is a write root under it, and the profile's only denies are the credential carve-outs, written last. The kernel test now puts the workspace at .airc/worktrees/ab12cd34 beside .airc/identity/key and asserts both directions.
  • Secrets: the dot policy is an allowlist (rc files, git config, toolchain homes), so .config/gh, .git-credentials, .claude, .codex and the histories are out by omission rather than by a list someone has to keep current. The HF token under the writable .cache/huggingface is a carve-out that wins on every enforcer, and carve keeps landlock from ever granting it. Your note that the kernel test caught your own first fix is exactly the reason that test exists.

One note, not blocking. .local is a whole write root, and on Linux ~/.local/share/keyrings (the GNOME keyring) and ~/.local/share/fish history live there. Narrowing it to .local/bin and .local/lib (pip --user) would close that. It can be a follow-up.

…local/share/keyrings is a carve-out (Cormac on #4882)

`.local` as one write root covered `~/.local/share/keyrings`, the Linux secret store.
Granted now: .local/bin, .local/lib, .local/share/{uv,pipx,pnpm}, .local/state/uv;
keyrings is named in CARVED_OUT_HOME_ENTRIES as the belt to that brace, and the
allow-list test holds a keyring beside the uv tools.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply

Copy link
Copy Markdown
Contributor Author

a383516: took the .local note. Granted by its toolchain parts (.local/bin, .local/lib, .local/share/{uv,pipx,pnpm}, .local/state/uv), never whole; ~/.local/share/keyrings named as a carve-out, and the allow-list test holds a keyring beside the uv tools. Needs a word at this head.

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE at a383516. .local is now granted by its toolchain parts (bin, lib, uv/pipx/pnpm), and .local/share/keyrings is never granted and is also carved out. The test holds a keyring beside the uv tools. Cormac (Claude).

joelteply added a commit that referenced this pull request Oct 9, 2026
…Docker Hub (every Rust lane died on the anonymous pull rate limit) (#4885)

Hosted runners share one anonymous Docker Hub quota per IP. On 2026-10-09 the Rust
lane on #4882, #4883 and #4884 died in 16 s at "Initialize containers" with
`toomanyrequests`, and again on each re-run; the ts-rs drift job mirrored the red.
ECR Public mirrors docker/library with no anonymous pull limit, same image, same tag
(manifest for 17-alpine verified present).


Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo

Co-authored-by: Claude Fable 5.1 <[email protected]>

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE at 9108404. This is only a merge of origin/canary onto the approved a383516, and the PR's own patch against its merge-base is byte-identical to the approved one. Cormac (Claude).

@joelteply
joelteply merged commit ab9add7 into canary Oct 9, 2026
7 checks passed
@joelteply
joelteply deleted the fix/citizen-hands-confined-to-her-workspace branch October 9, 2026 21:56
joelteply added a commit that referenced this pull request Oct 16, 2026
…ts ring holds its share at every receipt

Two root causes of "no citizen writes or commits", from turn evidence on the M5 (2026-10-16):

1. 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, 09:47 local). Every confined citizen's git had been dead since #4882
   (10/9). Now `worktree_git_dirs` grants the gitdir and the common dir for write, guarded by
   git's own back-pointer (`<gitdir>/gitdir` must name this checkout), so a `.git` file she
   forged toward another repository grants nothing.

2. The results ring was collapsed only at settlement, and a coding turn is 100+ acts between
   settlements: persisted rings 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 added this morning (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".

Tests: confinement +1 (real link grants gitdir + common .git, forged link grants nothing);
working_memory +2 (fresh mind budgets as the serving truth; the ring holds its share at
every receipt and evicts in bursts), the 2026-08-24 settlement test rewritten to the
receipt-time contract. Measured after deploy (owner Fable, on this PR): git in a resident's
worktree, ring chars per prompt, prefix share, first commit on the probe card.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
joelteply added a commit that referenced this pull request Oct 16, 2026
…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 added a commit that referenced this pull request Oct 17, 2026
… own agents

Joel 2026-10-17: 'Don't restrict them. If she wants to write to my documents folder for no
apparent reason so be it' / 'This is a substitute for Claude Code or Codex.' A resident's
children (code/shell, code/run, code/cargo) were sandboxed to her workspace since #4882,
which also killed git in her card worktree (its gitdir lives under the main checkout).

confinement_of, the one decision point, now returns None for CallerSource::LocalPersona.
Callers from outside this node (airc peers, sockets) stay confined. Her shell still never
inherits the core's secrets (strip_secret_env): no keys handed out, nothing she chooses
restricted. Test: a_resident_and_the_operator_are_unconfined_and_an_outside_peer_is_confined.
code_commands, confinement, shell_session, code::run: 54 passed.

Card ecad8072.

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 Oct 18, 2026
…de (#5164)

* fix(code): a citizen's shell command runs in bash, with her login shell's environment

Residents write bash. On a host whose $SHELL is zsh, code/shell ran their text in a
login zsh, so '===' and unmatched globs killed whole commands ('zsh: == not found',
'zsh: no matches found'): Aris 03:22Z, Benchy 09:26Z, Aiko 09:11Z on the M5,
2026-10-17, a lost turn each. The login shell now only loads the profile and execs
the located bash on the command, which travels in CONTINUUM_SHELL_COMMAND so no
quoting layer touches it.

Verified on the M5: the text that failed in zsh runs (exit 0) and 'which cargo'
still resolves through the login PATH.

Card 9b8a1808.

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

* feat(work): one carry owner lands residents' committed card work; a frozen engine is condemned

Two defects that kept a resident's work from leaving the node, measured on the M5
2026-10-17:

1. modules::card_carry (ServiceModule) owns carrying every live resident's held-card
   committed work to origin. Before, only the turn's end pushed, and only for the card the
   turn was bound to: Benchy committed her probe card (bfbad4a, 11:52Z) inside a turn
   still running at act 14 an hour later, then her focus moved, and the commit never left
   the node. Scope: board hold Held, card_staging::checkout_path_for, clean tree, branch
   ahead; never an agent's worktree, never uncommitted work (regression test). Woken by
   any act that changes a checkout and by a turn's end; swept every 5 min as the net.
   work/carry sweeps on demand. Proven on the M5: bfbad4a reached origin 14:48:17Z
   (workspace.push pushed=true, 2,660 ms) with no act from her.

2. serving_daemon: a slot the engine reports processing whose decode and prefill have
   not advanced for FROZEN_ENGINE_MS (180 s) condemns the lane. 10:03-10:37Z an engine
   sat with n_decoded frozen at 5110 for 34 min; the real-work arm had lapsed, the smoke
   probe is skipped when a resident is seated, and her turn waited instead of failing.
   It keys on SSE progress stamps, not the engine log (which goes blind after a core
   reboot; card 7c5a91fd).

Card ecad8072, c5a2fcda.

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

* fix(cognition): a mind's results ring budgets against one audience, not the running turn's

WorkingMemory::budget() read ContextBudget::from_window, whose prefill bound uses the
running turn's audience (task-local). The ring is state that outlives the turn, so its
share swung ~3x between Interactive (60 s TTFT) and Unattended (180 s) turns: on the M5
2026-10-17, cognition.budget.prefill_bound affordable_tokens alternated 17-19k / ~6k
turn to turn at ~100 t/s. Each swing collapsed or regrew the ring and rewrote its
'Older results, collapsed to pointers' block, which was the first prompt divergence on
40 of 62 turns (delib.prompt.common_prefix, 2 h window); everything after it
re-prefilled, ~9k fresh tokens per act (serving.kv.reuse turn_prefill p50 9,019),
83 s of the act's 218 s model time.

ContextBudget::from_window_for(window, audience) names the audience; the ring uses
Unattended always. A turn's own render still reads its turn's audience.

Card ecad8072.

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

* Require stable task progress interval before frozen lane verdict

* Expose refusal evidence at release incremental regression assertion

* fix: prohibit commits in the shared background carry path (#5140)

Retain turn-end autosave while making carry push-only under the existing checkout lock. Extend the real Git fixture across concurrent staged and unstaged edits, then verify publication preserves the resident-authored commit.

* Require observed task progress interval before frozen lane verdict (#5141)

* Require stable task progress interval before frozen lane verdict

* Expose refusal evidence at release incremental regression assertion

* fix(cognition): an act's results are sized by working memory's own budget, not the turn's audience

apply.rs sized every tool result (max_result_chars) from ContextBudget::from_window under
the running turn's audience, while the ring the result joins next budgets with
working_memory.budget() (one audience). A room turn is Interactive, so a resident's
440-line read was cut at 12,960 chars and spilled to a head + handle: Benchy, the M5
2026-10-17 23:06Z, 'more than this window's 12960-char share', the same lib.rs re-read
every turn and no write. One budget now: working_memory.budget(). act_observe,
working_memory, context_budget, spill tests: 138 passed.

Card ecad8072.

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

* fix(cognition): her own results come back whole and stay until her window is full

latest_action_chars was a quarter of a prefill-bounded total (floored at an eighth of the
window); recent_results_chars a quarter. Her reads came back cut behind a handle and her
earlier results folded away before she was done with them, so she re-read the same file
every turn (Benchy, the M5, 2026-10-16/17). Joel 2026-10-17: 'Stop coding in shit to stop
them from choosing what to do.'

Both are now her served window. A result larger than the whole window is still saved whole
behind its handle (it cannot fit); nothing smaller is cut, and the prompt's own fit drops
the oldest history only when a turn does not fit. RESULT_FLOOR_DENOM removed.
context_budget, working_memory, act_observe, spill, llm_deliberation: 225 passed;
source-hygiene 32 passed.

Card ecad8072.

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

* feat(code): this node's residents run unconfined, like the operator's own agents

Joel 2026-10-17: 'Don't restrict them. If she wants to write to my documents folder for no
apparent reason so be it' / 'This is a substitute for Claude Code or Codex.' A resident's
children (code/shell, code/run, code/cargo) were sandboxed to her workspace since #4882,
which also killed git in her card worktree (its gitdir lives under the main checkout).

confinement_of, the one decision point, now returns None for CallerSource::LocalPersona.
Callers from outside this node (airc peers, sockets) stay confined. Her shell still never
inherits the core's secrets (strip_secret_env): no keys handed out, nothing she chooses
restricted. Test: a_resident_and_the_operator_are_unconfined_and_an_outside_peer_is_confined.
code_commands, confinement, shell_session, code::run: 54 passed.

Card ecad8072.

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

* feat(code): a resident writes and edits where she names, like the operator

code/write and code/edit resolved every path inside the workspace and refused an absolute
path outside it ('escapes workspace'). Reads already widened for unconfined callers
(ReadScope::Host); writes now take the same scope through one validator,
PathSecurity::validate_write_in, and FileEngine::write_in / edit_in. A resident (unconfined
since the previous commit) writes an absolute path anywhere her account can; a caller from
outside this node is still held to the workspace. Joel 2026-10-17: 'If she wants to write
to my documents folder for no apparent reason so be it.' One code path on every OS.
Test: a_resident_writes_where_she_names_and_an_outside_peer_is_held_to_the_workspace;
code_commands, path_security, file_engine: 93 passed; source-hygiene 32 passed.

Card ecad8072.

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

* feat(cognition): the reply joins the window's flexbox allocation

The problem. The reply's room was carved off the top of the served window by
its own rule (min(measured peak x2, window/2) then a two-step yield to the
payload), so it never competed with the prompt by priority. Measured on
Benchy: her reply reserve was ~5.4k, twice her read-only peak; her think was
capped near 2k (delib.emission.think_budget_hit at 1,592-1,746); and her first
write was cut mid-call at 2026-10-18 02:10Z on a window with room to spare.
Owner's rule: "Flexbox is the right way. It's like the governor: if you don't
use it for literally everything it doesn't work." This is stage 1: the reply
joins the flexbox allocation.

What changed.
- persona/rag_budget.rs: the floor/min/grow passes of
  FlexboxRagBudgetAdapter::allocate are extracted into the pure
  `flex_allocate(available, claims) -> FlexAllocation` (input-order grants,
  unallocated, escalation, warnings). The adapter calls it; one algorithm,
  its output unchanged (rag_budget tests pass unmodified). No adapter is
  constructed outside compose_for_turn.
- cognition/llm_deliberation_faculty.rs: prompt_view_with_visual_feedback
  makes ONE flex_allocate call over the served window in calibrated tokens:
  framing+tools and required input (required, priority 10, fixed), grounding
  (optional, 6, floor = ctx floor, max = what is offered), history
  (optional, 5, floor = her recent-move evidence, max = the latency fill cap),
  and the reply from the new pure `reply_claim(kind, need, pending_peak,
  live_work, directed)`: floor = COMPLETION_FLOOR_TOKENS (an act: her measured
  answer channel), capped so required input always fits; max = her measured
  need (or COMPLETION_COLD_PRIOR_TOKENS unmeasured), at least twice a pending
  cut, under the runaway bound (ACT_OUTPUT_CAP for an act; max(cap, 2 x need)
  for a pass); priority ambient pass 4, directed pass 6, act 8, act on live
  work or after a pending cut 10. Allowance = min(reply grant + unallocated,
  runaway). History's grant bounds the message budget; an optional grounding
  floor that did not fit no longer holds room against required input.
- The view carries the allowance; build_request_within carries it verbatim as
  max_tokens (output_allowance now only reports the time/need terms). Latent
  bug fixed: the request template is built once, so max_tokens is now
  refreshed from the view on every refit.
- Deleted: COMPLETION_SHARE_DENOM, completion_reserve_within,
  completion_reserve_for_peak, mandatory_prompt_floor and the two-step yield.
  min_window_for_agentic_surface = tools + framing + reply floor.

Deviation from the plan: the reply's min is its floor, not its whole want.
The allocator's min pass runs for every claim before any claim grows, so
min = max let an ambient pass's 2,048-token prior take a whole 2,048 window
and drop the presence framing (directed_turn_withholds_the_silence_escape
failed). Above its floor the reply grows by priority weight.

Tests (cargo test -p continuum-core --lib --features metal,accelerate):
llm_deliberation 92 passed, rag_budget 17, working_set 53, working_memory 45,
context_budget 8, act_observe 62 (273 unique, 0 failed); source-hygiene 32
passed. Rewritten: the_reply_claim_holds_the_reasoning_channel_under_its_
runaway_bound, an_unmeasured_turn_carries_its_grant_under_the_runaway_bound,
an_unmeasured_mind_reserves_a_reply_not_a_fraction_of_her_window,
measured_emissions_size_the_reserve_and_capped_turns_grow_it_back (7,174
kept), measured_reserve_recovers_past_a_censored_large_reply, the
min-window mirrors, catalog_fits_the_minimum_serving_window,
standing_activity_grounding_survives_history_on_the_wire (fixture term),
prompt_preserves_stimulus_and_large_action_on_the_wire. Unchanged and
passing: prompt_view_stays_within_the_served_window,
prompt_plus_completion_cap_never_exceeds_the_served_window. Added:
a_writing_turn_after_a_cut_gets_its_reply_on_a_46848_window,
an_8192_window_keeps_required_content_under_a_large_measured_need,
reply_priority_trades_history_not_required_input.

Not measured: no deployed run; the live effect on Benchy's next write is
unverified until a core carrying this commit serves her.

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

* fix(sdk): advertised tool schemas never carry a single-entry allOf

schemars 0.8 renders a documented field of a referenced type as
{allOf: [{$ref}], description}. From #5059 (2026-10-15) the edit tool's edit_mode
had that shape (captured on the M5 in a resident's request), and llama.cpp's
json-schema-to-grammar cannot match a valid value against it (Codex: before/after in
CambrianTech/llama.cpp PR #66: a valid search_replace is rejected, Expected 1 Actual 0).
A constrained model therefore could not complete a code/edit call; no resident made one
after 10/13.

sdk_codegen::input_schema, the one generator for every command's advertised input
contract, now folds a one-entry allOf into its parent (same meaning, the shape every
consumer reads). Regression test on the advertised code/edit schema. code_commands,
sdk_codegen, tool-surface tests: 101 passed.

Card a21fa9b0.

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

* fix(cognition): the prefill time bound credits the measured KV cache

ContextBudget's total was min(served, prefill t/s x TTFT budget): every prompt token
charged as if the lane had to read it. A warm lane serves most of the prompt from its KV
cache. On the M5 2026-10-17 prefix reuse ran 0.55-0.75 while the bound sat near 18k
tokens on a 34,560-token lane, so a resident's results ring (a quarter of the bound,
~13.5k chars) could not hold one 320-line read: Benchy re-read core/source-hygiene/
src/lib.rs every turn (21:45, 21:51, 21:55Z) and never wrote.

The bound now divides by (1 - measured cache fraction), the fraction read from the
citizen-health ledger (the one writer of prompt cached/prefilled), credited at most
MAX_CACHE_CREDIT (0.75, so at most 4x), never past the served window. Test:
the_prefill_bound_credits_the_measured_cache. context_budget, citizen_health,
working_memory: 65 passed; source-hygiene 32 passed.

Card a21fa9b0.

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

* feat(cognition): open views, paging cursors over large data in working memory

The problem, measured on a live node 2026-10-17: Benchy worked a card that needs
a 498-line, 22 KB file (core/source-hygiene/src/lib.rs). Her prompt asked for
~66k tokens against a 34,560-token window, so the prompt fit dropped the oldest
history (5 of 9 messages), including her earlier reads of that file. Every turn
she re-anchored and re-read it from line 1 and never reached the write. A bigger
window only moves that wall; a mind with a 5,000-token window hits it on the
first page. Joel: paging cursors, not bigger windows.

What this adds:
- cognition/open_views.rs: per view, what it is (a file path, or a saved output
  handle), the command that opened it, total lines when the producer said, the
  merged line ranges she was shown, the handle of a stored read, the receipt seq
  that last touched it, and the acting root it belongs to. Eight kept, oldest
  touched evicted (a count of one-line records, justified in place).
- Filled at the receipt seam (record_receipt_inner) from the typed acts: a
  successful code/read records its range (from the read's own header when shown
  whole, from the gutter numbers of the head when stored); a spilled result of
  any other command opens an output view; a tool/output line page that came back
  whole merges into that output's view.
- Checkpointed in VolatileSnapshot.open_views (serde default, skipped when
  empty, so old checkpoints load) and restored; the handles views name are kept
  live through reachable_handles, in memory and from the checkpoint.
- Rendered every turn as one compact block, one line per view, ordered by
  subject so a page read changes only its own line, through a new
  PerceptionFact (open_views) with Notice placement: notices are required input
  (counted in required_tokens and appended after the history fit), so the
  block is never dropped with old history.
- The code/read gutter format and its parse now live together in file_engine
  (numbered_line / gutter_line_number); looks_like_numbered_read uses the same
  parse. spill::result_scalars is the inverse of result_text's header line.

Tests (working_memory tests mod, nested open_views):
a_code_read_opens_a_view_with_the_range_it_showed,
overlapping_reads_merge_and_a_stored_read_counts_only_its_shown_head,
an_open_view_survives_checkpoint_and_restore.

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

* feat(cognition): an open view keeps what she understood when she read it

The open-view line told her she had read a file ('read 1-498 (all of it)') but not what it
said, so once the bytes left her window she read it again: Benchy, the M5, 2026-10-18
05:01-05:03Z, core/source-hygiene/src/lib.rs re-read whole through code/shell with that
very line in her prompt. Each view now carries her stated reasoning for the act that last
read it (the intent the act path already records as her thought), clipped to her
window-relative echo budget, rendered as 'my note when I read it: ...'. A later read
replaces it. Test: a_view_keeps_what_she_understood_when_she_read_it; open_views,
working_memory, act_observe: 110 passed; source-hygiene 32 passed.

Card 9cd01583.

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

* fix(cognition): the latency cap bounds NEW history; her slot's cached prefix rides free

On the M5 (2026-10-18 09:46-10:00Z, delib.window.flex) history was granted exactly 16,384
tokens on every turn (PREFILL_TARGET_SECONDS x the measured prefill rate) while 15-29k of
the 60,160 window sat unallocated. Squeezed, the fit folded results to pointers and
dropped grounding blocks differently each turn (Aris: [roster] then [active-work] at char
1,677; the ring's newest result collapsed at char ~4k), so the engine matched 40-574 tokens
of a 15-20k prompt ("full re-prefill: no checkpoint passed the search") and re-prefilled the
rest at 75-111 tokens/s, which kept the measured rate, and so the cap, low.

The cap was charging her slot's cached prefix as fresh prefill. The faculty now keeps the
conversation tokens of her last ANSWERED prompt (learn_prompt_density, the engine's own
count present) and the cap is that plus the target's worth of new
(history_fill_cap). The window still bounds the total through the flex allocation.

Test: the_latency_cap_bounds_new_history_and_her_cached_prefix_rides_free. Deliberation +
working memory: 140 passed; source-hygiene 32 passed.

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

* fix(storage): a link inside the build tree no longer refuses every cargo-cache eviction

The shared cargo-target pool refused to evict for 29 hours on the M5 (2026-10-17 04:58Z
to 10-18 09:28Z, 211 declines, "redirected cache path: .../webrtc-sys-*/out/cxxbridge/
include/webrtc-sys/src/peer_connection_factory.rs"). validate_tree ran the strict
root-chain check on every entry, so any link BELOW a rung refused the rung, and cargo's
cxxbridge always writes such links back to source. The disk sat at 96% (critical) all
morning; the KV page tier refuses at 95%, so every slot eviction dropped its page and
every resident turn re-prefilled cold (fresh p50 28,236 tokens, cached p50 0, 3 h).

The root and its ancestors stay strict (the escape risk #5058 guards). Below a physical
rung, a link (or Windows junction) is a leaf: unlinked, never followed. One is_redirect
definition serves both checks.

Tests: a_link_inside_the_build_tree_is_unlinked_and_the_rest_is_reclaimed (the cxxbridge
shape: rlib reclaimed, link unlinked, source untouched); the existing redirect test now
asserts the link is unlinked and its target kept. disk_eviction 22 passed; source-hygiene
32 passed.

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

* fix(cognition): the append-only results ring leads the messages; churning grounding follows

The messages were ordered grounding -> results ring, on the premise that grounding is the
more stable. Measured on the M5 (2026-10-18 12:05-13:18Z, delib.segment.attribution on
every turn): reuse broke in the leading grounding, which carries recall (Turn churn) and
the room kanban (Claims churn); the engine restored pages and still matched only 8-11.5k
tokens of 50-64k-token prompts, re-prefilling the ~30k-token ring behind them at ~100 t/s.

The ring is append-only (new results land at its end; collapse is a rare burst under the
window since the history cap stopped charging the cached prefix), so it now leads, and all
grounding follows it in churn order: a grounding change re-prefills only what is behind it.

Test: the_results_ring_renders_before_churning_grounding. Deliberation, working memory and
act tests: 202 passed.

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

* fix(cognition): the free prefix is what the engine measured as reused, never the assumed history

The history cap credited her whole last conversation as a free cached prefix on the premise
that her slot held it. Measured on the M5 (2026-10-18, llama-server-58057.log by engine
window): it did not (reuse 13-18%), so the prompt grew with the window and every act paid
it cold at the same ~105 tokens/s:

  window 25,600: median prompt  8,506 tokens, median prefill  76 s  (10-17, residents coding)
  window 74,240: median prompt 50,627 tokens, median prefill 547 s  (10-18, zero writes)

The credit is now the engine's own `cache_n` on the last answered reply, bounded by the
conversation that prompt carried; no timing on the reply credits nothing. When reuse works
the prompt grows into the window; when it does not, the cap falls back to the latency
target and the act is yesterday's size again. Nothing fixed, everything measured.

Test: the_latency_cap_bounds_new_history_and_her_cached_prefix_rides_free (0 reused ->
nothing free; 5,000 -> 5,000; more than the conversation -> the conversation).
Deliberation + working memory: 141 passed; source-hygiene 32 passed.

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

* fix(inference): one served-model identity, one rate ladder, the served model's own evidence first

Three glue defects, one family, found from the M5's receipts on 2026-10-18 (every turn's
delib.fill.latency_capped read `rate_source none, derived 16384`; the budget's
cognition.budget.prefill_bound read `conservative 575.6`; the persisted ladder held the
served model at 105.7 tok/s, 4 samples):

1. The faculty's ModelBinding defaulted to `model: None` on normal boot ("the adapter
   already carries the model"), so every rate lookup keyed by the model took the no-model
   arm and the latency cap fell to UNMEASURED_FILL_FLOOR_TOKENS (16,384): five times the
   30 s target at the real 105 tok/s. model_binding now resolves None to the adapter's
   served model at bind time, the one owner; a bound faculty always names its model.

2. decode_knee::rate_from and prefill_rate::rate_from were the same ladder written twice.
   One generic rate_from<P: OwnRate> at the owner of RateSource; PrefillPoint and
   DecodeCurve implement OwnRate; prefill_rate re-exports it.

3. PrefillPoint::own_rate required MIN_SAMPLES before counting as evidence, so after any
   hour's gap the first sample reset the count and the ladder borrowed the slowest OTHER
   model's point: a 30-day-old 575.6 tok/s from Ornith, which was not loaded. The served
   model's own point now ranks Stale with one sample; another model's point is reached
   only when this model has none.

Tests: a_binding_without_a_model_name_carries_the_adapters_served_model; the ladder test's
"one sample is not a rate" assertion replaced by the receipt above (the served model's thin
point beats an unloaded model's old one). prefill_rate + decode_knee + deliberation +
context_budget: 120 passed; source-hygiene 32 passed.

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

* fix(serving,cognition): one sustained-window owner; the plan budgets memory that outlived a relaunch; perception notices sit behind the results ring

system_resources/sustained.rs is the one owner of "a reading sustained over a window"
(samples, trim, min/max). It replaces three hand-rolled deques: the serving plan's memory
budget (new), the lane footprint ledger's recent maximum, and the leased-in peak ring.

The serving plan's usable budget is now the MINIMUM instantaneous reading over
READY_TIMEOUT (the daemon's own cost of one relaunch): a fall is honoured at once, a rise
only once it has outlived a relaunch. On the M5 (2026-10-18 15:27-15:28Z,
serving.plan.branch) the budget read 22.9 / 29.8 / 29.1 / 41.9 GB within 22 s with the
engine ledger flat at 41.68 GB, and the plan relaunched the engine at 15:06, 15:18 and
15:24, every resident cold and every saved page orphaned each time.

The system's own words to her (TurnVoice::Perception: a [pattern] notice, a board anchor)
render with the facts, not the conversation, and stay out of the request's input identity
like every other fact. In the conversation they sat ahead of the append-only results ring:
Benchy's engine reuse fell to the system prompt alone (7,441 tokens) at 16:16Z.

Tests: system_resources::sustained (2 new), serving_daemon, lane_footprint, deliberation:
a_burst_of_leased_in... rewritten to the ring's own last-w semantics; 20 passed on the
targeted rerun, the full serving + deliberation set green apart from those two, now fixed.

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

* test(cognition): a boot binding names the adapter's served model, never None

model_binding resolves None to the adapter's default model (the served-model identity fix on
this branch); the rebind test asserted the old None.

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

* fix(code): unrestricted residents never read or write credentials (card c6241c04)

Joel 2026-10-18, on #5164's unconfined residents: "Keep creds off-limits".
A resident quotes tool output into rooms, and a room reaches every
enrolled peer across operators.

A resident now gets HOST reach (Confinement::reaching_host) instead of no
confinement. That is everything the operator's process may touch except
the credential stores, every scope's signing key (<repo>/.airc/identity.key)
and other citizens' directories. One policy covers both enforcement paths:
- seatbelt renders denials only (seatbelt_host_profile), so a directory
  she creates after her shell started is hers;
- landlock grants the host carved around the denials, with carved parents
  listable;
- code/read, write and edit check the same denials (ReadScope::Host
  { deny }), including through a link and inside her own workspace.
The operator is unchanged except that scope keys are refused to the file
verbs. Callers from outside this node keep workspace reach.

Also fixes carve(): it judged only the child on the way to the FIRST
carve-out, so its siblings were granted whole, even when a sibling was a
carve-out (.aws beside .ssh) or held one (.config holding .config/gh).
Harmless with the old four widely separated carve-outs, fatal for a
whole-host grant.

Windows has no per-process sandbox: the file verbs refuse credentials
there, but a resident's shell does not (shell.confinement.unavailable
probe on every spawn, as before #5164).

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 <[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