Repository navigation
feat(retro): add Jira support to the retro agent - #2109
Conversation
Add Jira issue creation, idempotency/duplicate detection, and comment support to the retro agent when FULLSEND_TRACKER=jira. - Add scripts/lib/jira-retro-ops.lib.sh for Jira Cloud REST operations and CLI delegation. - Support filing retro proposals directly into a configured Jira Cloud project (RETRO_JIRA_PROJECT) via fullsend issues create. - Implement preflight createmeta validation and JQL exact-summary duplicate search to prevent duplicate tickets on retries. - Support RETRO_MODE (all, summary_only, issues_only) to allow summary posting without issue creation. - Support both Jira-originated issues and GitHub/GitLab PRs/MRs associated with Jira work, preserving PR URLs and created issue links in summaries. - Add unit tests in pre-retro-test.sh and post-retro-test.sh. Signed-off-by: anevans <anevans@redhat.com>
- Treat label PUT failure (exit code 2) as created issue rather than failed creation. - Fail closed in Jira allowlist checks when config is invalid, yq is missing, or targets are empty. - Validate that Jira originating URL matches JIRA_BASE_URL tenant. - Eliminate runtime eval function wrapping by using named platform helpers. - Rename _jira_retro_post_comment to _retro_jira_post_comment. - Replace open-coded token mask in pre-retro with forge_mask_token. - Allow summary-only runs without Jira credentials when originating from forge, and collect proposals before allowlist/receipt gates. - Update docs/retro.md and agents/retro.md inputs and variable tables. Signed-off-by: anevans <anevans@redhat.com>
- Parse and validate originating URL before requiring forge tokens in post-retro, avoiding false errors when running on Jira items without GH_TOKEN. - Allow Jira issue creation when tracker.jira is configured without an allowed_targets.projects list. - Only emit ::add-mask:: for JIRA_TOKEN when running under GITHUB_ACTIONS. - Sanitize ISSUE_URL when emitting workflow warning on label failure. - Document advisory behavior when tracker.jira.allowed_targets.projects is omitted. - Add test coverage for Jira origin without forge token, missing allowed_targets, and token masking under GitHub Actions. Signed-off-by: anevans <anevans@redhat.com>
- In _forge_mask_token for GitHub and GitLab, guard token expansion with presence checks to prevent unbound variable errors under set -u when running under GITHUB_ACTIONS. - In jira-retro-ops.lib.sh, do not delegate to _forge_mask_token on Jira- originated runs. - In pre-retro.src.sh, validate and parse originating URL before masking. - Add regression tests in pre-retro-test.sh and post-retro-test.sh with GITHUB_ACTIONS=true and forge tokens genuinely unset. - Rebuild script bundles. Signed-off-by: anevans <anevans@redhat.com>
Signed-off-by: anevans <anevans@redhat.com>
… body Signed-off-by: anevans <anevans@redhat.com>
… and allowlist Signed-off-by: anevans <anevans@redhat.com>
Signed-off-by: anevans <anevans@redhat.com>
Signed-off-by: anevans <anevans@redhat.com>
Signed-off-by: anevans <anevans@redhat.com>
Signed-off-by: anevans <anevans@redhat.com>
Signed-off-by: anevans <anevans@redhat.com>
PR Summary by QodoAdd Jira Cloud issue and comment support to the retro agent
AI Description
Merge Risk
|
|
🤖 Finished Review · Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.39 This review was superseded by a newer commit. Check the current pull request HEAD's review status before merging. |
e4f6998 to
640ebc8
Compare
Code Review by Qodo
1.
|
|
🤖 Finished Review · Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.60 This review was superseded by a newer commit. Check the current pull request HEAD's review status before merging. |
|
🤖 Finished Review · ✅ Success · Started 11:42 AM UTC · Completed 12:07 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $8.81 |
|
Risk Assessment: elevated (3/5) DetailsLarge changeset touching 25 protected script paths with high recent churn and regression history, balanced by an established contributor, no CI or dependency modifications, and opt-in rollout behavior. Previous runRisk Assessment: elevated (3/5) DetailsLarge changeset touching 25 protected script paths with high recent churn and regression history, balanced by an established contributor, no CI or dependency modifications, and opt-in rollout behavior. Previous run (2)Risk Assessment: elevated (3/5) DetailsLarge changeset touching 19 protected script paths with high recent churn and regression history, balanced by an established contributor, no CI/dependency modifications, and opt-in rollout behavior. Previous run (3)Risk Assessment: elevated (3/5) DetailsLarge changeset touching 19 protected script paths with high recent churn and regression history, balanced by an established contributor, no CI/dependency modifications, and opt-in rollout behavior. |
ReviewFindingsMedium
Previous run<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rp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x2ZWRfYnlfY2hhbmdlIn0seyJpZCI6ImZfYjJkOTNkMDRhMjg0Y2FkMCIsInN0YXR1cyI6InJlc29sdmVkX2J5X2NoYW5nZSJ9LHsiaWQiOiJmX2ZhMzk2MTRhOTEzOWRjOTMiLCJzdGF0dXMiOiJyZXNvbHZlZF9ieV9jaGFuZ2UifV19 --> ReviewFindingsHigh
Medium
Low
Earlier findings
Labels: The PR adds Jira support to the retro agent, which is a new feature. Next steps:
Previous run (3)<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyLCJhY3Rpb24iOiJyZXF1ZXN0LWNoYW5nZXMiLCJmaW5kaW5ncyI6W3sic2V2ZXJpdHkiOiJoaWdoIiwiY2F0ZWdvcnkiOiJhcGktY29udHJhY3QiLCJmaWxlIjoic2NyaXB0cy9saWIvamlyYS1hdXRoLmxpYi5zaCIsImlkIjoiZl8wNzNkOGUxNjUwNmZiZTI5IiwibGluZSI6MjA1LCJhY3Rpb25hYmxlIjp0cnVlLCJkaW1lbnNpb24iOiJjb3JyZWN0bmVzcyJ9LHsic2V2ZXJpdHkiOiJtZWRpdW0iLCJjYXRlZ29yeSI6InNlY3JldC1leHBvc3VyZSIsImZpbGUiOiJzY3JpcHRzL2xpYi9qaXJhLWF1dGgubGliLnNoIiwiaWQiOiJmXzhlMDY5NzJhMmViNDAyMTYiLCJsaW5lIjoyMDUsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6InNlY3VyaXR5In0seyJzZXZlcml0eSI6Im1lZGl1bSIsImNhdGVnb3J5IjoiZmFpbC1vcGVuIiwiZmlsZSI6InNjcmlwdHMvcG9zdC1yZXRyby5zcmMuc2giLCJpZCI6ImZfYjU0MWYzMWZmOGU1MTYxNiIsImxpbmUiOjIzOSwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoic2VjdXJpdHkifSx7InNldmVyaXR5IjoibWVkaXVtIiwiY2F0ZWdvcnkiOiJsb2dpYy1lcnJvciIsImZpbGUiOiJzY3JpcHRzL3Bvc3QtcmV0cm8uc3JjLnNoIiwiaWQiOiJmX2IzOWFjY2UwZDBhMDZiNGUiLCJsaW5lIjoyNDUsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6ImNvcnJlY3RuZXNzIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoicGF0dGVybi1pbmNvbnNpc3RlbmN5IiwiZmlsZSI6InNjcmlwdHMvcG9zdC1yZXRyby5zcmMuc2giLCJpZCI6ImZfYTI1ZGFiMDVkNmQ2NmJmNSIsImxpbmUiOjIzNCwiYWN0aW9uYWJsZSI6dHJ1ZSwiZGltZW5zaW9uIjoic3R5bGUtY29udmVudGlvbnMifSx7InNldmVyaXR5IjoibG93IiwiY2F0ZWdvcnkiOiJhcGktc2hhcGUiLCJmaWxlIjoic2NyaXB0cy9saWIvamlyYS1yZXRyby1vcHMubGliLnNoIiwiaWQiOiJmX2IyZDkzZDA0YTI4NGNhZDAiLCJsaW5lIjo0MTYsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6InN0eWxlLWNvbnZlbnRpb25zIn0seyJzZXZlcml0eSI6ImxvdyIsImNhdGVnb3J5IjoiZG9jLXN0eWxlIiwiZmlsZSI6InNjcmlwdHMvcHJlLXJldHJvLnNyYy5zaCIsImlkIjoiZl9mYTM5NjE0YTkxMzlkYzkzIiwibGluZSI6MTMsImFjdGlvbmFibGUiOnRydWUsImRpbWVuc2lvbiI6InN0eWxlLWNvbnZlbnRpb25zIn1dfQ== --> ReviewFindingsHigh
Medium
Low
Next steps:
|
waynesun09
left a comment
There was a problem hiding this comment.
Review findings on the Jira support for the retro agent: 1 high, 3 medium. Each one is an inline comment below.
Follow-up to the review of fullsend-ai#2109. Each item below is a small robustness or consistency fix; no behavior change for the existing forge paths. - Guard the two unchecked `mv` calls in the Jira context writer. They run under `if !`, so errexit is off: a failed page accumulation silently lost a comment page, and a failed replacement in the byte-trim loop left the file over the cap and looped forever. - Drop the unreachable Jira branch in `forge_get_comment_max_len`. post-retro applies the Jira comment cap with `_retro_jira_fit_comment` and only calls this function for a forge comment. - Fix the editmeta comment: the label probe is cached only after a successful read, and a failed probe is retried for the next issue. - Return an error from `forge_validate_originating_url` when JIRA_BASE_URL is missing instead of exiting the shell through `:?`. - Use `-` rather than `:-` in the Jira label gate so an explicitly empty RETRO_JIRA_LABELS is not treated as `ready-for-triage`. - Detect a post-comment 401/403 without relying on the CLI's error prefix, and ignore `-NNN` issue-key suffixes and digit runs. fullsend's Jira error text was not covered by the previous patterns, which turned a permission failure into a fatal exit on a Jira-originated run. - Remove the originating-issue context file at the end of post-retro, and document a per-run RETRO_JIRA_CONTEXT_FILE path so concurrent runs on a reused runner cannot delete each other's file. - Document the four RETRO_JIRA_CONTEXT_* caps in the variables table, and note the summary_only caveat in the Jira skill. Tests: `jira/originating-issues-only-no-comment` asserts no Jira comment in issues_only mode; `jira/originating-comment-401-graceful` drives a mocked 401 through a format the old regex missed and expects the warning path; `jira/originating-context-file-gone` asserts post-retro removes the file. Signed-off-by: anevans <anevans@redhat.com>
Follow-up review: fixes committedI ran another review pass over this branch after the latest changes and found a set of minor robustness and consistency items. No blocking issues. The fixes are committed to this branch in Findings addressed
Verification
Note: Generated with assistance from Gemini |
waynesun09
left a comment
There was a problem hiding this comment.
Two findings from a review-only pass at 69cd0e5, both inline.
Jira createmeta reports `reporter` as required with no default for an account that holds Modify Reporter permission, even though Jira fills the field with the calling account when the create omits it. The preflight treated that as a field retro cannot satisfy, so every proposal was reported as not filed with "requires fields retro does not set: reporter". Add `reporter` to the exempt list and cover it with a post-retro fixture where reporter is required without a default. Also reword the Jira skill so it no longer names `RETRO_MODE`, which the harness does not pass into the sandbox; naming it failed skill-env-reachability-test. Signed-off-by: anevans <anevans@redhat.com>
`_retro_jira_write_context` accepted any `RETRO_JIRA_CONTEXT_FILE` value, but `harness/retro.yaml` mounts that value as a host path and the docs call it an absolute path. A relative value wrote the file under the script's working directory, passed the `-s` check, and left the sandbox mount pointing somewhere else, so the agent ran without the originating issue — the failure the surrounding fail-closed checks exist to prevent. Require an absolute path and cover it in `pre-retro-test.sh`. `RETRO_JIRA_PROJECT` also fell back to `JIRA_PROJECT`, which nothing in this repo sets and no doc mentions. Drop the alias so the project key comes only from the documented variable. While here, the library header now lists the four documented `RETRO_JIRA_CONTEXT_*` knobs it validates and uses. Signed-off-by: anevans <anevans@redhat.com>
Review findings (fixed in
|
waynesun09
left a comment
There was a problem hiding this comment.
Two MEDIUM findings from a review-only pass, posted inline.
|
/ok-to-test 016bc42 |
|
Functional tests authorized for |
efea22c widened the post-comment 401/403 detection to match the words "unauthorized" and "forbidden" for every target, so an unrelated GitHub or GitLab failure whose text happens to contain "forbidden" was downgraded from a fatal error to a warning. Keep the narrow `HTTP (401|403)|error: (401|403)` match for forge comment targets and apply the word/bare-status match only when the comment target is Jira, which is what `forge_post_comment` already uses to route the call. Add a post-retro test that a GitHub failure containing "forbidden" but no HTTP 403 still exits 1. Signed-off-by: anevans <anevans@redhat.com>
|
/ok-to-test c497b65 |
|
Functional tests authorized for |
waynesun09
left a comment
There was a problem hiding this comment.
Approving at c497b65. The 401/403 fix keeps the narrow HTTP pattern for GitHub and GitLab and applies the word match only to Jira targets, with a regression test; post-retro and bundle tests pass locally, and CI is green (one script-test flake passed on re-run). The live Jira run is tracked in #2168. Please add the docs/retro.md note that the Jira-originated path is not yet live-verified, here or in #2168.
|
The merge queue dropped this on a Cause: the new curl mock in Fix: add |
|
/fs-fix-stop |
|
Fix agent disabled for this PR. Remove the |
The post-retro curl mock answered the `https://auth.atlassian.com/oauth/token` call without reading stdin. `_jira_auth_mint_now` pipes the request body from `jq` into `curl --data @-`, so when the mock exits before jq writes, jq fails with `writing output failed: Broken pipe` and, under `pipefail`, the mint reports a non-zero curl exit. That made `jira/client-credentials-creates-issue`, `-bearer-auth` and `-resolves-cloud-id-once` fail intermittently in CI. Drain stdin as the first step of the token branch, before both the `JIRA_MOCK_TOKEN_FAIL` and the success `printf`, matching the other Jira test mocks (`post-triage-test.sh`, `pre-scribe-test.sh`). Signed-off-by: anevans <anevans@redhat.com>
|
/ok-to-test 38e5f34 |
|
Functional tests authorized for |
|
Confirmed and fixed in 38e5f34.
Verification on 38e5f34:
The one red Note: Generated with assistance from Gemini |
Summary
Adds Jira Cloud issue creation and Jira-originated retrospective support to the Retro agent, implementing the capability requested in fullsend-ai/fullsend#2267 using the patterns established by the Scribe agent (#1676 / #1678). Teams using Jira Cloud for work tracking can receive retro findings directly as Jira issues, and run retrospectives against Jira-originated work items via a host-side context fetch that preserves sandbox isolation.
What changed in this repo
scripts/lib/jira-retro-ops.lib.sh(new): WhenFULLSEND_TRACKER=jira, defines Jira Cloud tracker operations:fullsend issues create --tracker jira --project <RETRO_JIRA_PROJECT>, followed by a RESTPUT /issue/{key}for sanitized labels.tracker_validate_create: reads createmeta paginated withstartAt. Fails clearly if the issue type is missing, if required fields retro cannot populate are present, or if the create screen lacks a Description field. Labels are not decided here: an update is validated against the edit screen, so_retro_jira_labels_editableprobeseditmetaonce per run.tracker_find_existing_issue: finds Unicode-aware exact-summary matches in the project across paginated/search/jqlresults. A title with no terms left after the stop-word and token filter falls back to a project-wideproject = KEYsearch with a client-side exact-summary comparison. Creation is refused only when that search is cut off byRETRO_JIRA_MAX_PAGESor returns a malformed response./search/jqllags behind writes, so the run also keeps the titles it has already filed or matched and skips those before searching.JIRA_BASE_URL(https://<site>.atlassian.net), the project key format, andRETRO_JIRA_MAX_PAGES/RETRO_JIRA_CONTEXT_MAX_PAGESas plain positive integers, since both are bash arithmetic bounds._retro_jira_write_context: for a Jira-originated run, fetches the issue and every comment host-side (comments with an explicitorderBy=created), converts ADF to plain text, and writes a bounded JSON context file toRETRO_JIRA_CONTEXT_FILE, which the harness mounts asRETRO_JIRA_CONTEXT. Comments are capped per body, by total bytes (oldest dropped first) and by page count; both cap paths setcomments_truncated. The issue document is passed to jq with--slurpfile, not as a 128 KiB-limited argv value.https://<site>.atlassian.net/browse/<project>-123) and GitHub/GitLab PR/MR URLs. Dispatches summary comment posting to Jira (fullsend issues post-comment) or the originating forge.--keep-history=falsewhen the CLI's flag table lists it without "deprecated".Scopedclient.tracker.jira.api_urlfromFULLSEND_DIR's config is the gateway base (defaulthttps://api.atlassian.com), the cloud ID is discovered fromtracker.jira.base_url, and every REST call goes to<api_url>/ex/jira/<cloudId>/rest/api/3. NoJIRA_API_URLenvironment variable is read, so reads and CLI writes cannot land on different tenants.JIRA_TOKEN, and disables xtrace around every credential expansion sobash -xcannot print the token.scripts/lib/retro-ops.lib.sh: sourcesjira-retro-ops.lib.shafter the forge library whenFULLSEND_TRACKER=jira.FULLSEND_TRACKERdefaults toFULLSEND_FORGE.RETRO_MODEis validated here, before the tracker library is sourced, so pre and post both reject a typo up front — the Jira library branches on it at source time.scripts/pre-retro.src.sh: validatesFULLSEND_DIRwhenFULLSEND_TRACKER=jira, requiresRETRO_JIRA_CONTEXT_FILEfor a Jira-originated run (the harness mounts exactly that path), removes a stale file at that path on every run, fetches the originating issue and comments host-side with the runner's credentials, and masksJIRA_TOKEN.scripts/post-retro.src.sh:RETRO_MODEsupport:all(default),summary_only(skips issue creation and folds validated proposals into the summary comment), andissues_only(creates issues without posting summary, and therefore does not require a forge token).### Already filed (existing issue)rather than### Proposals filed.FULLSEND_DIR(the directory the CLI reads), from the mergedtrackerblock only, so a base-layer project is never re-added when the overlay replacestracker.RETRO_JIRA_PROJECTand preserves the originating PR/MR URL in the issue body; related-issue links use the configured GitHub server URL rather than a hard-codedgithub.com.harness/retro.yaml: mounts the context file ashost_filessrc: ${RETRO_JIRA_CONTEXT_FILE}(optional: true) into/sandbox/workspace/jira-origin.json, exposed to the agent asRETRO_JIRA_CONTEXT, and registersskills/retro-analysis/jira. The src is env-expanded because fullsend rejects a literal absolute path in any harness loaded from a URL or composed withbase:.agents/retro.md: declaresRETRO_JIRA_CONTEXTas a valid input.skills/retro-analysis/jira/SKILL.md(new): recipes for reading the host-fetched issue context and tracing the workflow graph on the forge using the issue key, with lowercase placeholders soscripts/skill-env-reachability-test.shdoes not read them as env vars.docs/retro.md: documentsFULLSEND_TRACKER,RETRO_MODE,RETRO_JIRA_CONTEXT_FILEand the Jira integration, including harnessbase:composition, the host-fetch/sandbox-tracing split, CLI delegation, REST routing, idempotency and in-run dedupe, allowlist configuration, and the upstream dispatch gap for forge-originated runs.scripts/pre-retro.shandscripts/post-retro.sh.Cross-agent change: shared Jira OAuth token masking
scripts/lib/jira-auth.lib.shis shared by code, prioritize, scribe, triage andretro. Its OAuth mint printed
::add-mask::<access token>unconditionally.::add-mask::is a GitHub Actions workflow command, so on any other runner thatline is ordinary log output and prints the minted token. This PR gates the mask
on
GITHUB_ACTIONS, so code, prioritize, scribe and triage no longer write aminted token to the log on a non-GitHub-Actions runner. The mask helper the
library now calls (
_jira_auth_gha_mask) also escapes%, CR and LF in themasked value; that escaping is a no-op here because the token regex above it
already rejects those characters.
The non-retro bundle diffs in this PR are only the regenerated
make script-buildoutput for that one library change:pre-code-jira.sh,post-code.sh,pre-prioritize.sh,post-prioritize.sh,pre-scribe.sh,post-scribe.sh,pre-triage.shandpost-triage.sh. Theonly behavior change for those agents is the mask gate described above.
make check-bundlepasses.Tests:
pre-code-jira-test.sh,post-prioritize-test.sh,pre-scribe-test.shandpost-triage-test.shexportGITHUB_ACTIONS=trueso their existing "the mint is masked" assertions do not depend on the caller's
environment.
scripts/jira-auth-test.shruns every case withGITHUB_ACTIONS=trueunless the case overrides it, and adds aclient-no-ghacase asserting that a mint with
GITHUB_ACTIONSunset emits no::add-mask::line and prints no token.
This shared-library change stays in this PR rather than being split out, and is
called out here so the code, prioritize, scribe and triage owners can review it.
Testing
scripts/post-retro-test.shincludes Jira cases with a stubbed Jira API and a mockedfullsendCLI:fullsend issues create --tracker jira --project PROJand sets labels via a REST PUT, returning the browse URL without forge issue creation.### Already filed (existing issue).RETRO_MODE=summary_onlymakes zero issue creations and lists proposals in the summary comment;issues_onlycreates issues and suppresses summary posting.<api_url>/ex/jira/<cloudId>, and atracker.jira.base_urlthat disagrees withJIRA_BASE_URLdenies creation instead of crossing tenants.trackerblock inFULLSEND_DIR: overlay-without-project denies, a base project is not re-added when the overlay replacestracker, and a multi-provider mapping still permits the primary project.RETRO_MODE=issues_onlyfiles issues with no forge token set.RETRO_MODEis also covered on the GitHub tracker:summary_onlycreates no issue and lists the proposal in the summary comment,issues_onlyfiles the issue and posts no comment.::add-mask::with xtrace enabled; a failed createmeta check is probed once, not once per proposal; related-issue links in a Jira body use the configured GitHub server URL.scripts/pre-retro-test.shcovers the host-side context file end to end:FULLSEND_DIRis enforced whenFULLSEND_TRACKER=jira; an invalidRETRO_MODEis rejected before any Jira work.RETRO_JIRA_CONTEXT_FILEfails; a failed issue read and a failed comment read both fail closed.comments_truncatedset by the byte cap and by the page cap,orderBy=createdon the comment fetch, and no truncation flags on a complete read.JIRA_TOKENis masked.scripts/jira-auth-test.shcovers the shared-library mask gate, as described above.make check-bundle,make lint(skillsaw, strict),pre-commit run(check-yaml, shellcheck, agent-doc lints),scripts/skill-env-reachability-test.sh,scripts/harness-jira-test.shandscripts/jira-auth-test.shpass.Caveats
fullsend run. For that run, exportRETRO_JIRA_CONTEXT_FILEin the environmentfullsend runstarts in — fullsend expands thehost_filessrc from its own environment, so a value that only reaches the pre-script would leave the mount unset./search/jqlis eventually consistent, so a concurrent run can still file a duplicate; edited summaries are not detected.FULLSEND_JIRA_TOKEN/FULLSEND_JIRA_EMAIL, so the documented overlay fails harness env validation before the pre-script runs. No upstream issue tracks that dispatch change yet; fullsend-ai/fullsend#2267 is the feature request this PR implements. Summary-only forge runs and manually dispatched forge runs are unaffected.Relates to fullsend-ai/fullsend#2267