Repository navigation
fix(ci): give pr-intake.yml a fallback for PRs with no linked issue - #344
Conversation
Previously a manually-opened PR with no resolvable "Closes #N" line exited pr-intake.yml's guard early with no risk:*/status:* label applied at all, requiring a human to notice and hand-label it (as happened for PRs #326, #335, #342). Now it still runs classify_pr_risk.py and routes into the pipeline — status:needs-qa when an issue is linked (unchanged), status:needs-review when it isn't, since qa-agent.yml hard-stops on a missing linked issue (no acceptance criteria to check) while principal-review.yml already tolerates one gracefully. Closes #343
📱 iOS Build Status: PASSED✅ iOS Simulator Build & Unit Tests - success iOS UI tests run in a separate, informational job and are not reflected above — check "iOS UI Tests (informational)" for those. |
QA verification — PR #344 vs issue #343Scope: Acceptance criteria (issue #343's "Ask")
The PR body's justification for
What I ran
Gap found (not blocking)
AGENTS.md conventions
VerdictAll three acceptance-criteria items from issue #343 are met and independently verified against the actual downstream workflow code (not just the PR's own description of it). Real test suite is green with no regressions. Only issue found is non-blocking doc staleness. QA verdict: PASS |
Principal review — PR #344Outcome: human-merge (routing purely on Risk label sanity check
Verification performed (ground truth, not the PR's/QA's word for it)
Finding (non-blocking)
AGENTS.md conventionsBranch name and commit message follow convention. No dedicated test added for the inline bash guard logic, but that's consistent with this file's own precedent ( No CONFIRMED findings. Landing on |
The PR intake backstop section only described the linked-issue path (status:needs-qa). PR #344 added a second branch for issue-less PRs (status:needs-review, routing to principal-review.yml since qa-agent.yml hard-stops without a linked issue). Document both. Closes #346 Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
What
pr-intake.ymlis the deterministic backstop that risk-classifies and labels PRs opened outside the dev-agent pipeline (a human, or a session pushing directly with a personal PAT). Its guard step required a resolvable linked issue (resolve_linked_issue.sh) before doing anything — a PR with noCloses #N-style line exited early with "not a pipeline PR, nothing to do," leaving it with norisk:*/status:*label at all.principal-review.ymlnever fires (it triggers onstatus:needs-review, which nothing applied), and a human has to notice and hand-label it manually — confirmed live this session for PRs #326, #335, #342 (the latter two self-authored automation work with no filed issue to link to).Fix
The guard step no longer exits early when no issue is linked. It still runs
classify_pr_risk.pyand applies the resultingrisk:*label either way. For the status label, it branches:status:needs-qa, same as before.status:needs-reviewinstead, notstatus:needs-qa.Why
status:needs-reviewand notstatus:needs-qafor the no-issue caseI checked both downstream workflows' own guard steps before picking a label:
qa-agent.yml's guard step (.github/workflows/qa-agent.yml:74-81) hard-stops when it can't resolve a linked issue — it posts "add aCloses #Nline" and setsskip=true. For a genuinely issue-less PR (no filed issue exists to link to), that instruction can never be satisfied, so routing these tostatus:needs-qawould just dead-end there silently — the exact same "stuck with no visible progress" failure mode this issue is about, just one hop further downstream.principal-review.yml's guard step (.github/workflows/principal-review.yml:100-113) already tolerates a missing linked issue gracefully by design (its own comment: "Deliberately non-fatal here, unlike dev-agent.yml/qa-agent.yml... proceeding without the issue-level status:blocked check").So an issue-less PR skips QA (there's no acceptance criteria to verify against anyway) and lands directly on
status:needs-reviewfor principal review, which is built to handle exactly this case.Risk
.github/workflows/pr-intake.ymlis asensitive_pathsmatch (.github/workflows/**) inagent-policy.yml, soclassify_pr_risk.pywill forcerisk:highon this PR regardless of diff size — flagging explicitly per the dev-agent persona rather than leaving the principal reviewer to rediscover why. The status-label branch (status:needs-qavsstatus:needs-review) is a new decision point I made confidently based on reading both downstream guard steps directly (cited above), not a guess — but it's still worth a human's own look given the sensitive path.No JVM/Kotlin code is touched (workflow YAML + inline bash only), so no unit tests apply here — verified the YAML parses (
python3 -c "import yaml; yaml.safe_load(...)") and both inline bash blocks passbash -n.Closes #343