ci: soft-skip self-review on missing key / billing - #4
Merged
Merged
Conversation
Skip the self-review job when secrets.ANTHROPIC_API_KEY is empty so missing secret never fails the PR check. Keep fail-on: never. When fail-on=never, action.yml soft-skips Anthropic auth/billing (empty credits) instead of hard-failing operational exit 3. Docs: one-key or no-key path; gate is auth engine; never claim two keys. No real keys in git.
GitHub Actions no longer allows `secrets` in jobs.<id>.if (only github/needs/vars/inputs), so the preferred one-liner fails the workflow file. Replace with a key-gate job that outputs has_key; the review job runs only when the secret is non-empty. Missing secret -> skipped job, not a red check. Keep fail-on: never; billing soft-skip stays in action.yml.
lazycoder review — 💥 ERROR0 finding(s), 0 abstention(s), 0 rule error(s) — R1..R17 rubric via lazycoder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/self-review.yml: `if: ${{ secrets.ANTHROPIC_API_KEY != '' }}` so empty/missing secret skips the job (not a red check). Keep `fail-on: never`.Proof (local, no key)
```bash
env -u ANTHROPIC_API_KEY uv run pytest -q
EXIT 0 — 114 passed, 1 deselected
env -u ANTHROPIC_API_KEY uv run python scripts/corpus_cli.py prove corpus/seed.jsonl
EXIT 0 — OFFLINE_PROVE: PASS
env -u ANTHROPIC_API_KEY uv run pytest -q \
tests/test_cli.py::test_cli_replay_matches_recorded_verdict_without_model \
tests/test_decision_log.py::test_verdict_replays_from_the_record_alone
EXIT 0
uv run ruff check . && uv run black --check . && uv run mypy src
EXIT 0
```
Test plan