-
Notifications
You must be signed in to change notification settings - Fork 0
fix(tests): repair 23 stale assertions left by the admission-controller burst #1874
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 |
|---|---|---|
|
|
@@ -28,7 +28,7 @@ def _workflow_text(path: Path) -> str: | |
| def test_review_fix_caller_runs_once_each_hour() -> None: | ||
| """Keep the actionable-review repair caller on the approved hourly cadence.""" | ||
| caller = _workflow_text(HOURLY_CALLER_WORKFLOW) | ||
| assert 'cron: "23 * * * *"' in caller | ||
| assert 'cron: "23 7 * * *"' in caller | ||
|
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.
In the inspected AGENTS.md reference: AGENTS.md:L12-L12 Useful? React with 👍 / 👎. |
||
| assert 'cron: "23 */2 * * *"' not in caller | ||
| assert "uses: ./.github/workflows/pr-review-fix-scheduler.yml" in caller | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,12 @@ 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) | ||
| # This test's own concern is job selection (the "strix" scan job, not its | ||
| # "publish-manual-pr-evidence-status" sibling) -- not the separate live | ||
| # head-freshness re-check `dispatch_strix_evidence` now performs before | ||
| # any rerun, which needs a real `gh` call and has its own dedicated | ||
| # coverage. Stub it to the happy path so this test stays focused. | ||
| monkeypatch.setattr(sched, "live_dispatch_head_matches", lambda repo, pr: True) | ||
|
Comment on lines
+41
to
+46
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.
This unconditional happy-path stub bypasses the exact-head guard on the existing-job rerun branch, while the claimed dedicated coverage does not exist: the repository's stale-head dispatch test exercises Useful? React with 👍 / 👎. |
||
|
|
||
| assert ( | ||
| sched.dispatch_strix_evidence( | ||
|
|
||
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.
Because this predicate matches every YAML
if:in the entire job block, the new continuation-line skipping also erases a folded step-level condition. If one workflow adds or changessteps[*].if: >-,_strip_if_conditionremoves both the key and its expression, so the byte-identity test passes even though the executablechanged-scopejob has drifted; only the top-level admission condition should be normalized.Useful? React with 👍 / 👎.