Skip to content

Comments

[Amber] Fix: Prevent session creation when API keys are not configured#627

Open
github-actions[bot] wants to merge 1 commit intomainfrom
amber/issue-626-prevent-session-creation-when-api-keys-are-not-con
Open

[Amber] Fix: Prevent session creation when API keys are not configured#627
github-actions[bot] wants to merge 1 commit intomainfrom
amber/issue-626-prevent-session-creation-when-api-keys-are-not-con

Conversation

@github-actions
Copy link
Contributor

Automated Fix by Amber Agent

This PR addresses issue #626 using the Amber background agent.

Changes Summary

  • Action Type: auto-fix
  • Commit: cd43885
  • Triggered by: Issue label/command

Pre-merge Checklist

  • All linters pass
  • All tests pass
  • Changes follow project conventions (CLAUDE.md)
  • No scope creep beyond issue description

Reviewer Notes

This PR was automatically generated. Please review:

  1. Code quality and adherence to standards
  2. Test coverage for changes
  3. No unintended side effects

🤖 Generated with Amber Background Agent

Closes #626

Add validation in CreateSession handler to check for ambient-runner-secrets
before allowing session creation. This prevents sessions from being created
and then failing during job creation with unclear error messages.

Changes:
- Check for ambient-runner-secrets existence in CreateSession handler
- Return 400 Bad Request with clear error message when secret is missing
- Skip validation when CLAUDE_CODE_USE_VERTEX=1 (Vertex AI enabled)
- Add test cases for missing API key scenarios
- Update existing tests to create runner secrets before creating sessions

Fixes #626

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amber-generated PR created by Amber background agent auto-fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent session creation when API keys are not configured

0 participants