Skip to content

fix(storage): weigh airc's worktrees, event store and daemon log (card 0af5d5ec) - #5080

Merged
joelteply merged 3 commits into
canaryfrom
0af5d5ec/register-airc-with-the-governors-event-s
Oct 19, 2026
Merged

joelteply merged 3 commits into
canaryfrom
0af5d5ec/register-airc-with-the-governors-event-s

Conversation

@joelteply

@joelteply joelteply commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

airc's durable state on the machine-account scope was invisible to the disk
governor. Measured IntelMac 2026-10-15T22:28Z: ~/.airc/worktrees 103 GB,
events.sqlite 678 MiB, the daemon log 523 MiB — none on any TrackedDir row.

  • walk_tree takes a FILE root as its own length (read_dir failed on a file
    and the class reported a false 0 B); a symlinked root stays unfollowed.
  • three classes: airc-worktrees, airc-store, airc-daemon-log.
  • each gets a decided eviction story, deferred to the owner that holds the
    safety facts — continuum never deletes airc's bytes: 186ee967
    (AircWorktreePool via airc work cleanup), airc bdf34c4c (store reclaims
    freed pages), airc 551fe5ae (daemon bounds its log, in its own home).

Not compiled on IntelMac (no core builds there); source-hygiene 32/32. The
walk test is extended in place; every_cache_class_has_a_decided_eviction_story
covers the registration.

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

Measured

IntelMac 2026-10-15T22:28Z (pre-change, du/ls): ~/.airc/worktrees 103 GB; ~/.airc/events.sqlite 710,594,560 B; daemon log 548,591,986 B (held open by machine daemon PID 29682 in the project scope — airc 551fe5ae). The post-deploy receipt is the airc-* class sizes in the disk reporter on a node running this core; owner: Cormac, by the first IntelMac core adoption containing this merge.

Compile: CI only (no core builds on IntelMac). Not asking for review until cargo test -p continuum-core --lib is green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

joelteply added a commit that referenced this pull request Oct 15, 2026
…log (card 0af5d5ec)

Codex review of #5080: counting only events.sqlite and airc-daemon.log left
the SQLite -wal/-shm and the rotated airc-daemon.log.1 invisible — owner
bytes the broker could not see. A file root now names a file FAMILY: the
file and the sibling files its name prefixes, unfollowed. The walk test
gains a family case with a non-matching sibling that must not count.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@github-actions github-actions Bot added size: M and removed size: S labels Oct 15, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

Codex independent source review of exact 491af85: remaining companion-accounting blocker.

In core/continuum-core/src/system_resources/disk_reporters.rs:431, family enumeration requires the primary path to be an existing file. If airc-daemon.log is absent but airc-daemon.log.1 remains, read_dir(primary) at 434 fails and returns zero at 435. The retained owned bytes become invisible precisely during a rotation/crash gap.

At line 467, arbitrary starts_with also changes the generic file-root walk into a sibling scan, including unrelated same-prefix paths. The added other.sqlite case tests a non-prefix sibling, not that boundary. Please keep generic file-root behavior and give the reporter explicit companion membership (-wal/-shm and .1), enumerated independently of primary existence. Extend the existing scenario with absent-primary/retained-companion and unrelated-same-prefix cases. No symlink-follow finding is asserted: DirEntry.metadata is unfollowed.

Green current CI does not cover these cases. Prior source hold remains pending this correction.

@joelteply

Copy link
Copy Markdown
Contributor Author

Codex successor review of exact 05a8778: the two prior companion-accounting blockers are resolved. TrackedDir owns explicit companion suffixes, the scanner calls class.walk(), retained .1 is counted with no primary, unrelated same-prefix files are excluded, and generic single-file walk semantics are restored. Existing fixture covers these boundaries. Source approval conditional on fresh required CI and no newer findings.

Separate pre-existing debt: a directory symlink used as the walk root falls through to read_dir despite the unfollowed contract; nested symlinks are skipped. Requested an owned follow-up, without attributing current growth to it or extending this review into a claim of runtime reclamation. Registration and accounting are not proof of owner eviction.

joelteply and others added 2 commits October 18, 2026 18:11
…h the companions each declares (card 0af5d5ec)

Rebased onto canary 4b6a66a as one commit, the net change of the three
previously reviewed commits (05a8778), because canary rewrote the scan
loop for citizen Cargo targets. The scan now walks the citizens class with
walk_citizen_tree and every other class with TrackedDir::walk, which
weighs a file root and the companions it declares (WAL, shm, rotated log).
Both sides' tests are kept.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
…ner reads a #![cfg(test)] file as test code (card 0af5d5ec)

