Repository navigation
feat(rhdh-jira-lint): remediate Jira hygiene instead of notifying - #172
Fortune-Ndlovu wants to merge 2 commits into
Conversation
Find the lint findings, investigate the issue, apply the agreed procedure, write the value, verify it by read-back, and leave one receipt comment that mentions the assignee or the reporter. The scanner carries the rule set from rhdh_jira_lint.py, with four deliberate differences that turn silent failures into warnings. Release dates are discovered through the release skills, so no calendar file or runner-side refresh job is required. Comments carry a batch hash, so a retry is a no-op and a new batch is a new comment. ADR-0013 records the bounded unattended authorization for this skill only.
Enforce schema 2 evidence, rule and field allowlists, issue grouping, Red Hat Employee comment visibility, fixed Jira host, durable receipts, and guarded rollback. Align story-point guidance with rhdh-jira-authoring and mark that dependency required.
|
Hey @Fortune-Ndlovu, thanks for getting this started. I did a pass to try and harden it, position it better to be used in a one-shot, non-interactive style (like chai-bot/fullsend) and clean up some boundaries across the rest of the skill pack, but there are more to work through still. I haven't run this live, so please put it through its paces and keep iterating on anything you think needs more work. Happy to chat more about this next week. Hardening updateThis tries to tighten the unattended remediation path after review feedback from GLM, Deepseek, and Muse. Safety modelThe executor now treats the remediation plan as untrusted input and mechanically enforces the published procedure:
Priority policyThe executor now allows:
It rejects self-inferred Comment safetyEvery lint receipt comment is:
If any write on an issue fails, that issue receives no receipt comment. Credential and transport hardeningThe bundled Jira client now:
Audit and rollbackConfirmed runs now require both:
Receipts and revert plans are written atomically after every issue, so an interrupted run still records every write already applied. Revert plans use Boundary cleanupI also deduplicated the obvious skill boundaries:
Verification
Boundaries left for follow-upThese are deliberately left as discussion items rather than hidden in this patch:
|
What this replaces
The RHDH Jira lint job finds hygiene violations and sends them to assignees in Slack. The findings are often seen and not acted on, so the job's output is not the outcome the team wants: a compliant issue.
This skill removes the hop. It finds the violation, investigates the issue, applies the agreed procedure, writes the value, verifies it by read-back, and leaves one comment explaining what changed and why. The runner only has to invoke it.
What one invocation does
/rhdh-release-schedule— no calendar file has to be prepared first.scripts/scan.pyand reads findings, exemptions, calendar gaps, and warnings.references/investigation.md.scripts/apply.py, which checks the precondition, writes, reads back, and records before/after.Rule coverage
The scanner reproduces the deployed bot's rule set: missing Component, Priority, Story Points, T-shirt Size, duplicate Fix Versions, Feature/Code Freeze priorities, GA leftovers, and the three Release Note rules — with the Documentation-team and
Release-component exemptions, and theRelease Pending/ subtask /Outcome/[test execution]exclusions.Four deliberate differences, all turning silent failures into loud ones:
affectedVersion is EMPTY, staleness).Dates
ga_pushis the GA announce date, never Go/No Go. The scanner accepts the YAML calendar or the JSON/rhdh-release-schedulereturns, in either shape. TBD or incomplete versions are reported inscope.calendar_problems, and versions in scope without a usable entry are listed inscope.calendar_missing_versions; their date-dependent rules are skipped, unrelated rules continue. The skill never estimates a milestone date.Autonomy and safety
docs/adr/0013-unattended-jira-remediation.mdrecords the decision. An unattended invocation authorizes only the skill's published procedures; there is no separate runner policy file. The executor enforces it mechanically:The skill never writes transitions, closures, assignments, or exemptions, and never derives
BlockerorCritical. Interactive runs keep the existing mutation gate.Comments
One comment per distinct batch, marked with
[rhdh-jira-lint]plus a short batch hash. A retry of the same batch isunchanged; a new batch gets a new comment. No comment when nothing changed, and escalations go in the summary rather than on the issue.Tests and evidence
LINT-COMPONENT,LINT-POINTS,LINT-FF-PRIORITY; 2 writes verified; 1 comment created; a second run skipped both writes and left the comment unchanged; rescan showed only the escalation./ask-rhdhroutes current; pinned markdownlint clean.Out of scope
references/inventory.mdrecords the old job's remaining responsibilities and marks three gaps rather than claiming them: the docs-review queue, the Backstage version-bump announcement, and the SoS reminder. Freeze announcements already belong to/rhdh-release-announce.Reviewer notes
The procedures that decide how much the skill may decide alone are in
references/remediation.md— particularly the priority table (never infers Blocker/Critical) and the sizing evidence requirements. Those are the part worth arguing about before merge.