feat(api): fan out scoped variables at snapshot publish - #96
Merged
Conversation
… renders
The scoped values field passed `value={undefined}` to Radix Select when the
field was empty, putting it in uncontrolled mode. The first selection
transitioned the prop from undefined to a string, and the
`<SelectValue>{stringValue}</SelectValue>` children-override path didn't
reflect the change, leaving the trigger blank until the next interaction.
Pass `?? ''` so the select stays controlled and let `SelectValue` render
the matching item's text natively.
… publish
config entries that reference a scoped variable via `{{name}}` now produce one
resolved tuple per scope the referenced variable touches in the published
snapshot, instead of a single unscoped default. fan-out is the dim-space
cartesian over the referenced variables' scope dimensions, with explicit
literal scope tuples on the entry winning over fan-out emissions for the same
final tuple. strict-unresolved policy still blocks publish via 422 when a
required target tuple has no resolution.
implementation lives behind two new modules: ResolvedEntryBuilder (per-entry
orchestrator) and TargetTupleBuilder (dim-space helper). placeholder regex is
deduplicated through PlaceholderScanner and the MatchCollection is reused
between scan and substitute paths to avoid M extra regex passes per source
value. templates merge first, fan-out runs once on the merged entry set.
per-entry sensitivity preserved.
variables.md, concepts.md, Domain-Model.md, and Technical-Architecture.md described the publish pipeline as per-placeholder substitution against the client's scopes. that model predates the fan-out behavior on the bug-fixes branch, where a scopeless config entry referencing a scoped variable produces one snapshot value per tuple the variable touches. updated the variable resolution doc to lead with fan-out, document the strict-unresolved policy, and reword the worked example to show the materialized per-environment snapshot values. updated the snapshot resolution process in the domain model to describe target generation, source-scope merge, explicit-wins dedup, and per-entry sensitivity. nudged the technical architecture pipeline diagram and the concepts overview to match.
the user-facing guide was leaning on internal jargon (fan-out, dim-space cartesian, target tuples, emissions, dedup-by-most-specific-target) and was linking out to internal C# classes from the user docs. swapped those for plain-english descriptions with worked examples that show what users see in the published snapshot, and dropped the implementation-detail links. also replaced em-dashes in inline prose across the guide (kept conventional em-dashes inside link labels and "what's next?" lists, since those are typographic separators not prose interruptions). renamed two-tier-resolution section anchor to two-tier-lookup with the matching cross-references updated.
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.
Summary
{{name}}now produce one resolved tuple per scope the variable touches in the published snapshot, instead of a single unscoped default. AuthoringMyConfigEntry = "{{MyVariable}}"against a variable with per-environment values fans out automatically — no need to redeclare scope tuples on every entry.ResolvedEntryBuilder(per-entry orchestrator) andTargetTupleBuilder(dim-space helper).PlaceholderScanneris now the single source of truth for the{{...}}regex; theMatchCollectionis reused between scan and substitute paths to avoid M extra regex passes per source value.