Skip to content

fix(platform): skip absent optional config bindings - #1354

Open
aryasaatvik wants to merge 2 commits into
alchemy-run:mainfrom
aryasaatvik:fix/optional-config-bindings
Open

fix(platform): skip absent optional config bindings#1354
aryasaatvik wants to merge 2 commits into
alchemy-run:mainfrom
aryasaatvik:fix/optional-config-bindings

Conversation

@aryasaatvik

Copy link
Copy Markdown
Contributor

Summary

Skip synthetic runtime bindings for optional configuration fields that are absent, while preserving bindings for concrete configuration values.

Behavior

Config.optional(absent)  -> no RuntimeContext binding
Config.string(present)   -> RuntimeContext binding remains

The plan phase now rejects empty paths and undefined values before publishing a binding. The runtime phase also ignores empty keys instead of attempting an invalid lookup.

Validation

  • mise exec bun@1.3.13 -- bun node_modules/alchemy-test/bin/alchemy-test.ts --sequential test/PlatformConfigBindings.test.ts
  • Result: 0 failed | 1 passed

Scope

This only changes configuration binding publication; it does not alter required configuration resolution or runtime provider behavior.

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