The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(cron): count root-reserved blocks when probing the store as root
kshitijk4poor760e01ef5d77
diff --git a/cron/store_health.py b/cron/store_health.pyindex 65fc69cd7f4..1c4174c7520 100644--- a/cron/store_health.py+++ b/cron/store_health.py@@ -182,7 +182,12 @@ def probe_report(cron_dir: Path) -> Optional[dict]:def free_bytes(path: Path) -> Optional[int]:+ """Bytes this process can still write. Root may also fill the reserved blocks that+ ``disk_usage().free`` leaves out, so a 'full' disk is not full for root."""try:+ if hasattr(os, "geteuid") and os.geteuid() == 0:+ stats = os.statvfs(path)+ return stats.f_bfree * stats.f_frsizereturn shutil.disk_usage(path).freeexcept OSError:return None