Skip to content
Merged
Changes from all commits
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
55 changes: 55 additions & 0 deletions .github/workflows/openai-cred-watchdog-tests.yml
Original file line number Diff line number Diff line change
@@ -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