fix(tasks): cover syncProject wiring and allow deleting orphans after file removal
Review follow-up: - runtime.test.js: add syncProject wiring tests with a real temp-dir project and real project-config runtime — asserts reconcileLoopTasks is driven with the discovered loops when the project path is known (task created, nextRunAt computed) and that plain listing is used when the path cannot be resolved (reconcile not called). - service.js: DELETE on a loop-owned task is rejected with a 400 only while its loop file still exists on disk; once the file is gone the orphan task can be deleted directly instead of waiting for the next reconcile. Tests use real temp files for both branches. - DOCUMENTATION.md: delete semantics updated accordingly. - PR description refreshed for the final HEAD (test counts, reconciliation contract, evidence wording).
This commit is contained in:
@@ -96,10 +96,11 @@ project write lock on every `syncProject` when the project path is known:
|
||||
- **UI edits** to a loop-sourced task are preserved in the config but the loop
|
||||
file remains authoritative: the next reconciliation re-applies the file's
|
||||
definition (including `enabled`). Use `enabled: false` in the file to
|
||||
disable. Deleting a loop-sourced task through the API is rejected with a 400 —
|
||||
the loop file is the removal surface. The scheduled-tasks UI marks loop tasks
|
||||
as file-managed and disables their edit/enable/delete actions for the same
|
||||
reason; `run now` remains available.
|
||||
disable. Deleting a loop-sourced task through the API is rejected with a 400
|
||||
while its loop file still exists on disk — the loop file is the removal
|
||||
surface; once the file is gone, deleting the orphan task is allowed. The
|
||||
scheduled-tasks UI marks loop tasks as file-managed and disables their
|
||||
edit/enable/delete actions for the same reason; `run now` remains available.
|
||||
|
||||
## Public exports (runtime.js)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user