-
Notifications
You must be signed in to change notification settings - Fork 312
[wip] Fix payload analysis to detect merged reverts not yet in payload #580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -71,13 +71,29 @@ candidates: | |||||||||||||||||||||||
| status: "staged" | ||||||||||||||||||||||||
| revert_pr_url: "https://github.com/openshift/cno/pull/2038" | ||||||||||||||||||||||||
| revert_pr_state: "open" | ||||||||||||||||||||||||
| revert_in_payload: false | ||||||||||||||||||||||||
| result_summary: "Revert PR opened and payload jobs triggered" | ||||||||||||||||||||||||
| jira_key: "TRT-1234" | ||||||||||||||||||||||||
| jira_url: "https://redhat.atlassian.net/browse/TRT-1234" | ||||||||||||||||||||||||
| payload_jobs: | ||||||||||||||||||||||||
| - command: "/payload-job periodic-ci-...-e2e-aws-ovn" | ||||||||||||||||||||||||
| test_url: "https://pr-payload-tests.ci.openshift.org/runs/ci/..." | ||||||||||||||||||||||||
| test_prow_url: "https://prow.ci.openshift.org/view/gs/..." | ||||||||||||||||||||||||
| - pr_url: "https://github.com/openshift/mco/pull/4100" | ||||||||||||||||||||||||
| pr_number: 4100 | ||||||||||||||||||||||||
| component: "machine-config-operator" | ||||||||||||||||||||||||
| title: "Update MCO rollout strategy" | ||||||||||||||||||||||||
| confidence_score: 90 | ||||||||||||||||||||||||
| rationale: "new failure mode + sole modifier of affected component" | ||||||||||||||||||||||||
| failing_jobs: | ||||||||||||||||||||||||
| - "periodic-ci-...-e2e-aws-ovn-upgrade" | ||||||||||||||||||||||||
| actions: | ||||||||||||||||||||||||
| - type: "revert" | ||||||||||||||||||||||||
| status: "merged_not_in_payload" | ||||||||||||||||||||||||
| revert_pr_url: "https://github.com/openshift/mco/pull/4105" | ||||||||||||||||||||||||
| revert_pr_state: "merged" | ||||||||||||||||||||||||
| revert_in_payload: false | ||||||||||||||||||||||||
| result_summary: "Revert PR #4105 merged 2h after payload was cut — fix pending in next payload" | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| rhcos_suspects: | ||||||||||||||||||||||||
| - rhcos_tag: "rhel-coreos-10" | ||||||||||||||||||||||||
|
|
@@ -147,6 +163,7 @@ Actions taken on a candidate. New entries are **appended** by downstream skills. | |||||||||||||||||||||||
| | `status` | string | See status values below | | ||||||||||||||||||||||||
| | `revert_pr_url` | string | URL of the revert PR (draft or real) | | ||||||||||||||||||||||||
| | `revert_pr_state` | string | `"draft"`, `"open"`, `"merged"`, `"closed"` | | ||||||||||||||||||||||||
| | `revert_in_payload` | bool | `true` if the revert PR is included in the current payload's PR list, `false` if merged but not yet picked up. Only set when `revert_pr_state` is `"merged"`. | | ||||||||||||||||||||||||
| | `result_summary` | string | Brief description of the outcome | | ||||||||||||||||||||||||
| | `jira_key` | string | TRT JIRA key (e.g., `"TRT-1234"`), or `""` | | ||||||||||||||||||||||||
| | `jira_url` | string | TRT JIRA URL, or `""` | | ||||||||||||||||||||||||
|
|
@@ -157,7 +174,8 @@ Actions taken on a candidate. New entries are **appended** by downstream skills. | |||||||||||||||||||||||
| | Status | Meaning | | ||||||||||||||||||||||||
| |--------|---------| | ||||||||||||||||||||||||
| | `"open"` | Pre-existing revert PR found open during analysis | | ||||||||||||||||||||||||
| | `"merged"` | Pre-existing revert PR already merged | | ||||||||||||||||||||||||
| | `"merged"` | Pre-existing revert PR already merged and included in the current payload | | ||||||||||||||||||||||||
| | `"merged_not_in_payload"` | Pre-existing revert PR merged but not yet included in the current payload — fix is pending inclusion in the next payload build | | ||||||||||||||||||||||||
| | `"staged"` | Revert PR and JIRA created, payload jobs triggered (used by `type: "revert"`) | | ||||||||||||||||||||||||
| | `"pending"` | Experiment dispatched, payload jobs running, results not yet collected | | ||||||||||||||||||||||||
| | `"passed"` | Payload jobs passed with the revert — candidate confirmed as cause | | ||||||||||||||||||||||||
|
|
@@ -196,11 +214,11 @@ An empty array or absent key means no RHCOS RPM changes were suspected. | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ### Create (used by `payload-analysis`) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Write a new `payload-results-{tag}.yaml` with `metadata`, `failing_jobs`, `candidates`, and optionally `rhcos_suspects` populated. All failed blocking jobs are recorded in `failing_jobs`. Candidates with no pre-existing revert start with `actions: []`. If a pre-existing revert PR is discovered during analysis, append an action with `type: "revert"` and `status: "open"` or `"merged"`. If RHCOS RPM suspects were identified, include them in `rhcos_suspects[]`. | ||||||||||||||||||||||||
| Write a new `payload-results-{tag}.yaml` with `metadata`, `failing_jobs`, `candidates`, and optionally `rhcos_suspects` populated. All failed blocking jobs are recorded in `failing_jobs`. Candidates with no pre-existing revert start with `actions: []`. If a pre-existing revert PR is discovered during analysis, append an action with `type: "revert"` and the appropriate status: `"open"` (revert PR is open), `"merged"` (revert PR merged and included in the current payload), or `"merged_not_in_payload"` (revert PR merged but not yet included in the current payload). When the status is `"merged"` or `"merged_not_in_payload"`, set `revert_in_payload` to `true` or `false` respectively. If RHCOS RPM suspects were identified, include them in `rhcos_suspects[]`. | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ### Read Candidates (used by `payload-revert`, `payload-experiment`) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| Read the file. Filter candidates by `confidence_score` range. Exclude candidates that already have an action with `status` of `"open"` or `"merged"` (pre-existing revert). Return matching candidates. Use the top-level `failing_jobs[]` to look up full job details for each candidate's `failing_jobs` references. | ||||||||||||||||||||||||
| Read the file. Filter candidates by `confidence_score` range. Exclude candidates that already have an action with `status` of `"open"`, `"merged"`, or `"merged_not_in_payload"` (pre-existing revert). Return matching candidates. Use the top-level `failing_jobs[]` to look up full job details for each candidate's `failing_jobs` references. | ||||||||||||||||||||||||
|
Comment on lines
+217
to
+221
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Exclude staged revert actions here as well.
Suggested fix-Exclude candidates that already have an action with status of "open", "merged", or "merged_not_in_payload" (pre-existing revert).
+Exclude candidates that already have an action with status of "open", "merged", "merged_not_in_payload", or "staged" (any revert already in flight or completed).📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| ### Append Action (used by `stage-payload-reverts`, `payload-experimental-reverts`) | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Exclude
merged_not_in_payloadfrom the revert-recommendation path.Step 6.3 records the new status, but this block still leaves the candidate eligible for the
>= 85revert-candidate path. Without an explicit exclusion later, the report can tell operators both to avoid opening a duplicate revert and to recommend a revert for the same PR.Suggested fix
🧰 Tools
🪛 LanguageTool
[style] ~363-~363: Consider using a different verb for a more formal wording.
Context: ...d continue scoring — the revert did not fix the problem. - **Revert NOT in payloa...
(FIX_RESOLVE)
🪛 SkillSpector (2.2.3)
[error] 403: [P2] Hidden Instructions: Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
Remediation: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
(Prompt Injection (P2))
[error] 482: [P2] Hidden Instructions: Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
Remediation: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
(Prompt Injection (P2))
[warning] 68: [RA2] Session Persistence: Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
Remediation: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
(Rogue Agent (RA2))
🤖 Prompt for AI Agents