Problem
An agent guarding "keep at least 30 GB free" cannot get that number out of disky.
disky stats reports what a past scan measured. Different question, and it needs a snapshot (~3 min traversal) to answer at all.
disky predict returns fill_at: null with reason provide --free-bytes unless the caller shells out to df -k / | awk '{print $4*1024}' and does the unit math by hand. The default-path output is inert.
disky growth --over-n's --fill-target help already claims "Default: free bytes on the volume that holds $HOME". The code never implemented it — the flag is a plain Option<u64> passed straight through as None.
So the tool that exists to answer "am I running out of disk" is the one tool in the loop that has to be told how much disk is left.
Proposal
volume module — statvfs(2) probe: probe(path) -> VolumeRecord, free_bytes(path) -> Option<u64>.
disky free [PATH] — live total / free / used / used_pct for the volume holding PATH (default $HOME), kind="volume", no snapshot required.
- Default
predict --free-bytes and growth --fill-target to the probe, making the existing --help promise true.
Details that matter
free_bytes from f_bavail (unprivileged-writable), not the root-only figure — the honest answer to "can I still write files".
f_frsize is the multiplier, not f_bsize (preferred I/O size is the wrong unit for these block counts).
free_bytes() returns None on probe failure, never 0 — a failed statvfs reporting 0 would read as a full disk and could trigger a cleanup.
Verification
Positive control against df -k at the same instant, plus a negative control (bad path must error, not report 0 free).
Problem
An agent guarding "keep at least 30 GB free" cannot get that number out of disky.
disky statsreports what a past scan measured. Different question, and it needs a snapshot (~3 min traversal) to answer at all.disky predictreturnsfill_at: nullwith reasonprovide --free-bytesunless the caller shells out todf -k / | awk '{print $4*1024}'and does the unit math by hand. The default-path output is inert.disky growth --over-n's--fill-targethelp already claims "Default: free bytes on the volume that holds$HOME". The code never implemented it — the flag is a plainOption<u64>passed straight through asNone.So the tool that exists to answer "am I running out of disk" is the one tool in the loop that has to be told how much disk is left.
Proposal
volumemodule —statvfs(2)probe:probe(path) -> VolumeRecord,free_bytes(path) -> Option<u64>.disky free [PATH]— live total / free / used / used_pct for the volume holdingPATH(default$HOME),kind="volume", no snapshot required.predict --free-bytesandgrowth --fill-targetto the probe, making the existing--helppromise true.Details that matter
free_bytesfromf_bavail(unprivileged-writable), not the root-only figure — the honest answer to "can I still write files".f_frsizeis the multiplier, notf_bsize(preferred I/O size is the wrong unit for these block counts).free_bytes()returnsNoneon probe failure, never0— a failedstatvfsreporting0would read as a full disk and could trigger a cleanup.Verification
Positive control against
df -kat the same instant, plus a negative control (bad path must error, not report 0 free).