diff --git a/docs/doctoring/org-queue-sweep-rotation.md b/docs/doctoring/org-queue-sweep-rotation.md index 03784d0b7e..51a640443a 100644 --- a/docs/doctoring/org-queue-sweep-rotation.md +++ b/docs/doctoring/org-queue-sweep-rotation.md @@ -1,8 +1,16 @@ # Org-queue-sweep review-dispatch rotation +> **Superseded for queue hygiene.** The organization sweep no longer inventories +> or cancels repository-wide queued/in-progress Actions runs. That duplicate +> queue-hygiene path was removed by `.github#1878` (`1b65dbc35e7183722ad77894e2d80b39993be90d`), +> and current-head coalescing was later integrated into the merge scheduler. +> The rotation material below remains historical evidence for the former +> review-dispatch fairness mechanism, not a description of current stale-run +> ownership. + ## Problem -`org-queue-sweep` in `pr-review-merge-scheduler.yml` walks every organization +Historically, `org-queue-sweep` in `pr-review-merge-scheduler.yml` walked every organization repository once per 15-minute tick and consumes bounded, organization-wide review-dispatch budgets across that entire walk. Default-base work uses `ORG_SWEEP_REVIEW_DISPATCH_LIMIT` (default `1`); stacked work uses the separate @@ -23,6 +31,15 @@ required review. ## Decision +The current ownership boundary is: + +- `pr-review-merge-scheduler` owns review, merge, and branch-update state. +- The integrated current-head coalescer owns same-PR stale-run cleanup. +- The organization sweep does not repeat an Actions inventory per repository. + +The rotation decision below is retained as historical operational evidence for +the former review-dispatch fairness implementation. + Rotate the sweep's repository walk order by a rotation index before applying the unchanged organization-wide budgets. `rotation_offset = rotation_index % repository_count`; the walk starts at that offset and wraps. This spreads each diff --git a/tests/test_org_queue_sweep_documentation_contract.py b/tests/test_org_queue_sweep_documentation_contract.py new file mode 100644 index 0000000000..eda0c98e48 --- /dev/null +++ b/tests/test_org_queue_sweep_documentation_contract.py @@ -0,0 +1,17 @@ +"""Contract for the superseded organization queue-sweep runbook.""" + +from pathlib import Path + + +ROOT = Path(__file__).resolve().parents[1] +RUNBOOK = ROOT / "docs" / "doctoring" / "org-queue-sweep-rotation.md" + + +def test_runbook_marks_removed_queue_hygiene_as_historical() -> None: + """The runbook must not describe removed repository-wide inventory as current.""" + source = RUNBOOK.read_text(encoding="utf-8") + + assert "Superseded for queue hygiene" in source + assert "does not repeat an Actions inventory per repository" in source + assert "#1878" in source + assert "historical operational evidence" in source