Skip to content

fix(disk): the pressure monitor measures the volume that HOLDS THE HOME — the daemon was blind on every Windows host (5090 at 0 bytes free reading Normal) - #4185

Merged
joelteply merged 4 commits into
canaryfrom
fix/the-disk-monitor-watches-the-volume-that-holds-the-home
Sep 18, 2026
Merged

joelteply merged 4 commits into
canaryfrom
fix/the-disk-monitor-watches-the-volume-that-holds-the-home

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The disk daemon was blind on every Windows host — the 5090 hit 0 bytes free reading Normal

2026-09-18 00:3xZ: the 5090's 1.9 TB volume reached 0 bytes free. Core checkpoints failed (os error 112), the canary build failed on a symlink, and the disk daemon's level was Normal the whole time. Joel found it, not the substrate.

Root cause — one constant

system_resources/disk_pressure.rs:338:

const ROOT_MOUNT: &str = "/";
…
.find(|d| d.mount_point().to_string_lossy() == ROOT_MOUNT)
.map(|d| (d.total_space(), d.available_space()))
.unwrap_or((0, 0));

On Windows no mount is / (it is C:\). The lookup found nothing, read (0, 0), computed pressure 0.0, level Normal — on every Windows host, for as long as the monitor has existed. Consequences down the chain, each layer "correct":

  • the PressureBroker was never asked to relieve a byte;
  • CargoTargetPool sat "within budget" (10% of the volume = 190 GB; the cache was 156 GB) while the volume filled with other classes;
  • system/resources carried no disk field, so the absence was invisible from every seat.

Two of this codebase's own laws in one constant: a platform that chooses differently, silently; and an absence rendered as a positive fact.

The change

  • One resolver, in the adapter that already owns the platform's drive spelling: capacity::system_profile::drive_holding(drives, path) — the mount that is the longest prefix of the path (C:\, /, a nested /Volumes/x). The monitor measures the volume holding the continuum home through it. The cargo-target budget in ipc/mod.rs now calls the same function instead of carrying its own copy of the rule.
  • No drive holds the home = disk.pressure.unmeasured, said on every blind poll — never a zero.
  • The snapshot is on the command surface: system/resources returns disk (tier, bytes, every tracked cache class) beside cpu/memory/gpu. A blind monitor can never again be invisible.

Tests

  • the_drive_holding_a_path_is_the_longest_mount_prefix_never_a_named_root — Windows and Unix spellings, nested mount wins, no-drive is None.
  • disk_pressure 7, disk_eviction 16, disk_reporters 4, system_resources::monitor 17, positron_metrics_source 3, bindings regenerated.
  • Two system_profile serving-budget tests read this box's config.env headroom (1.0) and fail here regardless of this PR — a test that reads the machine; separate card.

Receipt to read on the 5090 after deploy

system/resources → disk.level, disk.total_bytes, disk.available_bytes real numbers; on the next cargo cycle past 80%, PressureBroker relieving cargo-target.

What I did by hand, and why

To unwedge the box I deleted cargo-target/debug (117 GB of test artifacts) — the exact rung the pool's ladder would have freed had the daemon seen the pressure. Nothing else was touched. That is the last hand cleanup; the daemon owns it from here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc

…ME — resolved through the drive adapter, never a mount named "/"

The 5090 filled its 1.9 TB volume to 0 bytes free on 2026-09-18 with the disk
daemon reading Normal. system_resources/disk_pressure.rs:338 held
`const ROOT_MOUNT: &str = "/"` and matched every sysinfo mount point against it
by string equality. On Windows no mount is "/" (it is C:\), so the lookup found
nothing, read (0, 0), computed pressure 0.0, and the level stayed Normal on every
Windows host for as long as the monitor existed. The broker was never asked to
relieve; CargoTargetPool sat "within budget" (10% of the volume) while the volume
filled with other classes; the core's own checkpoints died with os error 112; and
`system/resources` had no disk field, so the absence was invisible from every
seat. Two of this codebase's own laws in one constant: a platform that chooses
differently, silently, and (0, 0) rendered as "fine".

