Skip to content

Fix config:switch and add environment-aware aws:push#75

Merged
jonathonbyrdziak merged 2 commits intomasterfrom
feature/aws-push-env-config-switch
Mar 21, 2026
Merged

Fix config:switch and add environment-aware aws:push#75
jonathonbyrdziak merged 2 commits intomasterfrom
feature/aws-push-env-config-switch

Conversation

@jonathonbyrdziak
Copy link
Copy Markdown
Contributor

Summary

  • config:switch: Fixed silent failure — now fetches remotes first, verifies branch exists, confirms switch happened, reports actual errors
  • aws:push: Now prompts for environment (lists config repo branches), reads .env directly from the target branch via git show without switching, decrypts .env.enc in-memory if encrypted, pushes to protocol/{project}/{env} in AWS
  • aws:init: Shows current AWS identity with option to reconfigure credentials or use a named profile
  • GitHubApp: Writes token to composer auth.json on refresh so composer install never hits GitHub API rate limits
  • AwsSecretsHelper: Supports named AWS profiles via aws.profile in protocol.json

Test plan

  • protocol config:switch production — should report "does not exist" if branch missing, or switch and decrypt if present
  • protocol config:switch (no arg) — should list branches and prompt
  • protocol aws:push — should list environments and prompt for selection
  • protocol aws:push production — should read .env from production branch directly
  • protocol github:token — verify composer auth.json gets updated alongside git-credentials

🤖 Generated with Claude Code

jonathonbyrdziak and others added 2 commits March 21, 2026 14:04
…GitHub App

- config:switch: Always fetch before switching, verify branch exists
  (local or remote), confirm switch actually happened, report errors
  instead of silently failing
- aws:push: Prompt for environment (config repo branch), read .env
  directly from branch via git show, decrypt .env.enc in-memory,
  push to environment-specific secret name (protocol/{project}/{env})
- aws:init: Show current AWS identity with option to reconfigure,
  support named profiles, run aws configure interactively
- GitHubApp: Write token to composer auth.json on refresh so
  composer install never hits GitHub rate limits
- AwsSecretsHelper: Support named AWS profiles, add pushSecretAs()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…AM policy

- config:switch: When target branch doesn't exist, offer to create it
  via config:new instead of just failing
- config:new: Accept environment name as argument (no longer interactive-only)
- aws:init: On AccessDeniedException, display the exact IAM policy JSON
  needed (pre-filled with account ID and region), loop retry so user can
  update permissions and re-test without restarting the wizard
- SecretsSetup: Minor help text update for environment scope

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jonathonbyrdziak jonathonbyrdziak merged commit de8d2fd into master Mar 21, 2026
5 of 8 checks passed
@jonathonbyrdziak jonathonbyrdziak deleted the feature/aws-push-env-config-switch branch March 21, 2026 21:31
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.

1 participant