Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions tests/test_hourly_review_repair_callers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
# and both are asserted separately as static `with:` values rather than
# carried per-target.
_EXPECTED_TARGETS: dict[str, list[dict[str, str]]] = {
"2 * * * *": [
"2 0 * * *": [
Comment thread
seonghobae marked this conversation as resolved.
{
"name": "afipc",
"target_repository": "ContextualWisdomLab/aFIPC",
Expand All @@ -59,7 +59,7 @@
"concurrency_group": "afipc-hourly-review-repair",
},
],
"4 * * * *": [
"4 1 * * *": [
{
"name": "lineageweave",
"target_repository": "ContextualWisdomLab/LineageWeave",
Expand All @@ -68,7 +68,7 @@
"concurrency_group": "lineageweave-hourly-review-repair",
},
],
"9 * * * *": [
"9 2 * * *": [
{
"name": "psychometrics-commons",
"target_repository": "ContextualWisdomLab/psychometrics-commons",
Expand All @@ -77,7 +77,7 @@
"concurrency_group": "psychometrics-commons-hourly-review-repair",
},
],
"10 * * * *": [
"10 3 * * *": [
{
"name": "originweave",
"target_repository": "ContextualWisdomLab/OriginWeave",
Expand All @@ -86,7 +86,7 @@
"concurrency_group": "originweave-hourly-review-repair",
},
],
"14 * * * *": [
"14 4 * * *": [
{
"name": "quarantine-sandbox",
"target_repository": "ContextualWisdomLab/quarantine-sandbox-runtime",
Expand All @@ -95,7 +95,7 @@
"concurrency_group": "quarantine-sandbox-hourly-review-repair",
},
],
"16 * * * *": [
"16 5 * * *": [
{
"name": "nonnest2",
"target_repository": "ContextualWisdomLab/nonnest2",
Expand All @@ -104,7 +104,7 @@
"concurrency_group": "nonnest2-hourly-review-repair",
},
],
"21 * * * *": [
"21 6 * * *": [
{
"name": "github",
"target_repository": "ContextualWisdomLab/.github",
Expand All @@ -113,7 +113,7 @@
"concurrency_group": "github-hourly-review-repair",
},
],
"23 * * * *": [
"23 7 * * *": [
{
"name": "clearfolio",
"target_repository": "ContextualWisdomLab/clearfolio",
Expand All @@ -122,7 +122,7 @@
"concurrency_group": "clearfolio-hourly-review-repair",
},
],
"27 * * * *": [
"27 8 * * *": [
{
"name": "accounting-information-platform",
"target_repository": "ContextualWisdomLab/accounting-information-platform",
Expand All @@ -131,7 +131,7 @@
"concurrency_group": "accounting-information-platform-hourly-review-repair",
},
],
"34 * * * *": [
"34 9 * * *": [
{
"name": "contextual-orchestrator",
"target_repository": "ContextualWisdomLab/contextual-orchestrator",
Expand All @@ -140,7 +140,7 @@
"concurrency_group": "contextual-orchestrator-hourly-review-repair",
},
],
"37 * * * *": [
"37 10 * * *": [
{
"name": "disksage",
"target_repository": "ContextualWisdomLab/disksage",
Expand All @@ -149,7 +149,7 @@
"concurrency_group": "disksage-hourly-review-repair",
},
],
"43 * * * *": [
"43 11 * * *": [
{
"name": "governance-risk-compliance",
"target_repository": "ContextualWisdomLab/governance-risk-compliance",
Expand All @@ -164,7 +164,7 @@
# lookup makes that sharing explicit and still dispatches each
# repository exactly once per hour, via the matrix in
# dispatch-review-repair.
"49 * * * *": [
"49 12 * * *": [
{
"name": "fast-mlsirm",
"target_repository": "ContextualWisdomLab/fast-mlsirm",
Expand All @@ -180,7 +180,7 @@
"concurrency_group": "metering-billing-platform-hourly-review-repair",
},
],
"53 * * * *": [
"53 13 * * *": [
{
"name": "bandscope",
"target_repository": "ContextualWisdomLab/bandscope",
Expand All @@ -189,7 +189,7 @@
"concurrency_group": "bandscope-hourly-review-repair",
},
],
"56 * * * *": [
"56 14 * * *": [
{
"name": "inkspan",
"target_repository": "ContextualWisdomLab/inkspan",
Expand All @@ -198,7 +198,7 @@
"concurrency_group": "inkspan-hourly-review-repair",
},
],
"58 * * * *": [
"58 15 * * *": [
{
"name": "orgmetra",
"target_repository": "ContextualWisdomLab/Orgmetra",
Expand All @@ -207,7 +207,7 @@
"concurrency_group": "orgmetra-hourly-review-repair",
},
],
"59 * * * *": [
"59 16 * * *": [
{
"name": "semantic-data-portal",
"target_repository": "ContextualWisdomLab/semantic-data-portal",
Expand Down
11 changes: 8 additions & 3 deletions tests/test_noema_orchestrator_workflow_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_noema_close_cleanup_selects_only_the_closed_pr_across_shared_display_ti
script = textwrap.dedent(
workflow_step(
workflow_text("noema-review.yml"),
"Cancel queued and running Noema reviews for the closed pull request",
"Cancel queued and running Noema reviews for the inactive pull request",
).split(" run: |\n", 1)[1].split("\n noema-review:", 1)[0]
)
workflow_path = ".github/workflows/noema-review.yml"
Expand Down Expand Up @@ -93,7 +93,10 @@ def test_noema_close_cleanup_selects_only_the_closed_pr_across_shared_display_ti
fake_gh.write_text(
"""#!/usr/bin/env bash
set -euo pipefail
if [[ "$*" == *"--paginate"* ]]; then
if [[ "$*" == *"/pulls/7"* ]]; then
printf '%s\n' "$*" >>"$FAKE_CALLS_FILE"
printf '%s\n' '{"state":"closed","draft":false,"head":{"sha":"'"$INACTIVE_PR_HEAD_SHA"'"}}'
elif [[ "$*" == *"--paginate"* ]]; then
[[ "$*" != *"/actions/workflows/"* ]] || exit 99
printf '%s\n' "$*" >>"$FAKE_CALLS_FILE"
url="$3"
Expand All @@ -113,7 +116,9 @@ def test_noema_close_cleanup_selects_only_the_closed_pr_across_shared_display_ti
**os.environ,
"PATH": f"{tmp_path}{os.pathsep}{os.environ.get('PATH', '')}",
"TARGET_REPOSITORY": "ContextualWisdomLab/demo",
"CLOSED_PR_NUMBER": "7",
"INACTIVE_PR_NUMBER": "7",
"INACTIVE_PR_HEAD_SHA": "a" * 40,
"PR_ACTION": "closed",
"CURRENT_RUN_ID": "999",
"FAKE_RUNS_FILE": str(runs_file),
"FAKE_CALLS_FILE": str(calls_file),
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pr_review_autofix_nvidia_nim_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ 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."""
"""Keep the actionable-review repair caller on the approved daily-staggered cadence."""
caller = _workflow_text(HOURLY_CALLER_WORKFLOW)
assert 'cron: "23 * * * *"' in caller
assert 'cron: "23 7 * * *"' in caller
assert 'cron: "23 */2 * * *"' not in caller
assert "uses: ./.github/workflows/pr-review-fix-scheduler.yml" in caller

Expand Down
1 change: 1 addition & 0 deletions tests/test_strix_rerun_job_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ 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)
monkeypatch.setattr(sched, "fetch_pr", lambda *_args: [pr])

assert (
sched.dispatch_strix_evidence(
Expand Down
Loading