From 9d66397a1850088eea5e923edf560b63910177fc Mon Sep 17 00:00:00 2001 From: repo-worker-code-k Date: Tue, 10 Nov 2026 21:50:38 -0600 Subject: [PATCH] ci(yard-reaper): wire test_yard_reaper.py into a workflow venue + registry (#7879) The yard-reaper runs hourly with --apply while its 17-test deletion-safety suite ran nowhere. Add .github/workflows/yard-reaper-tests.yml (path-gated on infra/yard-reaper/**, PR + push to main + workflow_dispatch, modelled on cold-store-reaper.yml; asserts the suite file exists, then runs unittest discovery) and register the suite in .github/test-suite-registry.json as yard-reaper.python (status mapped). Wiring only: the suite passes unmodified (Ran 17 tests, OK on this branch). --- .github/test-suite-registry.json | 14 ++++++ .github/workflows/yard-reaper-tests.yml | 60 +++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 .github/workflows/yard-reaper-tests.yml diff --git a/.github/test-suite-registry.json b/.github/test-suite-registry.json index 090c537885..964f6b6909 100644 --- a/.github/test-suite-registry.json +++ b/.github/test-suite-registry.json @@ -1060,6 +1060,20 @@ "status": "mapped", "related_issues": [7322], "notes": "Basic-tier PR gate for the deploy registry checks (#7322); before this workflow the two checks ran only in the full flake check on main / the nix-ci schedule." + }, + { + "id": "yard-reaper.python", + "paths": ["infra/yard-reaper/tests/test_yard_reaper.py"], + "invocation": "python3 -m unittest discover -s infra/yard-reaper/tests -v", + "venue": { + "workflow": ".github/workflows/yard-reaper-tests.yml", + "job_step": "python-tests / Run the yard-reaper suite", + "state": "active", + "dispatchable": true + }, + "status": "mapped", + "related_issues": [7879], + "notes": "Deletion-safety suite for the hourly yard-reaper (oracle: Drew's 2026-11-07 disposition rule, #7093). Ran nowhere before #7879: no workflow, flake check, or registry entry, while the timer runs the reaper with --apply hourly." } ], "waivers": [] diff --git a/.github/workflows/yard-reaper-tests.yml b/.github/workflows/yard-reaper-tests.yml new file mode 100644 index 0000000000..6824d05109 --- /dev/null +++ b/.github/workflows/yard-reaper-tests.yml @@ -0,0 +1,60 @@ +name: yard-reaper-tests + +# Test verification for infra/yard-reaper (#7879). +# +# The yard-reaper runs hourly with --apply against the fleet scratch +# yard: it deletes whole entries. The only thing pinning when it must +# NOT delete is its 17-test suite (infra/yard-reaper/tests/ +# test_yard_reaper.py, oracle: Drew's 2026-11-07 disposition rule, +# #7093) -- and until now nothing ran it: no workflow, no flake check, +# no registry entry. The tool already shipped an apply-loop NameError +# on its first real run. This workflow runs the suite on every PR and +# push to main that touches the reaper, so a classification or +# liveness-gate regression is caught before the timer fires it. +# +# The suite is stdlib unittest against the real bin/yard_reaper.py -- +# no network, no credentials, no external CLIs. + +on: + pull_request: + paths: + - "infra/yard-reaper/**" + - ".github/workflows/yard-reaper-tests.yml" + push: + branches: [main] + paths: + - "infra/yard-reaper/**" + - ".github/workflows/yard-reaper-tests.yml" + workflow_dispatch: + +permissions: + contents: read + +# Push-to-main runs each get their own group (keyed by run_id), so a +# later merge can never cancel -- or displace a pending -- verification +# run for an earlier merge: every merged tree gets its own completed +# run. Pull-request runs keep sharing a per-ref group, so a new push +# to a PR still supersedes its stale run (#392). +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_id || github.ref }} + cancel-in-progress: true + +jobs: + python-tests: + name: "python: yard-reaper suite" + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: "3.12" + + - name: Assert the suite file exists + run: test -f infra/yard-reaper/tests/test_yard_reaper.py + + - name: Run the yard-reaper suite + run: python3 -m unittest discover -s infra/yard-reaper/tests -v