From b89a9547ad2da26a27b5e33006a7a810f3b05cd8 Mon Sep 17 00:00:00 2001 From: "developing-today[bot]" <5454422+developing-today[bot]@users.noreply.github.com> Date: Thu, 5 Nov 2026 00:30:50 -0600 Subject: [PATCH] ci(nixos): wire openai-cred-watchdog tests into CI (#6094) The openai-cred-watchdog suite (4 tests pinning the #5250 provider-rename regression) was run by no workflow or flake check. Add a main-tier workflow, modelled on bin-tests.yml, that runs python3 openai-cred-watchdog.test.py on pushes touching nixos/services/openai-cred-watchdog/** and on dispatch, with a fail-if-missing guard so a green run can never be a silently skipped suite. --- .../workflows/openai-cred-watchdog-tests.yml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/openai-cred-watchdog-tests.yml diff --git a/.github/workflows/openai-cred-watchdog-tests.yml b/.github/workflows/openai-cred-watchdog-tests.yml new file mode 100644 index 0000000000..d30479f3f8 --- /dev/null +++ b/.github/workflows/openai-cred-watchdog-tests.yml @@ -0,0 +1,55 @@ +name: openai-cred-watchdog tests + +# CI tier policy: see .github/ci-policy.md +# +# Test verification for nixos/services/openai-cred-watchdog (#6094). +# +# The watchdog is an hourly systemd timer service that checks the +# laptop's OpenCode credential store. Its suite +# (openai-cred-watchdog.test.py, 4 tests) pins the closed #5250 +# regression: after the `openai` -> `openai.main` provider rename +# (PR #5085) the watchdog kept checking the retired identity, +# permanently reported a healthy store as missing credentials, and +# never applied the banned token-sharing check to the renamed +# account. The suite was run by no workflow, flake check, or justfile +# recipe, so the next provider rename would break the watchdog the +# same way with no signal. +# +# This workflow runs the suite on pushes to main that touch the +# watchdog service and on dispatch, following the house pattern for +# test workflows (dispatch plus the shared concurrency pattern). +# Main tier only: not a merge gate. +# +# The run step checks the suite file exists and fails if it is +# missing, so a green run can never be a silently skipped suite. + +on: + workflow_dispatch: + push: + branches: [main] + paths: + - "nixos/services/openai-cred-watchdog/**" + - ".github/workflows/openai-cred-watchdog-tests.yml" + +permissions: + contents: read + +concurrency: + group: openai-cred-watchdog-tests-${{ github.event_name == 'push' && github.run_id || github.ref }} + cancel-in-progress: true + +jobs: + openai-cred-watchdog-tests: + name: "full (main tier): openai-cred-watchdog tests" + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v7 + - name: Run the openai-cred-watchdog suite + working-directory: nixos/services/openai-cred-watchdog + run: | + if [ ! -f openai-cred-watchdog.test.py ]; then + echo "::error::openai-cred-watchdog.test.py is missing — the suite was not run." + exit 1 + fi + python3 openai-cred-watchdog.test.py