Bug description
app.service.cron.store.scan_jobs() now returns a tuple of (valid_jobs, invalid_mtimes), but three ManageCron consumers still treat the full return value as List[CronJob]:
_status() iterates the tuple and reads job.id
_list() filters tuple items by job.enabled
_run_now() searches tuple items by job.id
This contract changed in commit f49ac92ac574de7a3c5bb7e2b8daea9d84de42c4, while these tool call sites retained the previous list-only assumption.
Reproduction
- Invoke
manage_cron with action=status or action=list, including with an empty cron directory.
- Invoke
manage_cron with action=run and any job_id.
Each path receives ([], {}) or ([CronJob(...)], {}) and attempts to access a CronJob attribute on a list or dict tuple member. The public tool catches the resulting AttributeError and returns an error instead of the requested status, list, or manual run result.
Expected behavior
All three consumers should unpack scan_jobs() and operate only on the valid job list. Invalid-file metadata remains owned by the scheduler scan loop.
Proposed scope
- unpack the scanner result in the three affected actions
- add focused regression coverage for status, list filtering, and manual run lookup
Bug description
app.service.cron.store.scan_jobs()now returns a tuple of(valid_jobs, invalid_mtimes), but threeManageCronconsumers still treat the full return value asList[CronJob]:_status()iterates the tuple and readsjob.id_list()filters tuple items byjob.enabled_run_now()searches tuple items byjob.idThis contract changed in commit
f49ac92ac574de7a3c5bb7e2b8daea9d84de42c4, while these tool call sites retained the previous list-only assumption.Reproduction
manage_cronwithaction=statusoraction=list, including with an empty cron directory.manage_cronwithaction=runand anyjob_id.Each path receives
([], {})or([CronJob(...)], {})and attempts to access aCronJobattribute on a list or dict tuple member. The public tool catches the resultingAttributeErrorand returns an error instead of the requested status, list, or manual run result.Expected behavior
All three consumers should unpack
scan_jobs()and operate only on the valid job list. Invalid-file metadata remains owned by the scheduler scan loop.Proposed scope