fix(cron): exclude jobs.json registry from disk-cleanup pattern

Closes #32164
This commit is contained in:
Cornna
2026-05-28 18:48:42 +08:00
committed by Teknium
parent 91b174038c
commit d473e7c938
2 changed files with 39 additions and 4 deletions

View File

@ -481,7 +481,14 @@ def guess_category(path: Path) -> Optional[str]:
}:
return None
if top == "cron" or top == "cronjobs":
return "cron-output"
# Only files under the disposable ``output/`` subtree are
# cleanup candidates. Top-level cron control-plane state
# (e.g. ``jobs.json``, ``.tick.lock``) must never be
# auto-tracked — deleting it wipes the live scheduler
# registry. See issue #32164.
if len(rel.parts) >= 2 and rel.parts[1] == "output":
return "cron-output"
return None
if top == "cache":
return "temp"
except ValueError: