From 9b20f78a066b56c0bcb6fe1204316f9d07c5754c Mon Sep 17 00:00:00 2001 From: Arths17 Date: Wed, 25 Nov 2026 14:41:35 -0600 Subject: [PATCH] Remove agent-pr-checks tests and docs --- CHANGELOG.md | 1 + docs/coordination/agent-queue-smoke.md | 5 ++-- docs/coordination/agent-tasks.md | 16 ------------- tests/agent_queue/test_workflows_cli.py | 31 +------------------------ 4 files changed, 4 insertions(+), 49 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c2ceca..858a285 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ remains unsupported. - Documented the proposed guest AVX/AVX2 state and decoding contract and specified an original integer fixture with known results and fault controls (#299). ### Removed +- Removed the "Agent PR checks" workflow (`.github/workflows/agent-pr-checks.yml`), its section in `docs/coordination/agent-tasks.md` and the four workflow tests in `tests/agent_queue/test_workflows_cli.py` that only exercised it. Pull requests are no longer checked for `Closes #N`, task file patterns or `/verified` comments; the claims workflow and its tests are unchanged. The agent queue Python tests pass locally (85 tests). - Removed the "PR template" check (`.github/workflows/pr-template.yml`, `scripts/pr_template_check.py` and its tests) and its CI test step. Also removed `.github/PULL_REQUEST_TEMPLATE.md`. Pull request descriptions are no longer validated or pre-filled; CONTRIBUTING.md still asks for the same information and the claim-first rule still applies. ### Changed diff --git a/docs/coordination/agent-queue-smoke.md b/docs/coordination/agent-queue-smoke.md index b7de8d1..10f5b23 100644 --- a/docs/coordination/agent-queue-smoke.md +++ b/docs/coordination/agent-queue-smoke.md @@ -36,10 +36,9 @@ pending-run replay and exact head-SHA verification against a real repository. ## Production follow-ups -1. Keep `agent-pr-checks` advisory until this evidence is reviewed. -2. Coordinate adding `pull-requests: read` to the production audit job permissions +1. Coordinate adding `pull-requests: read` to the production audit job permissions (same defect as the smoke audit failure). -3. Add a second QA-eligible verifier before treating `/verified` as smoke-complete. +2. Add a second QA-eligible verifier before treating `/verified` as smoke-complete. ## Local unit suite diff --git a/docs/coordination/agent-tasks.md b/docs/coordination/agent-tasks.md index 7479f28..4061e53 100644 --- a/docs/coordination/agent-tasks.md +++ b/docs/coordination/agent-tasks.md @@ -90,22 +90,6 @@ cycles `agent:invalid` (and restores them when fixed), flags overlapping claims writes a JSON summary to the run summary. `scripts/agent-queue.sh status --json` prints the same machine-readable summary (counts and lists per area, priority and state). -## Pull request checks - -`agent-pr-checks` fails a pull request when: it has no `Closes #N` for a claimed task; the task is held -by someone else; it changes files outside the task's patterns; it changes a file that another open -pull request also changes; the claim has lapsed without a push; or no eligible `/verified ` exists. The SHA must be the full 40 characters and the only argument: a commit with the -same short prefix is cheap to make. After an accepted `/verified` (an eligible verifier, the current -head) the verify job evaluates the same check again and writes it to its run summary; the earlier -check run is not re-run, since `pull_request_target` runs are recorded against the base branch and -cannot be found by the pull request head. Refused, stale, malformed or unauthorized `/verified` -comments get a reply and nothing else, and other pull request comments start no job. - -The check is advisory for now: a failure is shown as a warning and in the run summary, and the job -still succeeds. It becomes blocking (fail on problems, then a required check) only after a live smoke -test on GitHub and the migration of existing issues into the queue. - ## Forks and upstream sync Work from a fork, but synchronise against the real upstream (`ranveersoni98/Xenora` in the diff --git a/tests/agent_queue/test_workflows_cli.py b/tests/agent_queue/test_workflows_cli.py index ffd8396..a8c7055 100644 --- a/tests/agent_queue/test_workflows_cli.py +++ b/tests/agent_queue/test_workflows_cli.py @@ -15,7 +15,7 @@ def dump(obj, path): WF = os.path.join(ROOT, ".github", "workflows") -QUEUE_WORKFLOWS = ["agent-claims.yml", "agent-pr-checks.yml"] +QUEUE_WORKFLOWS = ["agent-claims.yml"] USER_TEXT = re.compile(r"\$\{\{\s*github\.event\.(comment|issue|pull_request)\.(body|title)|github\.head_ref") @@ -58,11 +58,6 @@ class Workflows(unittest.TestCase): bad = "jobs:\n a:\n steps:\n - run: |\n echo ${{ github.event.comment.body }}\n" self.assertTrue(any(re.search(r"\$\{\{", b) for b in run_blocks(bad))) - def test_pr_workflow_never_checks_out_pr_code(self): - text = self.read("agent-pr-checks.yml") - self.assertNotRegex(text, r"github\.event\.pull_request\.head|ref:\s*\$\{\{") - self.assertIn("pull_request_target", text) - def job(self, name, job): """Text of one job block: from ` :` to the next two-space-indented key.""" m = re.search(r"(?ms)^ %s:\n(.*?)(?=^ \S|\Z)" % re.escape(job), self.read(name)) @@ -74,9 +69,7 @@ class Workflows(unittest.TestCase): def test_only_command_comments_start_runs(self): # Ordinary comments must not start a claim run or a verification re-run. - self.assertIn("startsWith(github.event.comment.body, '/verified')", self.job_if("agent-pr-checks.yml", "verify")) self.assertIn("startsWith(github.event.comment.body, '/')", self.job_if("agent-claims.yml", "command")) - self.assertNotIn("issue_comment", self.job_if("agent-pr-checks.yml", "check")) def test_claim_jobs_share_one_group_and_replay(self): for job in ("command", "audit"): @@ -87,15 +80,6 @@ class Workflows(unittest.TestCase): self.assertIn("--recent-commands", text, job) self.assertNotIn("agent_queue decide", self.job("agent-claims.yml", "command")) - def test_rerun_needs_an_accepted_verification(self): - text = self.job("agent-pr-checks.yml", "verify") - self.assertIn('if ! python3 -m agent_queue should-rerun --actions "$RUNNER_TEMP/actions.json"; then exit 0; fi', text) - self.assertLess(text.index("agent_queue should-rerun"), text.index("agent_queue pr-check")) - # The check is evaluated in this job: pull_request_target runs cannot be found by head SHA. - self.assertNotIn("gh run", text) - self.assertNotIn("actions: write", text) - self.assertIn("::warning title=Agent PR check (advisory)::", text) - def test_should_rerun_exit_codes(self): with tempfile.TemporaryDirectory() as d: p = os.path.join(d, "a.json") @@ -104,19 +88,6 @@ class Workflows(unittest.TestCase): dump(actions, p) self.assertEqual(Cli.run_cli(self, "should-rerun", "--actions", p).returncode, code, actions) - def test_verify_runs_one_at_a_time_per_pull_request(self): - text = self.job("agent-pr-checks.yml", "verify") - self.assertRegex(text, r"group: agent-verify-\$\{\{ github\.event\.issue\.number \}\}\n\s+cancel-in-progress: false") - - def test_pr_check_is_advisory(self): - # Exit status 1 (problems found) only warns until the live smoke test and issue migration. - text = self.job("agent-pr-checks.yml", "check") - found = re.search(r'if \[ "\$status" -eq 1 \]; then\n(.*?)\n\s+elif \[ "\$status" -ne 0 \]; then\n\s+exit "\$status"', text, re.S) - self.assertIsNotNone(found, text) - self.assertIn("::warning title=Agent PR check (advisory)::", found.group(1)) - self.assertNotIn("exit", found.group(1)) - self.assertEqual(text.count("exit "), 1) - def test_actions_pinned_by_sha(self): for name in QUEUE_WORKFLOWS: for use in re.findall(r"uses:\s*(\S+)", self.read(name)):