Skip to content

Project Tom Hagen: bind phased models from ordered sources - #23

Merged
cowboyd merged 6 commits into
mainfrom
project-tom-hagen-binding
Sep 23, 2026
Merged

cowboyd merged 6 commits into
mainfrom
project-tom-hagen-binding

Conversation

@cowboyd

@cowboyd cowboyd commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

Dynamic routing makes CLI binding positional and provisional: an unresolved word may be parameter data or a route selector introduced by a later phase. Binding beyond that boundary can let a parent steal a child's input.

Configuration checkpoints also need a deterministic way to introduce JavaScript values without losing route scope, source precedence, or errors from an invalid selected value.

Approach

Treat bindPhase() as a source scheduler, not a source interpreter. CLI is positional, so it is bound to a fixed point behind the first unresolved-word horizon; value sources are addressable, so they are consulted only after CLI visibility stops advancing. This prevents a parent route from consuming tokens that may belong to a dynamically discovered child while still allowing earlier option values to advance the horizon.

Every source reports the same three states: absent, present and valid, or present and invalid. Absence permits fallback; either present state settles the parameter, so malformed higher-priority input cannot disappear behind a lower-priority value. Immutable source remainders preserve one global claim history across phases, while route-mounted values provide deterministic local-to-ancestor lookup. The resulting schedule is CLI → values → schema absence, with setter syntax available when a route name and option value would otherwise be ambiguous.

@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@23

commit: 3580c78

@cowboyd
cowboyd marked this pull request as ready for review September 4, 2026 02:15
@cowboyd
cowboyd force-pushed the project-tom-hagen-binding branch from 1a55559 to b93bf65 Compare September 9, 2026 01:21
@cowboyd
cowboyd force-pushed the project-tom-hagen-binding branch 2 times, most recently from 10d306e to d0fc38e Compare September 9, 2026 03:23
@cowboyd
cowboyd force-pushed the project-tom-hagen-binding branch from d0fc38e to 618172f Compare September 23, 2026 00:48
Base automatically changed from project-tom-hagen-dynamic to main September 23, 2026 00:56
@cowboyd
cowboyd force-pushed the project-tom-hagen-binding branch from 618172f to 3580c78 Compare September 23, 2026 00:56
@cowboyd
cowboyd merged commit eff38e1 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