Context: CodeRabbit feedback on upstream PR coleam00#1875 surfaced a likely-valid pending-row bug in our fork.
Problem:
- packages/core/src/orchestrator/orchestrator.ts may pre-create a workflow run.
- If acquirePrdExecutionLeaseForRun throws, the function sends an error and returns without terminalizing the pre-created run.
Impact:
- P1. Leaves stale pending rows and can interfere with path locks/status until cleanup.
Acceptance criteria:
- On PRD lease acquisition failure after preCreatedRun exists, mark the run failed/cancelled with a clear guard-blocked reason.
- Log any DB finalization failure separately.
- Add a regression test for lease acquisition failure after pre-creation.
Reference:
Context: CodeRabbit feedback on upstream PR coleam00#1875 surfaced a likely-valid pending-row bug in our fork.
Problem:
Impact:
Acceptance criteria:
Reference: