feat(#1073): add Jira component assignment to triage pipeline - #1085
Conversation
Add support for assigning Jira project components during triage,
using a generic component_actions field in the triage result schema
that the post-script handles for Jira only (GitHub/GitLab ignore
it since they lack a native component concept).
Changes:
- New jira-components skill: discovers available project components
via GET /rest/api/3/project/{key}/components and recommends
component assignments based on issue content
- Schema: add component_actions to triage-result.schema.json,
following the same shape as label_actions (reason + actions
array with add/remove operations)
- Post-script: process component_actions by reading current
components, applying add/remove operations, and setting the
result via PUT /rest/api/3/issue/{key} with fields.components.
Non-Jira trackers log and skip the field
- Jira ops lib: add tracker_set_components and
tracker_get_components functions
- Harness: register jira-components skill in the Jira overlay of
harness/triage.yaml
- Tests: add component_actions tests for Jira (add, remove, reason
appended, coexistence with label_actions) and GitHub (ignored).
Update schema validation test for new allowed property
Closes #1073
|
🤖 Finished Review · ✅ Success · Started 12:29 PM UTC · Completed 1:09 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $7.54 |
|
Risk Assessment: moderate (2/5) DetailsModerate risk, unchanged from prior assessment. Protected-path count remains high (9 files in agents/scripts/skills/harness) but is offset by bot authorship, zero security-sensitive paths, no CI/dependency changes, and well-scoped issue alignment; elevated fix/revert churn in Tier 2 does not shift the composite. Previous runRisk Assessment: moderate (2/5) DetailsModerate risk, unchanged from prior assessment. Protected-path count remains high (9 files in agents/scripts/skills/harness) but is offset by bot authorship, zero security-sensitive paths, no CI/dependency changes, and well-scoped issue alignment; elevated fix/revert churn in Tier 2 does not shift the composite. Previous run (2)Risk Assessment: moderate (2/5) DetailsModerate risk, unchanged from prior assessment. Protected-path count remains high (9 files in agents/scripts/skills/harness) but is offset by bot authorship, zero security-sensitive paths, no CI/dependency changes, and well-scoped issue alignment; elevated fix/revert churn in Tier 2 does not shift the composite. Previous run (3)Risk Assessment: moderate (2/5) DetailsModerate risk, unchanged from prior assessment. Protected-path count remains high (8 files in harness/scripts/skills) but is offset by bot authorship, zero security-sensitive paths, no CI/dependency changes, additive rollback profile, and well-scoped issue alignment. Previous run (4)Risk Assessment: moderate (2/5) DetailsModerate risk driven primarily by protected path count (8 files in harness, scripts, skills directories). Mitigating factors include bot author with established history, adequate test coverage, healthy git history with no reverts, well-scoped feature matching issue design, and clear documentation. |
ReviewFindingsMedium
Previous runReviewFindingsMedium
Low
Next steps:
Previous run (2)ReviewFindingsMedium
Previous run (3)ReviewFindingsMedium
Low
Next steps:
Previous run (4)ReviewFindingsMedium
Low
|
|
🤖 Finished Review · ✅ Success · Started 12:37 AM UTC · Completed 12:59 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.48 |
|
🤖 Finished Fix · ✅ Success · Started 1:00 AM UTC · Completed 1:09 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $2.89 |
- Add component_actions documentation to agents/triage.md alongside label_actions (JSON example, recommendations paragraph, output rules, comment content rules) [stale-doc] - Add jira-components skill subsection to docs/triage.md after the issue-labels section [incomplete-doc] - Tighten jira-component-actions-remove test assertion from 'fields' (matches GET URL) to '"components":[]' (matches PUT body) [test-adequacy] - Add pattern constraint to component field in schema: ^[a-zA-Z0-9 _./:+()&,'-]+$ — more permissive than label regex to accommodate Jira component naming conventions [schema-consistency] - Add CA_COMPONENT character-class validation in post-triage.src.sh and post-triage.sh, matching the label_actions defense-in-depth pattern [input-validation] Addresses review feedback on #1085
🔧 Fix agent — iteration 1 (bot-triggered)Addressed 5 of 6 review findings. Fixed documentation gaps in agents/triage.md and docs/triage.md, tightened the remove test assertion, added schema pattern constraint and input validation for component names. Disagreed with 1 finding (protected-path) as it is informational and requires human approval. Fixed (5):
Disagreed (1):
Tests: passed Decision points
Next steps:
|
|
🤖 Finished Review · ✅ Success · Started 1:11 AM UTC · Completed 1:28 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.59 |
Superseded by updated review
|
/fs-fix address the two open findings |
|
🤖 Finished Fix · ✅ Success · Started 4:06 PM UTC · Completed 4:14 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.43 |
🔧 Fix agent — iteration 2 (human-triggered)Both findings endorsed by the human reviewer were already addressed in iteration 1 (commit 90d4cbd). The test assertion was tightened from 'fields' to '"components":[]', and a pattern constraint was added to the schema's component field. All tests pass — no additional code changes needed. Fixed (2):
Tests: passedNext steps:
|
|
🤖 Finished Review · ✅ Success · Started 6:39 PM UTC · Completed 7:00 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.29 |
|
🤖 Finished Fix · ✅ Success · Started 7:02 PM UTC · Completed 7:08 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.77 |
When tracker_get_components fails (API error, timeout), the fallback to an empty array caused tracker_set_components (a full PUT replacement) to silently delete pre-existing components. Replace the || fallback with an if/else that skips all component mutations on failure. Also apply null-coalescing (// []) in the jq expression for .fields.components so a null value does not cause a jq error. Addresses #1085
🔧 Fix agent — iteration 2 (bot-triggered)Fixed two related issues in the component_actions handler: (1) abort component mutations when tracker_get_components fails instead of falling back to an empty list that would cause silent data loss via full PUT replacement, and (2) null-safe jq expression for .fields.components. The protected-path finding is acknowledged as informational. Fixed (2):
Disagreed (1):
Tests: passed Decision points
Next steps:
|
|
🤖 Finished Review · ✅ Success · Started 7:10 PM UTC · Completed 7:29 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.02 |
Superseded by updated review
Signed-off-by: Ralph Bean <rbean@redhat.com>
|
🤖 Finished Review · ✅ Success · Started 8:06 PM UTC · Completed 8:25 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.86 |
|
🤖 Finished Retro · ✅ Success · Started 8:23 PM UTC · Completed 8:38 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.34 |
|
Review skipped — this PR is already merged. The Posted by fullsend post-review check |
Retro: PR #1085 — Jira Component AssignmentTimeline
Rework Impact6 review cycles and 3 fix cycles for a feature that could have merged after ~2 reviews and 1 fix. Fix 1 addressing low-severity findings while missing the medium-severity error-handling finding directly caused 3× rework: 4 extra agent runs and ~18 hours of additional delay. Evidence for Existing Issues
Autonomy AssessmentThe review agent demonstrated strong value: it caught the critical error-handling bug (silent data loss via PUT replacement on empty baseline) in Review 1 that the human did not initially prioritize. The human's unique contribution was a prompt-engineering improvement — consolidating two mechanically-parallel instruction bullets into one broader prohibition to prevent duplicate action commentary in triage output. This suggests the review agent adds significant value on code-level correctness, while humans add value on semantic/design-level concerns about instruction quality. No New ProposalsAll identified improvement opportunities are covered by existing open issues. The highest-leverage improvement for preventing rework like this is #864 (fix completeness), supported by #685/#721 (finding persistence) and #894 (re-review verification). |
skillsaw --strict fails CI on content-description-routing because skills/jira-components/SKILL.md (merged in #1085) has no trigger phrasing. Match the other skills by starting the description with "Use when".
skillsaw --strict fails CI on content-description-routing because skills/jira-components/SKILL.md (merged in #1085) has no trigger phrasing. Match the other skills by starting the description with "Use when". Signed-off-by: Hector Martinez <hemartin@redhat.com>
Add support for assigning Jira project components during triage, using a generic component_actions field in the triage result schema that the post-script handles for Jira only (GitHub/GitLab ignore it since they lack a native component concept).
Changes:
via GET /rest/api/3/project/{key}/components and recommends
component assignments based on issue content
following the same shape as label_actions (reason + actions
array with add/remove operations)
components, applying add/remove operations, and setting the
result via PUT /rest/api/3/issue/{key} with fields.components.
Non-Jira trackers log and skip the field
tracker_get_components functions
harness/triage.yaml
appended, coexistence with label_actions) and GitHub (ignored).
Update schema validation test for new allowed property
Closes #1073
Post-script verification
agent/1073-jira-component-assignment)849cb192001cd2ac985410c7c0cbbe23df55ab19..HEAD)