Repository navigation
Add AWS AppConfig flag provider - #5
Conversation
Land @pegma/flags-aws-appconfig as a thin FlagProvider that translates a host-injected reader. Map already-evaluated values and unconditional feature-flag documents; reject enabled multi-variant rules so this package does not become a second targeting engine. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Keep the configuration payload typed as unknown after JSON parse so tsc does not treat the narrowed string as the only writable type. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06a04c2236
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Do not treat a JSON object as a feature-flag document just because it has a boolean enabled field. Walk FeatureFlags maps and version/values documents only when the host marked the type, and return DEFAULT_FALLBACK for a missing key instead of throwing. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
Detect a single feature-flag entry before looking up a nested map key so an attribute named like the flag is not unwrapped in place of enabled or _variants. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a3d0160. Configure here.
Detect a retrieved flag map by flag-shaped children, not by an own enabled property, so other keys still extract while a leaf entry with a colliding attribute keeps reading enabled. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>

Problem
Phase 3 already shipped the LaunchDarkly adapter. Nathan authorized the remaining vendor adapters to be built now. This PR lands the next one —
@pegma/flags-aws-appconfig— and no others.Behavior
createAwsAppConfigFlagProvidertakes a host-injected AppConfig reader. The adapter translates an already-evaluated value, or a setting it can map without becoming a second targeting engine, into aFlagResolution. It does not import the AWS SDK, own a client singleton, or evaluate multi-variant rules / percentage splits.Documented AppConfig shapes only:
TARGETING_MATCHenabled: true→TARGETING_MATCHenabled: false, including a stored default variant with norule→DISABLEDDEFAULT_FALLBACK_variantswith aruleis rejected so the flags client can recordERROROptional
awsAppConfigFlagValuereads one stored flag from anAWS.AppConfig.FeatureFlagsdocument or a retrieved flag map. Hosts that need variant evaluation do that in the injected reader (AppConfig Agent orGetLatestConfigurationwith context) and return the already-evaluated value.Tests
Date.now()on the production pathDocs
Plan status is Phase 3 LaunchDarkly and AWS AppConfig in-tree, unpublished. Cloudflare Flagship and flagd stay later. MIT © RetireGolden, LLC.
Do not publish or tag from this PR.