You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(fanout): render the PR link on ✅ success, not only on ⚠️ (ABCA-584) (#601)
* fix(fanout): render the PR link on ✅ success, not only on ⚠️ (F-prlink)
The Linear completion comment rendered the PR URL ONLY on the ⚠️ "shipped a PR
but stopped early" path, on the assumption that on ✅ success the agent's own
step-2 "PR opened" comment reliably carries the link, so duplicating it is noise.
That assumption fails when the agent skips its PR-opened comment. Live-caught on
ABCA-584: a :decompose that declined to split ran as one coding task, opened PR
#395 (pr_url + build_passed on the task record), but posted NO "🔗 PR opened"
comment — so the ✅ "Task completed" comment omitted the link and it was lost
entirely; the user asked "where is the PR link?".
Fix: render `PR: <url>` whenever the task produced one, on BOTH ✅ and ⚠️. The
completion comment is the terminal, platform-owned surface, so it must carry the
link rather than depend on the agent choosing to post its own; a duplicate with
the agent's comment (when it does fire) is far cheaper than a missing PR, and
this is the one terminal comment per task so it can't spam. Test updated to
assert the link renders on ✅. Full cdk build green (2935 tests). Held.
* docs+test: address review nits N1–N3 on the PR-link render
Optional polish from the #601 review (fix itself approved, unchanged):
- N1: add a negative assertion for the branch this change now makes live —
✅ task_completed + prUrl null → NO `PR:` line. The relaxed `if (args.prUrl)`
guard means this is no longer structurally guaranteed by the old ⚠️-only
condition, so pin its absence (fanout-task-events.test.ts).
- N2: reword the "ONE terminal comment per task" comment — the single-post
guarantee lives in the caller `dispatchToLinear` (linear_final_comment_event_id
idempotency marker), NOT this pure formatter, which enforces nothing. Credit
the right layer so a future non-idempotent caller isn't misled.
- N3: add a one-line note atop the function JSDoc — prUrl, when present, renders
on ALL frames — so the "why" isn't split between the JSDoc (ABCA-91 story) and
the render-site note (ABCA-584) 50 lines below.
No behavior change. fanout-task-events tests green (108); eslint clean.
0 commit comments