fix: module/team selection enables the flags its stacks need - #42
Merged
Conversation
Usability review blocker 4: `deploy --module C` selects ${PREFIX}-networking
and `--module E` selects ${PREFIX}-security, but those stacks only exist in
the synthesized app when ENABLE_NETWORKING / ENABLE_SECURITY are true — so
cdk failed with "No stacks match" after bootstrap had already run. Same for
`--team agent` (A2A runtime stacks behind ENABLE_A2A).
Generalizes the module-8 special case in the workshop loop: MODULE_FLAGS /
TEAM_FLAGS tables next to MODULE_MAP/TEAM_MAP make a selection own both its
stack names and the feature flags those stacks need. apply_selection_flags
runs after target resolution and rebuilds CONTEXT_ARGS; the workshop loop
now uses the same apply_module_flags per module (ad-hoc module-8 line
removed).
Precedence: an explicit env var (or platform.yaml, applied earlier) still
wins — a flag is only exported when currently unset/empty. The log line
points at platform.yaml to make the flag permanent.
Verified:
- scripts/check-deploy-config.sh: all checks PASS incl. new (s) — module C
exports ENABLE_NETWORKING=true when unset; explicit =false survives;
module 8 / team agent set ENABLE_A2A; module 3 exports nothing.
- scripts/check-workshop-flow.sh: all PASS (greenfield dry run unchanged).
- `workshop --dry-run --profile multi-agent`: module 8 logs the flag and
prints its A2A stacks via the generic path.
- shellcheck --severity=warning on both files: clean.
|
Commit: Security Scan Results
|
shellcheck 0.9 (the CI runner) raises SC2218 error on calling a function defined later in the file; 0.11 locally does not. Definition order now matches call order; behavior identical (checks 23/23 green).
The CI runner's shellcheck pairs check (s)'s late stub with the earlier eval'd call and raises SC2218; defining the stub via eval keeps both invisible, like every other extracted function in this file.
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.
What
Usability-review blocker 4:
deploy --module Cselects<prefix>-networkingand--module Eselects<prefix>-security, but those stacks only exist in the synthesized app when their feature flags are on — so cdk failed with "No stacks match" after bootstrap had already run.--team agenthad the same problem with the A2A runtimes. Module 8 carried an ad-hoc special case; this generalizes it.Fix
A module/team definition now owns both its stack names and the flags those stacks need:
One worker (
apply_flags) exports a flag only when unset — explicit env vars andplatform.yamlvalues win — logs how to make the selection permanent, and rebuilds the context args. Applied after target resolution for--module/--team, and per-module in the workshop loop, replacing the module-8 special case. Side benefit:destroy/synth/diffwith--module C/Enow also see the selected stack.One deliberate behavior change
The old module-8 special case unconditionally forced
ENABLE_A2A=truein the workshop. Now an explicitENABLE_A2A=false(env or manifest) wins uniformly — same precedence rule as everywhere else in the script.Check
Check (s) in
check-deploy-config.sh: module C exports its flag when unset, an explicitfalsesurvives the selection, module 8 and team agent set A2A, and a module with no entry exports nothing.Verified
All 23 deploy-config checks and the 5 workshop-flow checks green; workshop dry-run for multi-agent shows module 8's flag arriving via the generic path; shellcheck clean.
Known follow-up (out of scope for the smallest diff):
check_org_idruns before selection flags are applied, so its networking/ORG_ID warning does not fire for--module C.