Repository navigation
Conversation
…ns dynamically When the triage agent marks an issue with action: completed, post-triage.sh currently reuses JIRA_SPLIT_TRANSITION (defaulting to "Obsolete" per ADR 0080/0081) to transition the issue in Jira Cloud. In workflows where "Obsolete" is not present, tracker_close_issue fails and post-triage.sh exits with status 1 under set -e. - Add JIRA_COMPLETED_TRANSITION (defaulting to "Closed") in harness/triage.yaml. - Decouple action: split from action: completed in scripts/post-triage.src.sh, mapping split to GitHub reason "completed" in github-triage-ops.lib.sh. - Add dynamic transition resolution and idempotency check in jira-triage-ops.lib.sh. - Rebuild script bundles via make script-build. - Document JIRA_COMPLETED_TRANSITION in docs/triage.md and LOCAL.md. - Add unit tests for completed transition, fallback, and idempotency in post-triage-test.sh. Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
PR Summary by QodoDecouple Jira completed and split transitions with safe fallback
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
Code Review by Qodo
1.
|
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
waynesun09
left a comment
There was a problem hiding this comment.
Review findings: 1 HIGH, 3 MEDIUM. Details are in the inline comments.
| # `fullsend issues` reads tracker.jira from this directory's config. | ||
| FULLSEND_DIR: ${FULLSEND_DIR} | ||
| JIRA_BASE_URL: ${JIRA_BASE_URL} | ||
| JIRA_COMPLETED_TRANSITION: "Closed" |
There was a problem hiding this comment.
HIGH: Default for completed changes on upgrade, but the PR has no breaking-change marker
Before this PR, completed used JIRA_SPLIT_TRANSITION (harness default "Obsolete"). The harness now always sets JIRA_COMPLETED_TRANSITION: "Closed", so every managed Jira run picks a different transition. The documented NOTICE fallback to JIRA_SPLIT_TRANSITION (lib lines 368-381, docs/triage.md) can never fire through the shipped harness.
Two groups break on upgrade:
- (a) Users whose overlay set only
JIRA_SPLIT_TRANSITIONto get their owncompletedtransition now get "Closed" or a Done fallback instead, with no warning. - (b) Custom workflows that offer "Obsolete" but none of Done/Closed/Resolved/Complete used to succeed and now exit 1: the fallback regex at line 443 excludes "obsolete".
COMMITS.md:79 lists "Default values change in ways that alter existing behavior" as breaking, and COMMITS.md:115 asks reviewers to flag a missing ! as high severity. The title and all three commits are plain fix(triage): with no BREAKING CHANGE: trailer.
Suggestion: Retitle to fix(triage)!: and add a BREAKING CHANGE: trailer: completed now uses JIRA_COMPLETED_TRANSITION (harness default "Closed", with a Done-category fallback), and overlays that set only JIRA_SPLIT_TRANSITION must also set JIRA_COMPLETED_TRANSITION. Also fix docs/triage.md and the lib header so they no longer suggest the fallback to JIRA_SPLIT_TRANSITION applies under the harness. The alternative is to leave the harness value empty so the documented fallback really runs.
There was a problem hiding this comment.
Fixed in a274b35: removed JIRA_COMPLETED_TRANSITION: "Closed" from harness/triage.yaml (and updated LOCAL.md to match) so existing overlays and custom workflows preserve the documented fallback to JIRA_SPLIT_TRANSITION unless explicitly overridden.
| "" true | ||
|
|
||
| # Jira completed action falls back to JIRA_SPLIT_TRANSITION when JIRA_COMPLETED_TRANSITION is unset. | ||
| ( |
There was a problem hiding this comment.
MEDIUM: Test jira-completed-fallback-to-split-var runs in a subshell, so its failures never reach the suite
Lines 2437-2442 call run_jira_test_stdout inside ( unset JIRA_COMPLETED_TRANSITION; ... ). The helper (line 2341) records a failure only with FAILURES=$((FAILURES + 1)) and returns 0. That increment is lost when the subshell exits, so the suite still prints All tests passed and exits 0. Changing the expected string so it cannot match confirms this: the run prints FAIL for this test and still exits 0. The JIRA_COMPLETED_TRANSITION -> JIRA_SPLIT_TRANSITION fallback therefore has no working regression test. The same file already handles env-changing cases correctly at lines 2967-2977 (JIRA_CASE_FAILURES file plus jira_case_fail).
Suggestion: Drop the subshell. Save JIRA_COMPLETED_TRANSITION, unset it, call the helper, then restore it. Or record the failure through the JIRA_CASE_FAILURES file mechanism. Then repeat the mutation check to confirm a broken expectation now fails the suite.
There was a problem hiding this comment.
Fixed in a274b35: replaced the subshell around jira-completed-fallback-to-split-var in scripts/post-triage-test.sh with save/restore of JIRA_COMPLETED_TRANSITION in the parent shell so FAILURES increments propagate to the suite.
| local is_rejection_status=0 | ||
| local dup_name="${JIRA_DUPLICATE_TRANSITION:-}" | ||
| local not_planned_name="${JIRA_NOT_PLANNED_TRANSITION:-}" | ||
| if echo "${current_status_name}" | grep -qiE "won.?t do|not.?planned|duplicate|obsolete|reject|cancel|invalid|cannot reproduce|abandon"; then |
There was a problem hiding this comment.
MEDIUM: Re-running split on an issue already in "Obsolete" overwrites it to Done/Closed
The shipped split status is JIRA_SPLIT_TRANSITION="Obsolete", but "obsolete" is in the rejection regex in both the idempotency check (line 399) and the fallback exclusion (line 443). On a split re-run for an issue already in "Obsolete": is_rejection_status=1, so the split skip at lines 407-411 does not fire. The exact "Obsolete" transition is usually not offered from the Obsolete status, so the fallback picks Done/Closed and POSTs it. The issue moves out of its split resolution into a plain completed one. The split path has no tests for idempotency or fallback.
Suggestion: For reason=split, count the current status as handled when it matches the configured JIRA_SPLIT_TRANSITION name (case-insensitive), before the rejection regex is checked. More generally, skip when the current status matches the configured target for this reason. Add tests for split re-run on an Obsolete issue and for split when the Obsolete transition is unavailable.
There was a problem hiding this comment.
Fixed in a274b35: tracker_close_issue in scripts/lib/jira-triage-ops.lib.sh now checks case-insensitive equality against the target transition_name before evaluating the rejection regex, so re-running split when already in "Obsolete" skips idempotently. Added jira-split-idempotent-obsolete and jira-split-fallback-done tests.
| local not_planned_name="${JIRA_NOT_PLANNED_TRANSITION:-}" | ||
| if echo "${current_status_name}" | grep -qiE "won.?t do|not.?planned|duplicate|obsolete|reject|cancel|invalid|cannot reproduce|abandon"; then | ||
| is_rejection_status=1 | ||
| elif [[ -n "${dup_name}" ]] && echo "${current_status_name}" | grep -qiF "${dup_name}"; then |
There was a problem hiding this comment.
MEDIUM: Configured transition names are matched as status substrings, which breaks the documented "set all four to the same name" setup
Lines 401-404 mark the current status as a rejection when its name contains JIRA_DUPLICATE_TRANSITION or JIRA_NOT_PLANNED_TRANSITION (grep -qiF, substring match). Those values are transition names, not status names. docs/triage.md tells users whose workflow does not tell outcomes apart to "Set all four to the same transition name", e.g. all "Done". With that setup, an issue already in status "Done" counts as a rejection, so the completed/split idempotent skip never fires. The exact "Done" transition is normally not offered from Done. The fallback (lines 438-441) then removes every transition whose name equals the duplicate/not-planned names, which is "Done" again. The run ends with ERROR: transition 'Done' ... is not available and exits 1, the failure this PR set out to remove, reached by following the docs.
Suggestion: Do not use the duplicate/not-planned names to classify status when they equal the name configured for the current reason. Better, compare the current status to the configured name for the requested reason first and skip on a match. Add a test with all four variables set to "Done" and the issue already in Done.
There was a problem hiding this comment.
Fixed in a274b35: dup_name and not_planned_name are now compared case-insensitively for equality only when they differ from transition_name, both in the pre-flight status check and in the fallback jq exclusion selector. Added jira-all-four-done-idempotent-completed covering all four transition vars set to "Done".
…tatus checks Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
waynesun09
left a comment
There was a problem hiding this comment.
Review findings: 4 MEDIUM. Details are in the inline comments.
| # the raw REST calls in this file and the `fullsend` shell-outs below. | ||
| # | ||
| # Optional env vars: | ||
| # JIRA_COMPLETED_TRANSITION — transition name for the "completed" action |
There was a problem hiding this comment.
MEDIUM: Header comment and PR body still say JIRA_COMPLETED_TRANSITION defaults to "Closed"; the shipped harness has no default
Commit a274b35 removed JIRA_COMPLETED_TRANSITION: "Closed" from harness/triage.yaml, and harness/triage.yaml is no longer in the diff. This header (lines 46-48) still says (default: "Closed"; falls back to JIRA_SPLIT_TRANSITION when unset), and the rebuilt bundles carry the same text (scripts/post-triage.sh, scripts/pre-code-jira.sh, scripts/pre-triage.sh). The PR body also still says it "Adds JIRA_COMPLETED_TRANSITION (defaulting to "Closed") in harness/triage.yaml" and lists triage.yaml under Changes.
With the shipped harness, completed falls back to JIRA_SPLIT_TRANSITION="Obsolete". So completed is decoupled from split only for operators who set the variable, and the reported failure is fixed by the name fallback, not by decoupling. LOCAL.md and docs/triage.md are correct; this header, which operators read first, is wrong. (The earlier header thread asked to add a "Closed" default; that default was later removed, so this is a new mismatch.)
Suggestion: Change the header to "no default; falls back to JIRA_SPLIT_TRANSITION when unset" and run make script-build so all four copies match. Update the PR title and body to say that, by default, completed still routes through JIRA_SPLIT_TRANSITION (with the Done-name fallback) and that harness/triage.yaml is unchanged.
There was a problem hiding this comment.
Fixed in 20bebaa (20bebaa): updated the JIRA_COMPLETED_TRANSITION header comment in scripts/lib/jira-triage-ops.lib.sh (and rebuilt the bundles) to state (no default; falls back to JIRA_SPLIT_TRANSITION when unset), and updated the PR body to remove the stale "Closed" default / harness/triage.yaml references and note that validation used mocked workflow responses (linking fullsend-ai/fullsend#6704).
| | not | ||
| ) | ||
| ] as $done_transitions | ||
| | ([$done_transitions[] | select(.name | test("(?i)^(done|closed|resolved|complete(d)?)$"))][0].id // empty) |
There was a problem hiding this comment.
MEDIUM: Fallback matches only exact transition names, so common workflows still fail; docs describe a broader fallback
The fallback keeps a done-category transition only when its transition .name exactly matches ^(done|closed|resolved|complete(d)?)$. In Jira, the transition name and the target status (.to.name) are separate fields. Transitions named "Resolve Issue", "Close Issue", "Close", "Mark as done", "Finished", "Fixed" and so on do not match, even when they lead to a Done/Closed/Resolved status. The action then still exits 1 with "transition ... is not available" under set -e, which is the failure this PR set out to remove.
docs/triage.md (lines 292-295) promises a fallback to "an available positive Done-category transition (preferring "Done", "Closed", "Resolved", or "Complete")". That wording implies other positive Done transitions are accepted and that there is a priority order. The code accepts only those exact names and takes [0] in API order. Only mocked tests back the change.
Suggestion: Select candidates by .to.statusCategory.key == "done" and match the positive list against (.to.name // .name), keeping the rejection exclusion on both .name and .to.name. Rank matches explicitly if the docs keep the word "preferring". Otherwise narrow docs/triage.md to "the first available transition named exactly Done, Closed, Resolved, or Complete(d)". Please also state in the PR whether this was validated against a live team-managed or company-managed project.
There was a problem hiding this comment.
Fixed in 20bebaa (20bebaa): the fallback selector in scripts/lib/jira-triage-ops.lib.sh now matches positive Done-category names against (.to.name // .name) while keeping rejection exclusions on both .name and .to.name, and ranks tier-1 exact matches (Done, Closed, Resolved, Complete(d)) ahead of tier-2 word-boundary matches so transitions such as "Resolve Issue" -> "Resolved" work cleanly. Added jira-completed-fallback-resolve-issue coverage in scripts/post-triage-test.sh and rebuilt bundles.
| is_rejection_status=1 | ||
| elif [[ -n "${not_planned_name}" && "${not_planned_name,,}" != "${transition_name,,}" && "${current_status_name,,}" == "${not_planned_name,,}" ]]; then | ||
| is_rejection_status=1 | ||
| fi |
There was a problem hiding this comment.
MEDIUM: duplicate and not planned treat any rejection status as already handled, and this path has no tests
In the idempotency pre-flight (lines 401-414), any done-category status that matches the broad rejection regex (won't do|not planned|duplicate|obsolete|reject|cancel|invalid|cannot reproduce|abandon), or that equals the dup or not-planned name, returns 0 for both duplicate and not planned. So a not planned action on an issue already in "Duplicate" (or a duplicate action on an issue in "Won't Do" or "Obsolete") reports success and keeps the wrong resolution. Before this PR, the transition was attempted and failed visibly if unavailable.
This is the same class as the earlier "wrong resolution" thread, which was fixed only for completed/split. The new (rejected); skipping transition branch has no test: MOCK_JIRA_STATUS_REJECTED is used only for the split-Obsolete case (scripts/post-triage-test.sh ~2456-2477).
Suggestion: For duplicate and not planned, skip only when the current status equals the configured transition name or its target status; otherwise attempt the transition as before. Add MOCK_JIRA_STATUS_REJECTED tests for duplicate and not planned, including one where the issue is in the other rejection status.
There was a problem hiding this comment.
Fixed in 20bebaa (20bebaa): removed the broad rejection-regex short-circuit for duplicate and not planned so they only skip idempotently when the current Jira status matches the configured transition name or its .to.name target status. Added jira-duplicate-on-wont-do-transitions and jira-not-planned-idempotent-wont-do (plus -no-post) tests in scripts/post-triage-test.sh.
| transition_id=$(echo "${transitions}" | jq -r --arg name "${transition_name}" \ | ||
| '[.transitions[] | select(.name == $name)][0].id // empty') | ||
|
|
||
| # Fallback resolution when configured transition name is not directly available |
There was a problem hiding this comment.
MEDIUM: An explicitly configured transition that does not exist is now silently replaced by the heuristic fallback
For completed and split, when the configured name is missing from the issue's transitions, the code falls back to any Done/Closed/Resolved/Complete transition. It logs only a plain stdout line and the run succeeds. A typo or stale override (for example JIRA_COMPLETED_TRANSITION="Closd", or a renamed workflow transition) used to fail the post-script. Now it quietly closes the issue through a different transition, with no CI annotation for the operator. No linked issue or ADR records this change to the operator contract; the fullsend Jira user guide points tracker-neutral transition discovery at fullsend-ai/fullsend#6704.
Suggestion: Print the fallback message as a ::warning:: annotation so operators see the substitution in the run summary, and link the PR to fullsend-ai/fullsend#6704 or to an issue that records the new behaviour.
There was a problem hiding this comment.
Fixed in 20bebaa (20bebaa): emitted a ::warning::Transition '...' is not available on issue ...; falling back to '...' via Done-category heuristics annotation (sanitized via _gha_sanitize) when substituting a missing transition, updated jira-completed-fallback-done to assert it, and linked fullsend-ai/fullsend#6704 in the PR description.
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
waynesun09
left a comment
There was a problem hiding this comment.
Review findings: 1 MEDIUM. Details are in the inline comment.
| | select( | ||
| ($dup != "" and ($dup | ascii_downcase) != ($target | ascii_downcase) and (($n | ascii_downcase) == ($dup | ascii_downcase) or ($to | ascii_downcase) == ($dup | ascii_downcase))) or | ||
| ($not_planned != "" and ($not_planned | ascii_downcase) != ($target | ascii_downcase) and (($n | ascii_downcase) == ($not_planned | ascii_downcase) or ($to | ascii_downcase) == ($not_planned | ascii_downcase))) or | ||
| ($n | test("(?i)won.?t do|not.?planned|duplicate|obsolete|reject|cancel|invalid|cannot reproduce|abandon")) or |
There was a problem hiding this comment.
MEDIUM: The rejection denylist misses common Jira rejection names, so the completed/split fallback can close an issue as "Won't Fix"
The fallback added in 20bebaa ranks a transition as positive when its name OR its target status (.to.name) matches the tier-1 or tier-2 positive regex (lines 458-459). Rejections are excluded only by a fixed denylist: won.?t do|not.?planned|duplicate|obsolete|reject|cancel|invalid|cannot reproduce|abandon. The same list appears at line 403 (bash grep) and lines 452-453 (jq).
Common Jira rejection names are not on it: "Won't Fix", "Won't Implement", "Declined", "Deferred", "Not a Bug" and "As Designed".
- Fallback: a transition named "Close Issue" (tier 2 matches
\bclose\bon.name), or one named "Closed", whose.to.nameis "Won't Fix", passes the filter and can be picked. Acompletedorsplitaction then closes the issue as rejected, whichdocs/triage.mdsays is excluded. - Pre-flight (line 403): an issue already in "Won't Fix" or "Declined" gets
is_rejection_status=0, socompletedskips with "already in status ... (done)" and never moves the issue to a positive Done status.
The earlier Qodo comment covered the older last-resort [0] fallback. This one is about the tier-2 .name/.to.name matching added in 20bebaa.
Suggestion
- Do not accept a match on
.namewhen.to.nameis present and not itself positive. For tier 1, match only exact positive.to.namevalues. - Add
won.?t (fix|implement)|declin|defer|not a bug|as designed|out of scopeto the denylist. - Move the regex into one shared variable and pass it to jq with
--arg, so the bash and jq copies cannot drift apart. - Change
jira-completed-fallback-doneto assert the POST body ({"transition":{"id":"51"}}) instead of only the warning text. Add a mock with a "Close Issue" -> "Won't Fix" transition next to Done.
For a more robust check, read the resolution field (fields=status,resolution) in the pre-flight.
There was a problem hiding this comment.
Addressed in f7716a7b (f7716a7b5536d3b2c09b37841c1360551c9508e1):
- Shared rejection regex (
rejection_re) & expanded terms: Extracted the rejection pattern into one sharedrejection_revariable in_jira_transition_issue(used by pre-flightgrep -qiEand passed tojqvia--arg reject_re), addingwon.?t (do|fix|implement),declin,defer,not a bug,as designed, andout of scope. - Require positive
.to.namewhen present: Updated tier-1 and tier-2 fallback selection so when.to.nameis non-empty,.to.nameitself must satisfy the positive pattern (falling back to.nameonly when.to.nameis empty), preventing transitions likeClose Issue->Won't Fixfrom matching on.name. - Bundled scripts & strengthened tests: Rebuilt all bundled scripts (
make -B script-build), verified zero diff withmake check-bundle, passedshellcheck -S warning,post-triage-test.sh(bothsourceandbundled),pre-triage-test.sh, andpre-code-jira-test.sh. Updatedjira-completed-fallback-doneto assert the{"transition":{"id":"51"}}POST payload + warning, and addedjira-completed-fallback-skips-close-issue-wont-fix.
…et status Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
| fi | ||
| fi | ||
|
|
||
| if [[ -z "${transition_id}" ]]; then |
There was a problem hiding this comment.
MEDIUM: The Done-category fallback POSTs a transition the operator never configured, and sends no resolution
When the configured transition is missing for completed/split, the fallback (lines 437-471) now picks a heuristic transition. One example is classic "Resolve Issue" -> "Resolved", which the jira-completed-fallback-resolve-issue test models. The code then POSTs only {transition:{id}} here. It does not check hasScreen or expand=transitions.fields, and it does not set fields.resolution.
In company-managed or classic workflows, the transition screen supplies Resolution. Through REST, such a transition either fails validation (400) or leaves the issue Done but "Unresolved". Before this PR, the code only POSTed a transition the operator had chosen. The fallback now does the same with transitions nobody vetted. fullsend-ai/fullsend#6704, which this PR links, lists supplying a resolution as part of the transition as a requirement.
The pre-flight has the same blind spot. It requests fields=status only (line 392), so a "Closed" issue with resolution "Won't Fix" still counts as already completed. An earlier comment mentioned reading the resolution field only as an optional extra. The new part here is the fallback POST.
Suggestion
- In the fallback, prefer candidates with
hasScreen == false. - Otherwise fetch
?expand=transitions.fields. If the screen has a Resolution field, setfields.resolution(for example "Done" or "Fixed"). If not, skip that candidate and fail loudly. - Add a mock test for a candidate whose screen requires a resolution.
- Optional: request
fields=status,resolutionin the pre-flight and treat a rejection-class resolution like a rejection status.
There was a problem hiding this comment.
Fixed in 711a39e7 (fix(triage): handle screen resolution fields in Jira fallback).
Summary of changes in scripts/lib/jira-triage-ops.lib.sh:
- Pre-flight status & resolution guard: Now queries
?fields=status,resolutionand checks.fields.resolution.nameagainstrejection_reacross the completed/split pre-flight idempotency checks so aClosedissue with a rejection resolution (e.g.,Won't Fix) is not treated as already completed. - Screen-aware fallback transitions: Fallback listing queries
/transitions?expand=transitions.fields, prefers transitions withhasScreen == falsebeforehasScreen == truewithin each tier, rejectshasScreen: truecandidates with missing/empty.fields, required non-resolutionfields, or requiredresolutionlacking a positiveallowedValuesmatch (^(done|fixed|resolved|completed?)$), and populatesfields.resolution.namein the transition POST body when.fields.resolutionis present. - Mock coverage: Updated mock
/transitionsendpoints to match?expand=transitions.fieldsand added regression tests covering screenless preference,fields.resolutionpopulation, skipping transitions with required custom screen fields, and theClosed+Won't Fixpre-flight case.
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com> # Conflicts: # LOCAL.md
waynesun09
left a comment
There was a problem hiding this comment.
Review findings: 1 MEDIUM. Details are in the inline comment.
| fi | ||
| if [[ "${current_category}" == "done" ]]; then | ||
| if [[ -n "${current_status_name}" && "${current_status_name,,}" == "${transition_name,,}" ]]; then | ||
| if [[ ( "${reason}" != "completed" && "${reason}" != "split" ) || ${is_rejection_resolution} -eq 0 ]]; then |
There was a problem hiding this comment.
MEDIUM: A split re-run on an issue already closed as Obsolete, with resolution Obsolete, POSTs the transition again or falls back to Done
Commit 711a39e added a resolution gate, and it undoes the fix from a274b35 for the earlier "split re-run in Obsolete" thread. The harness default is JIRA_SPLIT_TRANSITION="Obsolete", and obsolete is in rejection_re. When the issue is in status Obsolete with a rejection-class resolution (Obsolete, Won't Do), is_rejection_resolution=1. That value turns off three skips for completed/split:
- the exact-name skip (this line)
- the generic done skip (
is_rejection_statusis 1 anyway, because the status name matches the regex) - the
.to.nametarget-status skip (line 452)
There are two outcomes:
- If the workflow offers an Obsolete self-transition, the script POSTs it again. That is not idempotent and can fail.
- If it does not, the fallback picks a Done-category transition, emits a
::warning::, and re-closes a correctly closed split issue as Done.
The test jira-split-idempotent-obsolete mocks only resolution: null, so it misses this case.
Suggestion: When the current status equals the configured transition name or its .to.name, treat the issue as already done, whatever its resolution. Use the rejection-resolution check only for the generic "any done status" skip. Never fall back when the current status already equals the configured target. Add tests for status Obsolete with resolution Obsolete, both with and without a self-transition in the list.
There was a problem hiding this comment.
Addressed in 32c489e9 (32c489e9ebdbf443af266acf51f0286cffa527ae), following an append-only merge of origin/main in f1af399c:
- Exact-status &
.to.nameidempotency: Removed theis_rejection_resolutiongate from both the exact status-name match (scripts/lib/jira-triage-ops.lib.sh) and the.to.nametarget-status match, so an issue already in the configured target status is skipped regardless of its resolution and never re-POSTed or fallen back to Done. - Generic Done-category skip preserved: Kept
is_rejection_resolutionstrictly on the generic "any done status" skip, and updatedjira-completed-preflight-done-wont-fix-not-satisfiedto test a non-target Done status (DonewhileJIRA_COMPLETED_TRANSITION="Closed") with resolutionWon't Fix. - Regression tests: Added
jira-split-idempotent-obsolete-res-with-self-transition,jira-split-idempotent-obsolete-res-without-self-transition, andjira-split-idempotent-obsolete-to-name-with-resinscripts/post-triage-test.sh. - Verification: Passed
make -B script-build && make check-bundle,shellcheck -S warning, andscripts/post-triage-test.shunder bothSCRIPT_TEST_TARGET=sourceandSCRIPT_TEST_TARGET=bundled.
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com> # Conflicts: # scripts/post-triage-test.sh
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
waynesun09
left a comment
There was a problem hiding this comment.
Review findings: 1 HIGH, 3 MEDIUM. Details are in the inline comments.
The functional-tests-complete failure is not caused by the code. It fails only because the /ok-to-test <sha> authorization gate has not run.
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| # shellcheck source=lib/triage-ops.lib.sh | ||
| # BEGIN bundled: lib/triage-ops.lib.sh | ||
| # BEGIN bundled: /private/tmp/pr-audit-agents-1998/scripts/lib/triage-ops.lib.sh |
There was a problem hiding this comment.
HIGH: Rebuilt bundles embed an absolute local build path, so the required script-test check fails
At head 32c489e, all 16 bundled scripts contain markers like # BEGIN bundled: /private/tmp/.../scripts/lib/.... This includes post-triage.sh, pre-code.sh, post-code.sh, pre-code-jira.sh and the others. On main, the marker is lib/....
The cause is scripts/bundle-sh.sh:168. rel_comment strips ${src_dir}/ from a path that realpath has canonicalized. On macOS, /tmp is a symlink to /private/tmp, so the prefix never matches and the absolute path gets written.
CI confirms it. script-test fails with Bundled script stale: scripts/pre-code.sh (run make script-build), although the PR says make check-bundle passes. The rebuild also publishes a local path and adds about 250 lines of noise to files the PR does not otherwise change.
Suggestion: Rebuild the bundles from a checkout whose path has no symlinked parent, or on Linux. Then confirm that make check-bundle passes and that bundles which don't include a changed lib (for example scripts/post-code.sh) show no diff against origin/main. Optionally, in a separate PR, canonicalize src_dir in bundle-sh.sh before the prefix strip.
There was a problem hiding this comment.
Addressed in dcf84f2f (dcf84f2fe3fba3837db0a2ba3a741353cf041f85) and re-verified after the latest rebuild in f34c0392:
- Rebuilt bundled scripts from the physical worktree path so
bundle-sh.shemits relativelib/...markers. - Confirmed zero
/private/tmppaths remain inscripts/andmake check-bundleexits 0.
| is_rejection_resolution=1 | ||
| fi | ||
| if [[ "${current_category}" == "done" ]]; then | ||
| if [[ -n "${current_status_name}" && "${current_status_name,,}" == "${transition_name,,}" ]]; then |
There was a problem hiding this comment.
MEDIUM: A split re-run re-closes the issue as Done when the transition name differs from the status name
The idempotency skips compare the current status with only two names: the configured transition name (here) and the offered transition's .to.name (lines 452-457).
Example: JIRA_SPLIT_TRANSITION='Mark Obsolete' moves an issue to status Obsolete. On a split re-run:
- The issue is already in
Obsolete, so the exact-name check misses. obsoletematchesrejection_re, sois_rejection_status=1and the generic done skip is turned off.Mark Obsoleteis not offered fromObsolete, sotransition_idis empty and the.to.namecheck never runs.- The fallback (lines 465-536) then re-closes the already-split issue as Done and emits a warning.
The test jira-split-idempotent-obsolete-to-name-with-res covers only the case where the self-transition is still offered. The earlier thread fixed the case where the status name equals the transition name. This variant is still open.
Suggestion: Before falling back for split/completed, also treat a done-category current status as satisfied when it is the target status of the configured transition. One option is to accept a status that matches rejection_re when the reason is split. Another is to resolve the configured transition's target status some other way. Add a test with JIRA_SPLIT_TRANSITION='Mark Obsolete', status Obsolete, and no self-transition offered.
There was a problem hiding this comment.
Addressed in f34c0392 (f34c03921f4c158bca17e5c6b47ca473403a86f6):
- Before falling back for
split, when the configured transition is not offered (transition_idis empty) and the issue is already in adone-category status that does not matchJIRA_DUPLICATE_TRANSITIONorJIRA_NOT_PLANNED_TRANSITION,tracker_close_issuenow skips idempotently instead of re-closing asDonewith a warning. - Added regression tests
jira-split-idempotent-mark-obsolete-no-self-transition(confirming noPOST /transitionsand no::warning::withJIRA_SPLIT_TRANSITION='Mark Obsolete', statusObsolete, and onlyDoneoffered) andjira-split-on-duplicate-status-not-skipped(negative control).
| test("^(done|fixed|resolved|completed?)$"; "i"); | ||
| def positive_res_name($t): | ||
| if ($t.fields?.resolution? == null) then "" | ||
| elif (($t.fields.resolution.allowedValues // []) | length) == 0 then "Done" |
There was a problem hiding this comment.
MEDIUM: The fallback can send a hard-coded resolution Done that the Jira instance may not have
positive_res_name returns the literal "Done" when a transition screen has a resolution field but allowedValues is empty or missing. Lines 543-546 then POST fields:{resolution:{name:"Done"}}.
Resolution names vary by instance (Fixed, Resolved, Completed). If Done does not exist, Jira returns 400 and the post-script exits 1. That is the same hard failure this PR sets out to remove.
Suggestion: When no positive allowed value can be derived, return "" so the payload carries only the transition id. Or treat the transition as ineligible when its resolution is required.
There was a problem hiding this comment.
Addressed in f34c0392 (f34c03921f4c158bca17e5c6b47ca473403a86f6):
positive_res_namenow returns""instead of hard-coding"Done"whenfields.resolution.allowedValuesis empty or missing.screen_eligiblenow checkspositive_res_name(.) != ""wheneverfields.resolution.requiredistrue, treating required-resolution screens with empty/missingallowedValuesas ineligible while allowing optional-resolution screens to omitfields.resolution.- Added regression tests
jira-completed-fallback-screen-required-res-empty-allowed-skipped,jira-completed-fallback-screen-optional-res-empty-allowed-omits-res, andjira-completed-fallback-screen-non-done-resolution.
| fi | ||
| fi | ||
|
|
||
| # Fallback resolution when configured transition name is not directly available |
There was a problem hiding this comment.
MEDIUM: The Jira fallback and resolution payload were tested only against hand-written mocks
The new selection logic depends on several Jira Cloud REST behaviours:
expand=transitions.fieldsfillsfields.resolution.allowedValuesandrequiredonly for transitions with a screenhasScreenis set on each transition- each transition carries
to.nameandto.statusCategory.key - POST
/transitionsacceptsfields.resolution.nameon a fallback transition
The PR body says this was not tested against a live Jira Cloud project, and some mock shapes differ from real responses. Under set -e, a mismatch makes the post-script fail hard.
Suggestion: Before merge, run post-triage completed and split against a real Jira Cloud dev project. Cover two projects: one team-managed project without Obsolete, and one company-managed project with a resolution screen on Done. Record the observed transition JSON and the outcomes in the PR, and refresh the mocks from those responses.
There was a problem hiding this comment.
Addressed in f34c0392 (f34c03921f4c158bca17e5c6b47ca473403a86f6) and updated the PR description:
- Verified the live Jira Cloud REST API v3 response shape via read-only
GET /rest/api/3/issue/{key}/transitions?expand=transitions.fields, confirmingexpand: "transitions",hasScreenbooleans,to.name,to.statusCategory.key, emptyfields: {}on screenless transitions, andfields.resolution.{required,allowedValues}on screened transitions. - Fed the live response directly into the extracted
jqselection filter fromjira-triage-ops.lib.sh, which cleanly selected{"id":"61","name":"Closed","resolution_name":"Done"}(skipping non-tierRelease Pendingand non-done transitions). - Added
jira-completed-fallback-live-cloud-shapetoscripts/post-triage-test.shreflecting the observed Jira Cloud response shape and documented the sanitized JSON excerpt in the PR body (noting transparently that live writePOST /transitionstesting was not executed against a production project and would require a dedicated scratch Jira Cloud dev project).
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
waynesun09
left a comment
There was a problem hiding this comment.
Review findings: 2 MEDIUM. Details are in the inline comments.
| fi | ||
| fi | ||
|
|
||
| # Fallback resolution when configured transition name is not directly available |
There was a problem hiding this comment.
MEDIUM: The fallback rebuilds Jira close logic in bash, though fullsend already has fullsend issues transition --state closed with the opposite rule
The PR links fullsend-ai/fullsend#6704. fullsend PR #9437 closed that issue: it merged 2026-11-13 and shipped in v0.56.1. It added fullsend issues transition (see internal/cli/issues_transition.go and internal/tracker/transition.go on fullsend main). With --state closed, the command does three things:
- It skips when statusCategory is already
done. - It picks the single available transition whose
to.statusCategory.key == "done", and returns an "ambiguous Jira transition" error when more than one matches. - It fills a required resolution only when Jira offers exactly one valid allowed value and the field has no default, and it sends that resolution by
id.
Its help text says: "No arbitrary workflow action or resolution is chosen."
This PR adds about 100 lines of jq at lines 465-540 that do the opposite:
- They rank transitions by English keywords (tier 1 Done/Closed/Resolved/Complete, tier 2 finish/fixed/...) and take the first match.
- They pick a resolution by name with
^(done|fixed|resolved|completed?)$. - They exclude rejections with an English denylist (
rejection_re, line 410).
The library already shells out to fullsend issues for comments (header lines 8-44). As written, agents and core fullsend close the same Jira workflow under two different policies.
Suggestion: For the completed/split fallback, call fullsend issues transition --tracker jira --number N --state closed, or try --transition "$JIRA_*_TRANSITION" first and use --state closed when that transition is missing. Raise the minimum fullsend version if needed. If keyword ranking is really wanted, agree that policy upstream first so both repos follow one rule. Otherwise, say in the PR why the CLI does not fit, and send the resolution by allowedValues id instead of by name.
There was a problem hiding this comment.
Addressed in 8907b96d (8907b96d3fa492aec5239836b2aca5487e75c173):
- Removed the ~100-line bash/jq keyword-ranking fallback, English rejection denylist (
rejection_re), and resolution-by-name picker fromscripts/lib/jira-triage-ops.lib.sh. - Delegated Jira close transitions to
fullsend issues transition --tracker jiravia_jira_transition(usingjira_auth_fullsendand--fullsend-dir, matching_jira_post_comment):- When the configured transition is offered, invokes
fullsend issues transition --transition "${transition_name}"(sofullsendenforces exact/unambiguous matching and upstream resolution-by-ID handling). - When the configured transition is unavailable for
completedorsplit, emits a::warning::and falls back tofullsend issues transition --state closedsoagentsand corefullsendfollow one shared close policy.
- When the configured transition is offered, invokes
- Updated
docs/triage.mdto document the Fullsend v0.56.1 (fullsend-ai/fullsend#9437) requirement and exact CLI behavior, rebuilt script bundles (make -B script-build && make check-bundle), and updatedscripts/post-triage-test.sh(verified withshellcheck -S warningand bothsourceandbundledruns ofpost-triage-test.sh,pre-triage-test.sh, andpre-code-jira-test.sh).
|
|
||
| # Fallback resolution when configured transition name is not directly available | ||
| local fallback_resolution_name="" | ||
| if [[ -z "${transition_id}" ]]; then |
There was a problem hiding this comment.
MEDIUM: The split re-run skip silently accepts any done-category status, including rejections the main pre-flight refuses to skip
Commit f34c039 added a split-only block at lines 467-474. When the configured split transition is not offered and the issue is in a done-category status, the block returns 0 unless the status name exactly equals JIRA_DUPLICATE_TRANSITION or JIRA_NOT_PLANNED_TRANSITION. It does not check rejection_re or is_rejection_resolution, which the main pre-flight at lines 432-447 uses to decide not to skip.
Failure case: an issue sits in "Won't Fix", "Rejected", "Cancelled" or "Deferred", or in Closed with a rejection resolution, and its workflow does not offer "Obsolete". A split action then reports success: sub-issues are created and the parent keeps its rejection state. The completed reason on the same issue would treat that state as a rejection and transition the issue. This block was meant only to count a parent already in the split target (for example Obsolete reached via "Mark Obsolete") as already handled.
Suggestion: Narrow the exception. Skip only when the current status is the split target: it matches JIRA_SPLIT_TRANSITION, or it matches the .to.name of a transition with that name. Otherwise reuse the main pre-flight's is_rejection_status result. Add a test for split on an issue in "Won't Fix" when the split transition is not offered.
There was a problem hiding this comment.
Addressed in 8907b96d (8907b96d3fa492aec5239836b2aca5487e75c173):
- Removed the split-only catch-all
done-status skip block (along with the bashrejection_redenylist as part of delegating close transitions tofullsend issues transition). - Pre-flight idempotency now skips only when the issue is already in a
done-category status whose name matches the configured transition name directly, or matches.to.namewhen a single transition with the configured name is offered. - For
spliton an issue in"Won't Fix"whenJIRA_SPLIT_TRANSITIONis not offered,tracker_close_issueno longer takes an early bash skip; bothsplitandcompletednow take the same path, emit the fallback warning, and delegate tofullsend issues transition --state closed. - Added
jira-split-on-wont-fix-missing-transition-not-skipped(plus.to.namemismatch and ambiguous-transition tests) inscripts/post-triage-test.sh; verified in bothsourceandbundledmodes.
Replace the custom bash/jq keyword-ranking fallback and English rejection denylist in tracker_close_issue with fullsend issues transition (available since Fullsend v0.56.1 / fullsend-ai/fullsend#9437). - Check exact target-status idempotency (status matches configured transition name or its .to.name when in a done-category status) and remove the split-only catch-all skip block. - Delegate available configured transitions to fullsend issues transition --transition and completed/split fallbacks to fullsend issues transition --state closed so agents and core fullsend share one transition and resolution policy. - Update docs/triage.md (documenting the Fullsend v0.56.1 requirement), rebuild script bundles, and update scripts/post-triage-test.sh including split on Won't Fix when the split transition is missing. Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
waynesun09
left a comment
There was a problem hiding this comment.
Review findings: 1 MEDIUM. Details are in the inline comment.
| if [[ "${reason}" == "completed" || "${reason}" == "split" ]]; then | ||
| echo "::warning::Transition '$(_gha_sanitize "${transition_name}")' (from ${transition_var}) is not available on issue ${ISSUE_NUMBER}; falling back to 'fullsend issues transition --state closed'" | ||
| if ! _jira_transition --state closed; then | ||
| echo "ERROR: failed to close issue ${ISSUE_NUMBER} via 'fullsend issues transition --state closed'" >&2 | ||
| return 1 |
There was a problem hiding this comment.
MEDIUM: The --state closed fallback can close a completed or split issue through a rejection-type transition, even when the operator set the name
When the configured transition for completed or split is not offered, this block prints only a ::warning:: and runs fullsend issues transition --state closed. That command applies whatever single transition reaches a done-category status. This commit removed the bash rejection denylist, so nothing now stops that transition from being "Won't Do", "Duplicate" or "Cannot Reproduce".
Impact:
- A positive triage decision can be recorded in Jira as a rejection. For
split, the result also looks the same as any other close. - The fallback runs for names the operator set too. The test at
scripts/post-triage-test.shlines 2539-2556 (JIRA_COMPLETED_TRANSITION="NonExistent") passes and closes the issue anyway, so a typo or stale override is never a failure. - The harness default is
JIRA_SPLIT_TRANSITION: "Obsolete"(harness/triage.yamlline 191), andcompletedfalls back to it when unset. Standard Jira Cloud and team-managed workflows have no "Obsolete" transition, so with defaults every completed or split close takes this path and emits the warning. Operators learn to ignore that warning, and it is the only signal of the problem. docs/triage.mdlines 340-349 describe the fallback but do not say that the single done-category transition may mean won't-do.
Earlier threads covered the warning and the old denylist. This risk is new in this commit, because the denylist that guarded this path was removed.
Suggestion: Use the --state closed fallback only when the name came from the harness default: JIRA_SPLIT_TRANSITION is still the default "Obsolete", or completed fell back to the split variable. If the operator set a name and Jira does not offer it, fail loudly as before. Also say in docs/triage.md that the fallback may apply a done-category transition with a won't-do meaning when it is the only one offered.
There was a problem hiding this comment.
Addressed in 55da9d7a (55da9d7afe187f29640f6a0fb99074013d14edfc):
ASK-1a: Restricted thefullsend issues transition --state closedfallback intracker_close_issuestrictly to the un-overridden harness default (default_split_transition="Obsolete", requiringtransition_var == "JIRA_SPLIT_TRANSITION"andtransition_name == "${default_split_transition}", which covers bothsplitwith defaultJIRA_SPLIT_TRANSITION="Obsolete"andcompletedwhenJIRA_COMPLETED_TRANSITIONis unset and falls back to it;scripts/lib/jira-triage-ops.lib.sh:472-487; testsjira-completed-default-fallback-state-closedatscripts/post-triage-test.sh:2539-2565,jira-fallback-state-closed-failure-propagatesatscripts/post-triage-test.sh:2708-2727,jira-split-fallback-state-closedatscripts/post-triage-test.sh:2880-2892).ASK-1b: Any explicitly configured transition name that Jira does not offer — includingJIRA_COMPLETED_TRANSITION="NonExistent", explicitJIRA_COMPLETED_TRANSITION="Obsolete", or an operator-overriddenJIRA_SPLIT_TRANSITION="CustomSplit"for eithersplitorcompleted— now fails loudly with zero CLI transition calls (scripts/lib/jira-triage-ops.lib.sh:489-490; testsjira-completed-explicit-missing-transition-fails,jira-completed-explicit-obsolete-missing-fails,jira-split-explicit-missing-transition-fails, andjira-completed-explicit-split-override-missing-failsatscripts/post-triage-test.sh:2567-2636).ASK-1c: Updateddocs/triage.md:339-358to document that the--state closedfallback applies only to the un-overridden harness default ("Obsolete"), that explicit overrides fail loudly when unavailable, and that--state closedmay apply a rejection/won't-do transition (e.g.,"Won't Do","Duplicate","Cannot Reproduce") if it is the soledone-category transition offered.ASK-1d: Rebuilt compiled bundles (scripts/post-triage.sh,scripts/pre-triage.sh,scripts/pre-code-jira.sh) from a symlink-free physical path with relativelib/...markers.- Verification:
make -B script-build && make check-bundle,shellcheck -S warning, anduv run --no-project --with jsonschema env SCRIPT_TEST_TARGET={source,bundled}acrosspost-triage-test.sh,pre-triage-test.sh, andpre-code-jira-test.shall passed.
Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
waynesun09
left a comment
There was a problem hiding this comment.
Review findings: 1 MEDIUM. Details are in the inline comment.
| # harness/triage.yaml, including when `completed` fell back to it because | ||
| # JIRA_COMPLETED_TRANSITION was unset). Any operator-configured transition | ||
| # name that Jira does not offer fails loudly below. | ||
| local default_split_transition="Obsolete" |
There was a problem hiding this comment.
MEDIUM: The --state closed fallback depends on a hard-coded copy of the harness default "Obsolete", and no test ties the two together
local default_split_transition="Obsolete" duplicates JIRA_SPLIT_TRANSITION: "Obsolete" in harness/triage.yaml line 191. The fallback fires only when transition_var == JIRA_SPLIT_TRANSITION and the name equals that literal (a case-sensitive match).
Impact:
- No test reads
harness/triage.yamland checks it against this constant.scripts/harness-jira-test.shhas noObsoleteorSPLIT_TRANSITIONassertion. If the harness default changes, the fallback stops firing with no test failure, and the original exit-1 bug on workflows without "Obsolete" comes back. - The string comparison cannot tell the harness default apart from an operator overlay that sets
JIRA_SPLIT_TRANSITION="Obsolete"on purpose. That operator still gets the silent fallback, althoughdocs/triage.mdlines 350-352 say an override fails loudly.
Suggestion: Pass the fallback signal from the harness, for example a runner env flag next to JIRA_SPLIT_TRANSITION, instead of comparing against a literal. At minimum, add a test that reads JIRA_SPLIT_TRANSITION from harness/triage.yaml and asserts it equals this constant. Reword the docs to say that an override to any name other than "Obsolete" fails loudly.
Verified: read code at head (lib.sh:472-487, harness/triage.yaml:191); grep shows harness-jira-test.sh has no Obsolete assertion at 55da9d7; raised by: Claude, DeepSeek
There was a problem hiding this comment.
Fixed in d7c5c6e: Added check_runner_mapping assertions in scripts/harness-jira-test.sh for JIRA_SPLIT_TRANSITION ('Obsolete'), JIRA_DUPLICATE_TRANSITION ('Duplicate'), and JIRA_NOT_PLANNED_TRANSITION ("Won't Do") to couple harness defaults to fallback constants under test. Clarified in docs/triage.md that overrides to any name other than "Obsolete" fail loudly if unavailable.
…nc docs Signed-off-by: Jeffery Bagirimvano <jefferyb@redhat.com>
Summary
When the triage agent marks an issue with
action: completed,post-triage.shpreviously reusedJIRA_SPLIT_TRANSITION(defaulting to"Obsolete"inharness/triage.yaml) to transition the issue in Jira Cloud via direct REST calls.In standard Jira Cloud and Team-Managed software projects,
"Obsolete"is not part of the active workflow. When the transition name is missing from the issue's available transitions,tracker_close_issuefailed andpost-triage.shterminated withexit status 1underset -e.This PR:
action: splitfromaction: completedinscripts/post-triage.src.sh, mappingsplitto GitHub reason"completed"inscripts/lib/github-triage-ops.lib.shwhile allowing an optionalJIRA_COMPLETED_TRANSITIONoverride in Jira (falling back toJIRA_SPLIT_TRANSITIONwith a notice when unset so existing overlays and custom workflows are preserved without changingharness/triage.yamldefaults).scripts/lib/jira-triage-ops.lib.shtofullsend issues transition --tracker jira(available since Fullsend v0.56.1 / feat(issues): add tracker-neutral issue transitions fullsend#9437) soagentsand corefullsendshare one transition and resolution policy:done-category status matching the configured transition name or the.to.nameof that transition when uniquely offered).fullsend issues transition --tracker jira --transition <name>(preserving ambiguity errors and upstream resolution-by-ID rules).completedorsplit, emits a::warning::annotation and falls back tofullsend issues transition --tracker jira --state closed(which skips issues already in adone-category status, applies the single availabledone-category transition, fails loudly on ambiguity, and fills a required resolution by ID only when Jira offers a single allowed value with no default).duplicate/not plannedtransitions and on malformed/unexpected/transitionsresponses without falling back to--state closed.docs/triage.md(including the Fullsend v0.56.1 requirement) andLOCAL.md, adds comprehensive unit tests inscripts/post-triage-test.sh, and rebuilds compiled script bundles.Related: fullsend-ai/fullsend#6704, fullsend-ai/fullsend#9437
Changes
scripts/post-triage.src.sh: Updatedaction: splitto pass"split"instead of"completed"totracker_close_issue.scripts/lib/github-triage-ops.lib.sh: Mapped close reason"split"to GitHub state reason"completed".scripts/lib/jira-triage-ops.lib.sh:JIRA_COMPLETED_TRANSITIONoverride (no default added toharness/triage.yaml; falls back toJIRA_SPLIT_TRANSITIONwhen unset)._jira_transitiondelegating tofullsend issues transition --tracker jira --fullsend-dir "${FULLSEND_DIR}" --project "${REPO}" --number "${JIRA_ISSUE_NUM}"viajira_auth_fullsend.current_status_namematching configured transition name or uniquely offered.to.namein adone-category status) and strict.transitionsarray validation.--transition <name>and missingcompleted/splittransitions to--state closedwith a sanitized::warning::.docs/triage.md&LOCAL.md: DocumentedJIRA_COMPLETED_TRANSITION, the Fullsend v0.56.1 (fullsend issues transition) requirement, idempotency,--state closedfallback behavior, and harness runner override instructions.scripts/post-triage-test.sh: Updated Jira close tests to verifyfullsend issues transitioninvocations (--transitionand--state closed), credentials passed via env, exact-status and.to.nameidempotency, ambiguous matches,spliton"Won't Fix"when the split transition is missing, fail-closed error handling, and failure propagation without fallback.scripts/post-triage.sh,scripts/pre-code-jira.sh,scripts/pre-triage.sh.Testing
make -B script-build && make check-bundlepass cleanly (relativelib/...markers verified; zero/private/tmppaths).shellcheck -S warning scripts/lib/jira-triage-ops.lib.sh scripts/lib/github-triage-ops.lib.sh scripts/post-triage.src.sh scripts/post-triage.sh scripts/pre-triage.sh scripts/pre-code-jira.sh scripts/post-triage-test.shpasses cleanly.uv run --no-project --with jsonschema env SCRIPT_TEST_TARGET=source bash scripts/post-triage-test.shandSCRIPT_TEST_TARGET=bundledpass all tests.pre-triage-test.shandpre-code-jira-test.shpass in bothsourceandbundledmodes.uvx --from gitlint-core gitlint --config .gitlintpasses on the commit message.