-
Notifications
You must be signed in to change notification settings - Fork 15
fix(triage): skip code label for closed issues #1120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
58cbd92
d976aca
d48ebc4
90bddb4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -719,6 +719,23 @@ fi | |
|
|
||
| # --- Apply deferred label (must be last label mutation) --- | ||
|
|
||
| if [[ "${DEFERRED_LABEL}" == "ready-to-code" ]]; then | ||
| # Best-effort producer-side guard: don't route a closed issue to the code | ||
| # agent. tracker_issue_state normalizes each tracker's state to open/closed | ||
| # and returns non-zero when it cannot be determined, so we fail closed for | ||
| # both a verified-closed issue and an unverifiable one. The authoritative | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] Both PRs carry This block comment says the authoritative race guard "lives in the dispatch workflow (fullsend-ai/fullsend#6876)". As of today, fullsend#6876 is still OPEN (not merged) and fullsend#6156 is OPEN, so no such guard exists on either main branch. Both this PR ( Additionally, consumers pin the floating This is adjacent to the closure-race thread above (answered by pointing at #6876), but the point here is the accuracy of the cross-reference and issue-closing hygiene, which that thread does not address. Process-level rather than a code defect. Suggestion: reword to "the authoritative guard is tracked in fullsend-ai/fullsend#6876" (or merge #6876 first). Keep |
||
| # guard against the close-between-check-and-label race lives in the dispatch | ||
| # workflow (fullsend-ai/fullsend#6876), which reads the triggering event's | ||
| # issue state. | ||
| if ! ISSUE_STATE=$(tracker_issue_state); then | ||
| echo "::warning::Unable to verify issue #$(_gha_sanitize "${ISSUE_NUMBER}") state; skipping ready-to-code label" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [MEDIUM] Unverifiable issue state leaves an open bug with no routing label and a green run When All three To be fair, the script's existing convention for read failures is Suggestion: on the lookup-failure branch (as opposed to a confirmed-closed result), fall back to |
||
| DEFERRED_LABEL="" | ||
| elif [[ "${ISSUE_STATE}" != "open" ]]; then | ||
| echo "Issue #${ISSUE_NUMBER} is ${ISSUE_STATE}; skipping ready-to-code label" | ||
| DEFERRED_LABEL="" | ||
| fi | ||
| fi | ||
|
|
||
| if [[ -n "${DEFERRED_LABEL}" ]]; then | ||
| echo "Applying deferred label '${DEFERRED_LABEL}'..." | ||
| # forge_ensure_label creates the label via `gh` against REPO. On Jira, REPO | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MEDIUM] Jira
undefinedstatus category is routed as open, contradicting the fail-closed contractJira's
statusCategory.keyhas four documented values:undefined("No Category", id 1),new,indeterminate,done. The newtracker_issue_statereturns 1 for an empty key, but this wildcard branch mapsundefined(and any future/drifted key, or a case-shiftedDone) toopen. That is the one case where the tracker itself says it cannot categorise the status, yet the caller appliesready-to-codeand dispatches the code agent. This contradicts the function's own doc comment ("Returns non-zero if the state cannot be determined (caller fails closed)") and the PR's stated fail-closed design. The same code is bundled intopost-triage.sh:875andpre-triage.sh:871.Suggestion: allowlist the known in-flight keys and fail closed on everything else:
Update the doc comment to enumerate the four keys, regenerate the bundles (
make bundle/make check-bundle), and add Jira regression cases fornew(still open) andundefined(skipsready-to-code).