fix(org-import): migrate runtime schedules from removed predecessor on recreate #2007
Reference in New Issue
Block a user
Delete Branch "fix/schedule-migration-on-recreate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
internal#2006 — recreate orphaned runtime schedules. createWorkspaceTree mints a new id when the prior ws is removed; reconcile re-derives template state but runtime-created schedules orphan on the removed row. Fix migrates them from the most-recent removed predecessor (matched by stable role, fallback name+parent) onto the new ws before the template upsert. +3 tests. Part 1/3 of the schedule recreate-resilience work (monitor + cleaner follow).
APPROVED — migrate runtime schedules from removed predecessor on recreate; matched by stable role, template state still re-derived. +3 tests, build green.
APPROVED — best-effort, idempotent (NOT EXISTS dedup); only source=runtime migrated. Closes the recreate-orphan gap.