disk_eviction.rs was 2,426 lines, 1,143 of them its test module. The
module moves unchanged to disk_eviction/tests.rs, which gates itself with
the inner `#![cfg(test)]`; the parent declares plain `mod tests;`, so the
attribute lives once and clippy's duplicated_attributes has nothing to
flag. disk_eviction.rs is now 1,283 lines. HandsLease is imported once
there and the tests reach it through `use super::*`, so the one upward
import stays counted once.

source-hygiene used to split production from tests only at the first
`#[cfg(test)]`, so a standalone test file read as all production, and
every "move the tests out" split looked like new unwraps and spawns.
`production_half(src)` is now the one split, and also ends production at
an inner `#![cfg(test)]`. Test:
a_file_marked_inner_cfg_test_has_no_production_half (mutation-proven:
without the inner rule it fails).

Baselines lowered to the measured state, as the ratchet requires:
- lines past 1,000: 160,594 to 159,615 (this split);
- unjustified unwraps: 2,203 to 2,139;
- boundary serializations: 239 to 237.
The last two are a miscount ending, not code removed:
contracts/chain_tests.rs and orm/derive_test.rs were already
`#![cfg(test)]` files read as production. source-hygiene: 37/0.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply
joelteply force-pushed the 0af5d5ec/register-airc-with-the-governors-event-s branch from 05a8778 to 7880be1 Compare October 18, 2026 23:14
joelteply added a commit that referenced this pull request Oct 18, 2026
@github-actions github-actions Bot added size: XL and removed size: M labels Oct 18, 2026
@joelteply

Copy link
Copy Markdown
Contributor Author

FAILED at 7880be1, on one mechanical fix only. Reviewed by Fable (M5), 2026-10-18; I read the diff and compiled nothing.

Verified: production_half ends production at an inner #![cfg(test)] on its own code line, and only there:

  • The marker counts only on a code line: split_code_and_comment is applied before the match, so a mention in a comment doesn't count, and your third assert pins that.
  • The new test covers three cases: a moved test file, an inline #[cfg(test)], and prose.
  • Unwraps 2,203 → 2,139 and serializations 239 → 237 come from files that are already #![cfg(test)], as the comments say. That's a miscount ending, not code removed.

The fix: two doc comments are displaced.

  1. lib.rs: production_half's doc is inserted after collect_files' paragraph ("Unreadable files are skipped rather than failing the scan…"). That paragraph now documents production_half, and collect_files has no doc. Move production_half and its doc above collect_files' doc block.
  2. In the tests: the new #[test] is inserted between the existing /// What this catches: the production/test split silently swallowing the whole file… and production_half_stops_at_the_first_cfg_test. That doc now attaches to your test, and the old test loses it. Move your test above that doc line.

Non-blocking notes:

  • The airc tracked dirs (airc-worktrees, airc-store, airc-daemon-log) are a feature inside a test-move PR. That's fine, since every_cache_class_has_a_decided_eviction_story will fail CI if any class is undecided.
  • The six preserved Opus split branches carry their own is_test_only_file() for the same purpose. When they rebase onto this, they must delete theirs and use production_half, so the logic exists once. I'll make that part of their rebase.

🤖 Generated with Claude Code

@joelteply

Copy link
Copy Markdown
Contributor Author

PASSED at c86bfb6. Re-verified by Fable by reading the file at that head (git show).

  • lib.rs:196-221: production_half carries only its own doc, and collect_files has its "Read every .rs file… / Unreadable files are skipped…" doc directly above it again.
  • :566-586: the new test sits above the restored pair: the "What this catches: the production/test split…" doc and production_half_stops_at_the_first_cfg_test.

Nothing else changed since my earlier review. Auto-merge is set, pinned to this head.

🤖 Generated with Claude Code

