Repository navigation
Description
Problem
No agent runs when a PR merges, so a Jira-sourced issue stays in whatever status the code run left it (for example In Progress) after the work is merged. Users must close it by hand. agents#2005 covers transitions at code-run start and when the PR is ready (CODE_JIRA_STARTED_TRANSITION, CODE_JIRA_PR_READY_TRANSITION) but explicitly leaves merged-PR transitions out of scope. Triage's close transitions are already shipped.
Desired behaviour
On merge of a PR that resolves a Jira key, transition the Jira issue to a configured done status, with a configured resolution where the target requires one. Requirements from the original proposal:
- Status/transition names and resolution are config, because they vary per Jira project.
- Optional narrowing by issue type (see the separate
--if-issue-typeissue) and optional branch prefixes such asagent/. - Idempotent: read current status and skip if already there.
- Opt-in: nothing is installed or changed unless configured.
- Bot-loop safe: writes by the service account must not re-dispatch agents.
- Unknown config keys fail at
repos install, not at runtime. - Accepted risk: an agent PR can close its own issue with no human step; that is the intent for opted-in projects and should be documented.
Open design questions (mechanism not settled)
Three approaches have been proposed in the discussion:
- Managed workflow + config: a
pull_request_targetworkflow (base-branch copy, like the shim) converged byrepos installlikejira-poll-per-repo.yaml, driven by atracker.jira.status_sync.pull_request.on_mergedblock. Concern: it assumes a particular set of agents and couples issue state to Jira connectivity. - Option inside the agents (the pattern in agents#2005): not possible on its own for merge, since no agent run exists at that point.
- New
post-mergefleet agent on the triage role, triggered onevent.entity.kind == "change_proposal" && event.transition.kind == "merged", whose post-script makes the Jira transition using names from config. The same agent could serve Automatically re-triage issues when they become unblocked or their triage goes stale #9454, agents#2009 (re-triage what a merge unblocked), Post-merge workflow should close linked issues when PR targets a non-default branch #5924 (close linked issues for non-default target branch), and agents#586 (superseded PRs/issues). Retro is not a fit: it is an analyst, also runs on closed-unmerged PRs, and can be disabled.
Decisions needed:
- Which mechanism above (ideally designed once as a general post-merge step with "close the Jira issue" as one consumer).
- Credentials:
reusable-dispatch.ymlpasses Jira credentials only to runs whose event source isjira; a merge event comes from the code host, so the token would need to reach the runner side only (post-script, never the sandbox). This widens where the token goes and should be an explicit decision. - Fail-soft (warn and continue, as with
run_label) versus hard error for an explicitly configured close-on-merge. - Whether an ADR is needed (the original author says yes because it amends Verify Jira work items through the built-in PR lifecycle #8921's "PR stages make no Jira API calls"; another maintainer says no). Coordinate with ADR: Commit to Jira work-item tracker feature parity with native forge issues #9453 (Jira feature parity ADR).
Note: if the chosen mechanism adds a managed workflow file, the code agent cannot modify workflow files under current permissions, so that part needs a human PR or maintainer action. Config validation, resolver logic, docs, and any ADR can be done separately.
Acceptance criteria
- With the merge hook configured, a merged PR closes its issue with the configured resolution; without it, nothing changes.
- A failing transition warns and never blocks the merge (unless maintainers choose otherwise above).
- Re-running logs a skip, not an error.
- Tests: config validation, install convergence (if a workflow is used), one behaviour test for the merge path.
- Docs:
config-reference.mdand the Jira guide's "what appears in Jira" table gain the merge row.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity
fullsend-ai-triage commentedon Nov 16, 2026
🤖 Finished Triage · ✅ Success · Started 11:07 AM UTC · Completed 11:09 AM UTC
Commit:
4dee2f2· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.09
fullsend-ai-triage commentedon Nov 16, 2026
This issue is ready to move once maintainers settle the design. It isn't blocked by a missing bug report.
What blocks implementation
pull_request_targetworkflow with config, an option inside existing agents (which can't work alone for merges, since no agent run exists at merge time), or a generalpost-mergeagent whose post-script makes the Jira transition. The issue suggests designing this once, since the same step could also serve Automatically re-triage issues when they become unblocked or their triage goes stale #9454, Post-merge workflow should close linked issues when PR targets a non-default branch #5924 and the superseded-PR work.The Jira feature-parity ADR (#9453) is still open and should be coordinated with, as the issue already notes. Treat it as the related design decision to settle or align with first.
Related, not blocking: #9454 and #5924 would be consumers of a general post-merge step. #6704, #8920 and #8921 are closed and are context only. The upstream agents-repo issue on Jira transitions (agents#2005) is still open and explicitly leaves merge transitions out of scope. No open PR addresses this issue.
Workflow-file caveat: if the chosen design adds a managed workflow file, the code agent cannot modify workflow files under current permissions. That part needs a human PR or maintainer action. Config validation, resolver logic, docs and any ADR can proceed separately once the mechanism is chosen.
Once a mechanism is chosen, this can be re-triaged as ready for implementation. The acceptance criteria in the issue are already clear.
Blocked by:
ascerra commentedon Nov 16, 2026
The requirement I'd drop here is "Status/transition names and resolution are config, because they vary per Jira project". They do vary, but fullsend can read them from Jira when it moves the issue, so no one has to keep a copy in their repo. #9536 has the details and asks for that in
fullsend issues transition.With it, whichever of the three mechanisms runs at merge calls
fullsend issues transition --state closed, and its config shrinks to on or off. It uses the same Jira token as the move, so the credential decision is unchanged.The merge path needs two guards of its own, because Jira can't tell us what a merge means to a team.
hierarchyLevel. A PR that names an epic's key shouldn't close the epic.So this stays opt-in per repo, as the issue already says.
shairevivo commentedon Nov 17, 2026
Updates from #9536 and the #9518 thread.
started/closedfrom Jira's status categories at call time, so this hook should configurestate: closed, withtransition/statusas optional escape hatches.resolutionstays necessary only where the done move has no site default — AISDLC and TSTAPP qualify, since their Closed move accepts eleven resolutions and names none.post-mergeagent on the triage role triggered onevent.entity.kind == "change_proposal" && event.transition.kind == "merged", and the normalized-event schema already definesmerged. It also avoids the coupling @ifireball objected to.reusable-dispatch.yml's rule that Jira credentials go only tojira-origin runs needs an explicit widening for this one event — runner side only, post-script only, never the sandbox.Revising my proposal along these lines rather than pushing the original config block.
Aliciapet11 commentedon Nov 30, 2026
@shairevivo, I’m leading work on improving how Fullsend reads Jira context and reports back, and came across this blocked issue while reviewing Jira status updates.
Issue #9536 now has an implementation PR #9925, waiting for maintainers’ approval. Is the ADR draft you mentioned available to review? Can we progress the post-merge design and Jira credential decision in parallel, or is there anything else needed to unblock this issue?
shairevivo commentedon Nov 30, 2026
The ADR #9518 is closed by now.
@Aliciapet11 ^^
Aliciapet11 commentedon Nov 30, 2026
/fs-triage Refresh this issue against current main and all subsequent discussion. Read Adam’s and Shai’s comments here, the discussions in #9518, and the closure rationale for #9453.
Identify stale or superseded blockers, remaining implementation dependencies, and decisions requiring maintainer confirmation. Determine whether #9453’s closure changes the scope or blockers of this narrower close-on-merge proposal. Clarify the remaining work across fullsend and agents and whether it is ready for implementation. Do not treat issue closure as design approval or infer prioritization. Do not start implementation.
fullsend-ai-triage commentedon Nov 30, 2026
🤖 Finished Triage · ✅ Success · Started 12:51 PM UTC · Completed 12:53 PM UTC
Commit:
d83d2ec· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.27
fullsend-ai-triage commentedon Nov 30, 2026
Refreshed against current main (d83d2ec) and the discussion since the first triage. Nothing was implemented.
Stale blocker removed. #9453 was closed as not planned on Nov 23, so the earlier "blocked by #9453" note no longer applies. Its closure does not change this issue's scope. The close-on-merge proposal never depended on a parity commitment, and the closure rationale (a compatibility matrix first, #9818) is not a decision about this design. Closure of an issue also isn't design approval for anything discussed in it.
Superseded or changed requirements
state: closed, optional escape hatches, andresolutiononly where Jira names no default.pull_request_targetworkflow) is weakened, since its main job was carrying per-project names. Option 3 (apost-mergeagent on the triage role) is favoured in the thread, but no maintainer has confirmed it.hierarchyLevel.ADR status. #9518 is a closed issue (it was split into #9534 and #9535), not an ADR, and no ADR pull request exists for this design. The draft mentioned earlier has not been opened, so the "ADR is closed" statement appears to be a mislink. Whether an ADR is needed is still unsettled. One is proposed because the design amends #8921's "PR stages make no Jira API calls"; another maintainer said none is needed.
Remaining dependencies
--state started, category-based resolution with skip candidates, site-default resolution, andhierarchyLevel, which the epic guard and config-free design rely on. Treated as a prerequisite, not as a fix for this issue.--if-issue-type) is only needed for optional issue-type narrowing, so it is not a hard blocker.Decisions still needing maintainer confirmation
reusable-dispatch.ymlstill passes Jira credentials only to Jira-sourced runs. Reaching a code-host merge event would need an explicit, post-script-only widening.Remaining work by repository. In this repository: the credential change, any config validation, docs (
config-reference.mdand the Jira guide row), behaviour tests, and the ADR if required. In the agents repository: the harness and post-script for a post-merge agent. The agents-side location was not verified. Ifreusable-dispatch.ymlor a managed workflow is edited, the code agent cannot modify workflow files under current permissions, so that part needs a human PR or maintainer action.Readiness. Not ready for implementation yet. The acceptance criteria are clear, but the mechanism and credential decisions above are open, and #9925 should land first. Re-triage once those are settled.
Blocked by:
Blocked by:
Aliciapet11 commentedon Dec 3, 2026
/fs-triage
Reassess this issue against current main and all discussion. PR #9925 has merged, implementing #9536. Verify the landed behavior and remove these as outstanding blockers.
Update the readiness assessment and blockers using current evidence. If maintainer decisions still prevent implementation, state the exact questions needed to unblock it. Do not treat #9925’s merge or related issue closures as approval of the post-merge design. Do not start implementation.
fullsend-ai-triage commentedon Dec 3, 2026
🤖 Finished Triage · ✅ Success · Started 2:20 PM UTC · Completed 2:22 PM UTC
Commit:
4db7ae7· View workflow run →Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.26
fullsend-ai-triage commentedon Dec 3, 2026
Reassessed against current main (4db7ae7) and the full discussion. Nothing was implemented.
Blockers removed. PR #9925 is merged and #9536 is closed as completed. The code on main now resolves started/closed from Jira status categories, reports the issue type and hierarchy level, and looks up the site default resolution. That covers the config-free state handling and the epic guard this proposal depended on. #9453 (not planned) and #9518 (split into #9534 and this issue) are also no longer blockers. Neither closure, nor the merge of #9925, counts as approval of the post-merge design.
Still not implementable. The acceptance criteria are clear, but these maintainer decisions are open. Nothing on main answers them yet: there is no
status_syncor merge config and no post-merge agent, andreusable-dispatch.ymlstill gives Jira credentials only to Jira-sourced runs.post-mergeagent on the triage role (favoured in the thread, not confirmed by a maintainer), or a managedpull_request_targetworkflow. The managed workflow lost most of its rationale once status names stopped being config.No existing issue tracks these decisions, so a decision issue will be filed and this issue marked as blocked on it. Resolving it (or a maintainer answering the questions here) is what unblocks implementation.
Not blockers: #9534 (
--if-issue-type) is only needed for optional issue-type narrowing. #9454, #5924, agents#2009 and agents#586 would be consumers of a general post-merge step. agents#2005 (merged) covers only start and PR-ready transitions. No open PR addresses this issue.Remaining work by repository. This repository: credential change, config validation, docs rows, behaviour tests, ADR if required. Agents repository: harness and post-script if the agent mechanism is chosen (location not verified). If
reusable-dispatch.ymlor a managed workflow is edited, the code agent cannot modify workflow files under current permissions, so that part needs a human PR or maintainer action.Blocked by: