fix: pipeline-start bugs (ET-006) — fetch description on status-start + work_item_id collision guard #11
Reference in New Issue
Block a user
Delete Branch "fix/pipeline-start-bugs"
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?
Fixes 2 pipeline-start bugs surfaced by the ET-006 live run.
BUG 1 — issue.updated without description -> QG-0 blocked
Plane issue.updated (status change) ships only changed fields; description was empty -> QG-0 wrongly blocked. start_pipeline now pulls the full description from the Plane issue detail API (reusing fetch_issue_sequence_ids GET endpoint + shared token) when the payload field is empty/short. Empty API -> honest QG-0 fail.
Files: src/plane_sync.py (new fetch_issue_description), src/webhooks/plane.py start_pipeline.
BUG 2 — work_item_id collision + worktree desync
2a: ensure_unique_work_item_id() guard LAYERED ON TOP of M-6 derive (derive untouched) — bumps to next free id if the derived ET-NNN is already in tasks. src/db.py + start_pipeline.
2b (defense-in-depth): if the branch is already owned by another task, disambiguate with the unique work_item_id+plane id so two tasks never share a worktree.
Tests
5 new tests in tests/test_pipeline_start_bugs.py. Suite: 195 passed (190 baseline + 5 new), 9 pre-existing failures unchanged.
Do NOT merge — merge after live verification + live run #6.