Repository navigation
feat(fix): read current Jira context on fix runs - #2247
Aliciapet11 wants to merge 3 commits into
Conversation
Signed-off-by: apetruni <apetruni@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 12:01 PM UTC · Completed 12:14 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.11 |
|
Risk Assessment: elevated (3/5) DetailsElevated risk driven by modifications to 12 protected paths and CI workflow files in core fix runner scripts with high regression history and change coupling, balanced by good test coverage, clear issue alignment, and non-fatal fallback behavior. |
ReviewFindingsHigh
Medium
Low
Next steps:
|
Signed-off-by: apetruni <apetruni@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 12:28 PM UTC · Completed 12:37 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $1.76 |
|
Risk Assessment: elevated (3/5) DetailsElevated risk driven by modifications to 14 protected paths and CI workflow files across core fix runner scripts with high regression history and change coupling, balanced by strong test coverage, clear issue alignment, and non-fatal fallback behavior. |
ReviewFindingsMedium
Low
Earlier findings
|
Superseded by updated review
|
Finding threads left open (3):
Outdated review threads left open (1):
|
Signed-off-by: apetruni <apetruni@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 2:19 PM UTC · Completed 2:33 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $2.52 |
|
Risk Assessment: elevated (3/5) DetailsElevated risk driven by modifications to 14 protected paths and CI workflow files across core fix runner scripts with high regression history and change coupling, balanced by strong test coverage, clear issue alignment, and non-fatal fallback behavior. |
ReviewFindingsMedium
Low
|
| ] | ||
| if field_valid: | ||
| args.extend(["--fields", field]) | ||
| issue = run_json(args) |
There was a problem hiding this comment.
[medium] data-exposure
The PR/MR's editable origin marker still decides which issue the privileged Jira credential reads. The checks constrain the URL to the configured tenant, compare the key's project with trusted runner configuration, validate the optional custom-field identifier, and confirm the returned URL and number match the marker. None of these proves the issue belongs to this PR or that the repository is allowed to see it. A PR author can put another valid issue number from the configured project in the footer, including issues only the integration account can see, and have its description, comments and acceptance criteria staged into the fix sandbox. Project scoping narrows the exposure but does not remove it. The PR description acknowledges this as an open provenance/architecture question.
Suggested fix: Before fetching, verify the issue-to-PR association using runner-trusted provenance (a persisted mapping or an authenticated origin record bound to the repository and PR), or switch to the provider route. Add a regression test showing that editing the footer cannot fetch another issue in the configured project.
| } | ||
|
|
||
| # Runner-only metadata for Jira context discovery. | ||
| forge_get_pr_context() { |
There was a problem hiding this comment.
[low] pattern-inconsistency
forge_get_pr_context uses positional argument $1 directly instead of assigning local pr_number="$1", unlike sibling functions in this library and the GitLab counterpart.
Suggested fix: Assign local pr_number="$1" at the start of forge_get_pr_context() and pass it to gh pr view; rerun make script-build.
|
Finding threads left open (1):
Outdated review threads left open (2):
|
Fix runs currently retain Jira origin metadata but never reload the source issue's requirements. This draft reads the managed PR/MR origin record and fetches the current description, comments and configured acceptance-criteria field on every run. Applicable requirements join review feedback within the human instruction's scope; conflicts are reported for clarification.
Stacked on #2178, with
feat/aisdlc-835-fix-jira-contextas the base. Keep draft until the base merges, then rebase ontomain, retarget and rerun checks. Related: #1993 and AISDLC-835; this PR does not close either ticket.The runner uses the existing read-only
fullsend issues get --tracker jiracommand. It checks the configured site and project, and the returned issue identity. Missing, ambiguous, misplaced or invalid origin metadata never triggers a lookup. Fetch failures leave review/CI fixes available. The editable marker is not authenticated provenance; restricting reads to the configured project limits its scope but does not establish provenance.Credential delivery and acceptance criteria
FULLSEND_JIRA_*harness references: forge-sourced fix jobs do not receive those named Jira secrets. The built-in harness requires no Jira credentials, so unavailable access does not fail harness validation.JIRA_API_TOKEN/ optionalJIRA_API_EMAIL, orJIRA_API_CLIENT_ID/JIRA_API_CLIENT_SECRET. Deployment configuration is documented; this PR does not provision secrets or change managed workflows. GitLab needs equivalent runner-only host configuration.FIX_JIRA_ACCEPTANCE_CRITERIA_FIELD, empty by default and overridden with a verifiedcustomfield_NID in the custom harness. Use CLI--fields, preserve text/rich-text values, and report an unset/invalid/unavailable field separately while retaining description/comments. A null value does not distinguish an empty field from an inaccessible field. The example field ID is not a portable default.Architecture question and provider alternative
Code and triage already read Jira directly using the built-in read-only provider and
skills/jira-forge; Jira content reaching model context is existing behavior. The provider protects credentials with placeholders and the proxy. This draft instead stages a runner-created sidecar. The custom pre-script guide says not to stage unfiltered source content and describes a future filtered snapshot. That guidance needs reconciling with the sidecar design; it is not evidence of a universal prohibition on Jira reading or an enforced content filter in code/triage. Selecting fields and distrust instructions are not a content-injection filter.Reusing the provider is technically possible on non-Jira runs. It needs a coordinated Fullsend change to deliver named Jira credentials to opted-in fix jobs. The runner-secrets bundle cannot simply feed the provider:
validateRunnerSecretProvidersrejects those references. A provider implementation would add the read-only provider and Jira read skill to the fix harness, use the origin metadata to select the issue, and replace the sidecar reader. That is a separate route from this runner-side implementation.Before marking ready
main.Validation
make script-build,make check-bundle,pre-commit run --all-files, andmake lintpass.make testis running; full-suite success is not yet claimed. Previous broad local runs were incomplete due tooling/environment issues and long reruns, as recorded in the draft's earlier revisions.