Skip to content

Add AWS AppConfig flag provider - #5

Merged
FlyOverCoderKY merged 5 commits into
mainfrom
cursor/flags-aws-appconfig-4ed2
Aug 15, 2026
Merged

FlyOverCoderKY merged 5 commits into
mainfrom
cursor/flags-aws-appconfig-4ed2

Conversation

@FlyOverCoderKY

Copy link
Copy Markdown
Contributor

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

createAwsAppConfigFlagProvider takes 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 a FlagResolution. It does not import the AWS SDK, own a client singleton, or evaluate multi-variant rules / percentage splits.

Documented AppConfig shapes only:

  • already-evaluated values, and ordinary string / JSON encodings → TARGETING_MATCH
  • an unconditional feature-flag object with enabled: true → TARGETING_MATCH
  • enabled: false, including a stored default variant with no rule → DISABLED
  • missing reader result → DEFAULT_FALLBACK
  • an enabled document that still carries _variants with a rule is rejected so the flags client can record ERROR

Optional awsAppConfigFlagValue reads one stored flag from an AWS.AppConfig.FeatureFlags document or a retrieved flag map. Hosts that need variant evaluation do that in the injected reader (AppConfig Agent or GetLatestConfiguration with context) and return the already-evaluated value.

Tests

  • Unit tests for value mapping, injected key mapping, unevaluated rules, reader errors, and no AWS SDK / Date.now() on the production path
  • Phase 1 conformance suite against a memory reader
  • Release inventory includes the new public package

Docs

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.

Open in Web Open in Cursor 

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>
@chatgpt-codex-connector

Copy link
Copy Markdown

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>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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>
@FlyOverCoderKY
FlyOverCoderKY merged commit 14646a1 into main Aug 15, 2026
5 checks passed
@FlyOverCoderKY
FlyOverCoderKY deleted the cursor/flags-aws-appconfig-4ed2 branch August 15, 2026 21:37
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.

2 participants