-
Notifications
You must be signed in to change notification settings - Fork 0
fix(scheduler): rerun the Strix scan job, not a sibling job #1586
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
dcce9e5
test(scheduler): reproduce Strix sibling-job rerun selection
seonghobae 06562c9
chore(ci): stage one-shot Strix rerun selector repair
seonghobae 511d995
fix(ci): make PR 1584 one-shot repair self-contained
seonghobae 5b7ddd1
fix(scheduler): rerun authoritative Strix scan job
github-actions[bot] ae36826
fix(ci): provision pinned pytest for PR 1584 repair
seonghobae e7e4a8d
chore(ci): retire completed PR 1584 source-fix workflow
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| """Regression coverage for exact-head Strix rerun job selection.""" | ||
|
|
||
| from scripts.ci import pr_review_merge_scheduler as sched | ||
|
|
||
|
|
||
| def _strix_job(name: str, job_id: int, conclusion: str) -> dict: | ||
| """Build one exact-head job from the trusted Strix workflow.""" | ||
| return { | ||
| "__typename": "CheckRun", | ||
| "name": name, | ||
| "status": "COMPLETED", | ||
| "conclusion": conclusion, | ||
| "startedAt": "2026-08-30T05:24:23Z", | ||
| "detailsUrl": f"https://github.com/ContextualWisdomLab/bandscope/actions/runs/33294403831/job/{job_id}", | ||
| "checkSuite": { | ||
| "createdAt": "2026-08-30T05:22:18Z", | ||
| "workflowRun": {"workflow": {"name": "Strix Security Scan"}}, | ||
| }, | ||
| } | ||
|
|
||
|
|
||
| def test_dispatch_strix_reruns_scan_job_not_sibling_publisher(monkeypatch) -> None: | ||
| """A skipped status-publisher sibling must never be selected as the Strix rerun target.""" | ||
| pr = { | ||
| "number": 1055, | ||
| "statusCheckRollup": { | ||
| "contexts": { | ||
| "nodes": [ | ||
| _strix_job("strix", 99212031836, "FAILURE"), | ||
| _strix_job("publish-manual-pr-evidence-status", 99212677006, "SKIPPED"), | ||
| ] | ||
| } | ||
| }, | ||
| } | ||
| reruns: list[tuple[str, str, str]] = [] | ||
|
|
||
| def record_rerun(repo: str, job_id: str, *, dry_run: bool, action: str) -> None: | ||
| reruns.append((repo, job_id, action)) | ||
|
|
||
| monkeypatch.setattr(sched, "rerun_actions_job", record_rerun) | ||
|
|
||
| assert ( | ||
| sched.dispatch_strix_evidence( | ||
| "ContextualWisdomLab/bandscope", | ||
| "Strix Security Scan", | ||
| pr, | ||
| dry_run=False, | ||
| ) | ||
| == "rerun" | ||
| ) | ||
| assert reruns == [ | ||
| ( | ||
| "ContextualWisdomLab/bandscope", | ||
| "99212031836", | ||
| "rerun-strix-evidence", | ||
| ) | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
📝 Info: Trusted identity remains enforced
is_strix_scan_check_runrequires both the authoritative job name and trusted workflow identity. Unrelated same-named checks cannot become rerun targets.Was this helpful? React with 👍 or 👎 to provide feedback.