Project Tom Hagen: bind environment sources - #25
Merged
Merged
Conversation
commit: |
cowboyd
force-pushed
the
project-tom-hagen-env
branch
2 times, most recently
from
September 4, 2026 02:15
8023562 to
562cb6a
Compare
cowboyd
marked this pull request as ready for review
September 4, 2026 02:15
This was referenced Sep 4, 2026
cowboyd
force-pushed
the
project-tom-hagen-env
branch
2 times, most recently
from
September 9, 2026 01:40
7604c66 to
b5af3af
Compare
cowboyd
force-pushed
the
project-tom-hagen-env
branch
from
September 9, 2026 03:23
b5af3af to
efc3377
Compare
cowboyd
force-pushed
the
project-tom-hagen-env
branch
2 times, most recently
from
September 23, 2026 00:56
d00a3ab to
519043c
Compare
Project Tom Hagen: bind phased models from ordered sources
cowboyd
force-pushed
the
project-tom-hagen-env
branch
from
September 23, 2026 01:13
519043c to
68c0540
Compare
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.
Motivation
Programs need to bind environment variables into the same typed route models as CLI and JavaScript configuration without Configliere reading ambient process state. Environment keys also need predictable route-aware defaults, explicit overrides, deterministic precedence, and behavior that remains correct across dynamic phases.
Approach
Model environments as named, explicitly supplied address sources: Configliere never reads ambient process state. A parameter's default key is derived from its complete route address, giving sibling routes isolated names such as
AUTH0_PORT; an explicitenv()mapping replaces that convention when interoperability requires another key. Sources mounted on the current route are considered before ancestors, while declaration order resolves competing sources at the same mount.Environment values remain text, so they share decoding semantics with CLI input before entering Standard Schema validation; JavaScript values continue directly to validation. The phase scheduler therefore becomes CLI → environment → JavaScript values → schema absence. As with every source, a present but invalid environment value blocks fallback, preserving precedence as an error-reporting rule rather than merely a successful-value preference. Because mounts and claims travel with parse state, the same rules continue to hold across dynamic phases.