Skip to content

Validate ANTHROPIC_API_KEY early to fail fast on missing secrets#48

Merged
DeDuckProject merged 2 commits intomainfrom
claude/validate-api-keys-early-npoc3
Mar 15, 2026
Merged

Validate ANTHROPIC_API_KEY early to fail fast on missing secrets#48
DeDuckProject merged 2 commits intomainfrom
claude/validate-api-keys-early-npoc3

Conversation

@DeDuckProject
Copy link
Owner

Previously the API key check happened deep in runPipeline(), after config
loading, diff parsing, trigger evaluation, and even app startup. Users
had to wait through all that work before seeing the error.

  • Extract checkApiKey() utility with clear fail/warn/ok semantics
  • main action (index.ts): fail immediately after GITHUB_TOKEN check
  • check-trigger (check.ts): fail if should-run=true, warn if false
  • Keep existing check in pipeline.ts as safety net for CLI/direct usage
  • Add unit tests for all three checkApiKey() scenarios

https://claude.ai/code/session_01Ch9jV1EASRYQZRbLwX5ofz

Previously the API key check happened deep in runPipeline(), after config
loading, diff parsing, trigger evaluation, and even app startup. Users
had to wait through all that work before seeing the error.

- Extract checkApiKey() utility with clear fail/warn/ok semantics
- main action (index.ts): fail immediately after GITHUB_TOKEN check
- check-trigger (check.ts): fail if should-run=true, warn if false
- Keep existing check in pipeline.ts as safety net for CLI/direct usage
- Add unit tests for all three checkApiKey() scenarios

https://claude.ai/code/session_01Ch9jV1EASRYQZRbLwX5ofz
@DeDuckProject DeDuckProject enabled auto-merge March 15, 2026 13:01
@DeDuckProject DeDuckProject merged commit 249b139 into main Mar 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants