Repository navigation
Project Tom Hagen: bind phased models from ordered sources - #23
Merged
Merged
Conversation
commit: |
This was referenced Sep 3, 2026
cowboyd
marked this pull request as ready for review
September 4, 2026 02:15
This was referenced Sep 5, 2026
cowboyd
force-pushed
the
project-tom-hagen-binding
branch
from
September 9, 2026 01:21
1a55559 to
b93bf65
Compare
cowboyd
force-pushed
the
project-tom-hagen-binding
branch
2 times, most recently
from
September 9, 2026 03:23
10d306e to
d0fc38e
Compare
cowboyd
force-pushed
the
project-tom-hagen-binding
branch
from
September 23, 2026 00:48
d0fc38e to
618172f
Compare
cowboyd
force-pushed
the
project-tom-hagen-binding
branch
from
September 23, 2026 00:56
618172f to
3580c78
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
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.