ONE resolver, in the adapter that already owns the platform's drive spelling:
`capacity::system_profile::drive_holding(drives, path)` — the mount that is the
LONGEST prefix of the path (`C:\`, `/`, a nested `/Volumes/x`). The monitor reads
the volume holding the continuum home through it; the cargo-target budget in
ipc/mod.rs now uses the same call instead of its own copy of the rule. No drive
holds the home = `disk.pressure.unmeasured`, said on every blind poll — never a
zero. The last snapshot is published process-wide and `system/resources` carries
it as `disk` beside cpu/memory/gpu, so a blind monitor can never again be
invisible.

Tests: the_drive_holding_a_path_is_the_longest_mount_prefix_never_a_named_root
(Windows and Unix spellings, nested mount, no-drive = None); disk_pressure 7,
disk_eviction 16, disk_reporters 4, system_resources::monitor 17 green. Two
system_profile serving-budget tests read this box's config.env headroom (1.0)
and fail here regardless of this change — a test that reads the machine, not a
regression.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
joelteply and others added 3 commits September 17, 2026 20:52
…me's pressure is the cargo pool's floor

The moment the disk daemon could see (#4185 deployed on the 5090): volume
`critical` (95 %+, 92 GB of 1.9 TB free), cargo-target at 0.34 of its budget,
cargo-target-wt (123 GB) at 0.65 — both below the broker's act line, nothing
evicted, the disk-root signal pool alerting "hot and stuck" every tick. The
per-pool budget is cut from the volume's TOTAL and cannot see a volume filled
by other classes. CargoTargetPool::pressure() is now max(own, volume): over
budget OR on a hot volume, either one brings the broker, and a derived-artifact
cache is exactly what a hot volume sheds first. No disk reading = own budget
alone, as before.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
…acked classes — 785 GB the daemon could not weigh

Where the 5090's 1.9 TB volume went (measured 2026-09-18): ~/.continuum/kimi-k3-container
760 GB, cache 262 GB (cargo-target 65 + cargo-target-wt 123), Docker 200 GB,
C:\models 85 GB, moe-probe 25 GB. The daemon tracked ~200 GB of it. The K3
container and the probe runs were written under the home by the pager work and
registered nowhere — the 2026-07-13 law, again: a directory the substrate writes
unbounded data into gets a TrackedDir row and an eviction decision.

Rows: k3-container, moe-probe. Decisions (deferred, named, card a5d4c876): the
container MIGRATES to the cold tier through NvmeServingTierPool's migrate rule
when K3 is not the served model and is protected by serving_active_artifacts
while it is — never deleted in place, never on the HDD tier while streaming
([[hdd-vs-nvme-is-a-residency-tier]]); the probe runs are an age-based sweep.
every_cache_class_has_a_decided_eviction_story stays green with both.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
…where backslash separates — CI on Linux read C:\Users\x as one component

The first version asserted Windows spelling on every platform: the same class
as the bug the resolver fixes. Unix cases (valid everywhere) run everywhere,
plus the no-drive = None case in Unix spelling.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
@joelteply
joelteply merged commit 4122c9b into canary Sep 18, 2026
6 checks passed
@joelteply
joelteply deleted the fix/the-disk-monitor-watches-the-volume-that-holds-the-home branch September 18, 2026 06:45
joelteply added a commit that referenced this pull request Sep 19, 2026
… reads as room (#4209)

Cormac + a027688a on #4185: the no-match arm announced "UNKNOWN" in a probe and
then handed on (0, 0) → pressure 0.0 → Normal. The words said unknown; the
number said fine — the exact lie #4185 was written to end, re-committed in its
own fallback. Now ONE pure reading per poll (volume_reading): the volume holding
the home when one does; else the HOTTEST mounted volume — a real number,
conservatively chosen, named as a fallback (disk.pressure.unmeasured_home,
volume_source="hottest_volume"); else a typed DiskPressureLevel::Unknown
(volume_source="none"), ordered above Critical so every `level >= High` gate
treats an unseen disk as hot, never as room. The snapshot carries
volume_source so system/resources says which volume its numbers describe.

Test: a_monitor_that_cannot_see_says_unknown_never_normal (home, hottest
fallback picks the most-pressured volume not the first, no volumes = Unknown
and Unknown > Critical). disk_pressure 8, disk_eviction 17, disk_reporters 4,
monitor 17, bindings regenerated, hygiene green.

Faster or slower: no effect on a citizen's turn; the disk daemon's poll does
one more comparison per mount.


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

Co-authored-by: Claude Opus 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