fix: check --env flags when validating API keys during deploy #292
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.60) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 225 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.324
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #292"
general
weight: 0.35
inFocus7
Description
--env/-eflag toarctl agent deployfor passing environment variables (KEY=VALUE)validateAPIKey()now checks--envvalues before falling back to OS environmentbuildDeployConfig()includes all--enventries in the deployment config, with flag values taking precedence over OS envarctl agent deploy myagent --env GOOGLE_API_KEY=somekeyfailed with "required API key not set"--env/-eflag toarctl agent runfor passing environment variables (KEY=VALUE) (for command consistency)agent runtests to verify behavior.Fixes #151
``
release-note--envAdd missing
flag forarctl agent deployto allow setting environment variables on the agent deployment.
sh
assuming you don't have GOOGLE_API_KEY env set already...
agent deploy test
go run cmd/cli/main.go agent init adk python dice
go run cmd/cli/main.go agent build dice
go run cmd/cli/main.go agent publish dice
go run cmd/cli/main.go agent deploy dice # hit error
go run cmd/cli/main.go agent deploy dice --env GOOGLE_API_KEY=test # works
agent run test
go run cmd/cli/main.go agent init adk python dice
go run cmd/cli/main.go agent build dice
go run cmd/cli/main.go agent run dice # hit error
go run cmd/cli/main.go agent run dice --env GOOGLE_API_KEY=test # pass
`
New TestValidateAPIKey_WithExtraEnvTest plan
(6 cases): extra env, OS env, missing, precedence, nil fallback, unknown provider
New TestBuildDeployConfig_WithEnvOverrides` (5 cases): override inclusion, precedence, OS fallback, telemetry, absent keys🤖 Generated with Claude Code