Skip to content

Project Tom Hagen: bind environment sources - #25

Merged
cowboyd merged 2 commits into
mainfrom
project-tom-hagen-env
Sep 23, 2026
Merged

cowboyd merged 2 commits into
mainfrom
project-tom-hagen-env

Conversation

@cowboyd

@cowboyd cowboyd commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

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 explicit env() 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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/configliere@25

commit: 68c0540

@cowboyd cowboyd changed the title project tom hagen env Project Tom Hagen: bind environment sources Sep 3, 2026
@cowboyd
cowboyd force-pushed the project-tom-hagen-env branch 2 times, most recently from 8023562 to 562cb6a Compare September 4, 2026 02:15
@cowboyd
cowboyd marked this pull request as ready for review September 4, 2026 02:15
@cowboyd
cowboyd force-pushed the project-tom-hagen-env branch 2 times, most recently from 7604c66 to b5af3af Compare September 9, 2026 01:40
@cowboyd
cowboyd force-pushed the project-tom-hagen-env branch from b5af3af to efc3377 Compare September 9, 2026 03:23
@cowboyd
cowboyd force-pushed the project-tom-hagen-env branch 2 times, most recently from d00a3ab to 519043c Compare September 23, 2026 00:56
Base automatically changed from project-tom-hagen-binding to main September 23, 2026 01:13
@cowboyd
cowboyd force-pushed the project-tom-hagen-env branch from 519043c to 68c0540 Compare September 23, 2026 01:13
@cowboyd
cowboyd merged commit 4b4b56f into main Sep 23, 2026
3 checks passed
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