Skip to main content

Module disk_ops

Module disk_ops 

Source
Expand description

app.disk.report: what is filling this machine’s disk that AgentMux made (spec §4.3), a read. The free space of the volumes AgentMux uses, the largest build folders (target) in the agents’ workspaces with the agent that owns each, and the folders of older versions in this channel. Paths are relative to the AgentMux home or the agents’ folder; nothing outside them is named.

Measuring a large target takes long, so the walk has a time budget and says when it stopped early (complete: false): the sizes it gives are then lower bounds. It deletes nothing.

Constants§

BUDGET 🔒
How long the measuring may take, inside the transport’s 25 s limit.
CHECK_EVERY 🔒
How many entries are read between two looks at the clock.
LISTED 🔒
How many build folders and old versions are listed (largest first).

Functions§

build_folders 🔒
The target folders under agents_root, one entry per cargo clone, largest first.
dir_size_until 🔒
The size of everything under p, stopping at deadline: (bytes, whether the whole tree was counted). A folder or file that cannot be read makes the count a lower bound, as running out of time does; one that vanished meanwhile (a build removing it) does not.
disk_report 🔒
old_versions 🔒
The other version folders of channel (channels/<channel>/versions/<version>), largest first.
relative 🔒
A relative path with forward slashes, or just the last name when p is not under base.
report 🔒
volume 🔒