@joelteply
joelteply enabled auto-merge (squash) October 18, 2026 23:16
@joelteply
joelteply merged commit 1b97411 into canary Oct 19, 2026
9 checks passed
@joelteply
joelteply deleted the 0af5d5ec/register-airc-with-the-governors-event-s branch October 19, 2026 00:00
joelteply added a commit that referenced this pull request Oct 19, 2026
joelteply added a commit that referenced this pull request Oct 19, 2026
…acked (card 5b497852) (#5083)

* fix(serving): a train-capable lane with CPU weights serves them unrepacked (card 5b497852)

llama.cpp repacks quantized CPU weights into a layout only its CPU kernels
read (CPU_REPACK: get_tensor/cpy_tensor NULL), and training's backward pass
needs the standard layout. Continuum never passed --no-repack, so no lane
whose weights sit on the CPU could learn. Measured IntelMac 2026-10-15,
fork cc2e05ff2 CPU-only, Qwen2.5-0.5B Q4_K_M, -ngl 0:
- repacked (23:35:32Z): learn fails, "OUT_PROD 'grad for ffn_swiglu-23' on
  blk.23.ffn_down.weight: no backend can run"; on the M5 (Metal present at
  -ngl 0) the same request crashes in ggml_backend_tensor_copy (Fable's trace).
- --no-repack (23:35:53Z): learn succeeds, loss 1.6083, 1417.7 ms.
- price (23:36:52Z, server timings, 600-token prompt + 64 generated): prompt
  229.7 -> 212.6 tok/s (3-8%), generation 50.7 -> 49.9 (noise).

One rule, LaneInvocation::no_repack_when_training_on_cpu, applied where the
placement is decided (with_options) and where a probe re-decides it
(constrain_to_cpu): --train-dir and weights on CPU (cpu_only or any tensor
override, the engine's own /train guard) -> --no-repack, once. GPU lanes and
lanes that cannot train keep repack's prompt speed.

Not compiled on IntelMac; source-hygiene 32/32. The engine-side refusal for
learn_on_slot (fork) is the companion change.

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

* refactor(inference): lane_args' tests move to lane_args/tests.rs (card 5b497852)

lane_args.rs held 1,198 lines, 477 of them its test module. The module
moves unchanged (byte-identical body) to lane_args/tests.rs, declared
`#[cfg(test)] mod tests;`, so `use super::*` and every test resolve as
before. lane_args.rs is 721 lines, and the file_size ratchet's count falls
by its whole excess rather than rising by this PR's 46 (plan goal 4).

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

* inference: lane_args/tests.rs gates itself (#![cfg(test)]), so source-hygiene reads it as test code (needs #5080's production_half; merge after #5080)

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

* hygiene: file_size baseline 159,463, lane_args' test split measured on canary 1b97411 (card 5b497852)

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]>
joelteply added a commit that referenced this pull request Oct 19, 2026
…recious mirror (card 573cc58a)

Rebased onto canary 769df97 as one commit: the net change of the four
reviewed commits (e39d996..f0981c0), because #5080 moved
disk_eviction's tests to their own file.
- card_staging: a card's checkout is a standalone clone with alternates
  from ~/.airc/mirrors (airc #1581). A held linked worktree migrates when
  nothing can be lost (airc #1582), with a card.checkout.migrated probe.
  The airc pin moves to 51f7869 (old pin 27a12d7 is an ancestor).
- confinement: each mirror's objects/ is a read-only root for a
  workspace-reach caller.
- disk: airc-mirrors is a TrackedDir, and its eviction is deferred with a
  named owner.
- The cache-class eviction decisions (OWNED, DEFERRED) move out of
  disk_eviction/tests.rs into disk_eviction/eviction_decisions.rs, which
  their test reads. tests.rs goes from 1,145 to 930 lines; file_size
  baseline 159,447 to 159,305.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply added a commit that referenced this pull request Oct 19, 2026
…recious mirror (card 573cc58a)

Rebased onto canary 769df97 as one commit: the net change of the four
reviewed commits (e39d996..f0981c0), because #5080 moved
disk_eviction's tests to their own file.
- card_staging: a card's checkout is a standalone clone with alternates
  from ~/.airc/mirrors (airc #1581). A held linked worktree migrates when
  nothing can be lost (airc #1582), with a card.checkout.migrated probe.
  The airc pin moves to 51f7869 (old pin 27a12d7 is an ancestor).
- confinement: each mirror's objects/ is a read-only root for a
  workspace-reach caller.
- disk: airc-mirrors is a TrackedDir, and its eviction is deferred with a
  named owner.
- The cache-class eviction decisions (OWNED, DEFERRED) move out of
  disk_eviction/tests.rs into disk_eviction/eviction_decisions.rs, which
  their test reads. tests.rs goes from 1,145 to 930 lines; file_size
  baseline 159,447 to 159,305.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply added a commit that referenced this pull request Oct 19, 2026
…recious mirror (card 573cc58a)

Rebased onto canary 769df97 as one commit: the net change of the four
reviewed commits (e39d996..f0981c0), because #5080 moved
disk_eviction's tests to their own file.
- card_staging: a card's checkout is a standalone clone with alternates
  from ~/.airc/mirrors (airc #1581). A held linked worktree migrates when
  nothing can be lost (airc #1582), with a card.checkout.migrated probe.
  The airc pin moves to 51f7869 (old pin 27a12d7 is an ancestor).
- confinement: each mirror's objects/ is a read-only root for a
  workspace-reach caller.
- disk: airc-mirrors is a TrackedDir, and its eviction is deferred with a
  named owner.
- The cache-class eviction decisions (OWNED, DEFERRED) move out of
  disk_eviction/tests.rs into disk_eviction/eviction_decisions.rs, which
  their test reads. tests.rs goes from 1,145 to 930 lines; file_size
  baseline 159,447 to 159,305.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
joelteply added a commit that referenced this pull request Oct 19, 2026
…onfinement reads only the mirror's objects (card 573cc58a) (#5132)

* feat(work,code): a resident's card checkout is its own clone from a precious mirror (card 573cc58a)

Rebased onto canary 769df97 as one commit: the net change of the four
reviewed commits (e39d996..f0981c0), because #5080 moved
disk_eviction's tests to their own file.
- card_staging: a card's checkout is a standalone clone with alternates
  from ~/.airc/mirrors (airc #1581). A held linked worktree migrates when
  nothing can be lost (airc #1582), with a card.checkout.migrated probe.
  The airc pin moves to 51f7869 (old pin 27a12d7 is an ancestor).
- confinement: each mirror's objects/ is a read-only root for a
  workspace-reach caller.
- disk: airc-mirrors is a TrackedDir, and its eviction is deferred with a
  named owner.
- The cache-class eviction decisions (OWNED, DEFERRED) move out of
  disk_eviction/tests.rs into disk_eviction/eviction_decisions.rs, which
  their test reads. tests.rs goes from 1,145 to 930 lines; file_size
  baseline 159,447 to 159,305.

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

* fix(work): a resident's HELD linked checkout migrates when her turn on it starts (card 573cc58a)

Fable's live receipt from the M5 deploy of #5132 (build 91ea7dba9,
04:10-05:10Z): card.checkout.migrated fired 0 times in an hour. All three
held checkouts (cc2db61d, 1b232595, e710ed0f) were linked, clean and
pushed, so all were eligible. Two defects, both mine:
1. stage_for_card returned any existing checkout before reaching
   ensure_card_clone, so the migration was unreachable for exactly the
   checkouts it was written for. A linked worktree now falls through to
   the clone path, which migrates it.
2. Staging ran only on a new claim, and residents keep their claims.
   card_staging::restage_held_linked_checkout runs from bind_card, as her
   turn on a held card starts and before her hands are rooted, so nothing
   of hers is running in the tree that may move. A card clone is
   untouched. If migration cannot happen, the old tree stays hers.

Also:
- The airc pin moves to 44478afa6 (#1591): a migrated clone borrows its
  llama.cpp submodule (453 MB) from a node mirror, instead of downloading
  it inside her turn. 51f7869 is an ancestor.
- persona_workspace.rs's 1,995-line test module moves, unchanged except a
  leading blank line, to cognition/persona_workspace/tests.rs
  (#![cfg(test)]). The higher-ring items it uses are imported once in the
  parent under #[cfg(test)], so upward imports stay at 256.
  BASELINE_LINES_OVER goes from 159,277 to 158,283.

Not compiled here (IntelMac rule): every edited file parses and
source-hygiene is 37/0. CI is the compile check, and Fable's next M5
deploy is the live check.

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

* fix(work): a held linked tree that cannot migrate is not restaged on every turn (card 573cc58a)

Fable on #5132 at 5d2f157: a held linked tree that can never migrate
(dirty, detached, unpushed) was restaged at every turn start, each time
an ensure_mirror GitHub fetch, a submodule pass and an arrival, until she
committed.

restage_held_linked_checkout now tries only when the local checks the
migration itself needs already pass: clean (is_dirty), on a branch
(current_branch) and nothing unpushed (has_unpushed_work). These use
local git only, no network. It also tries at most once per carry interval
(card_carry::CARRY_SWEEP, 300 s) per (resident, card). The carry is what
pushes her commits, so that is when an unpushed tree can become
migratable. is_dirty and CARRY_SWEEP become pub(crate) for this.

Not compiled here (IntelMac rule): files parse; source-hygiene 37/0.

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

* hygiene: file_size baseline 158,255, card 573cc58a's splits measured on canary 16a075c

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