Make string reference expansion opt-in#591
Draft
claell wants to merge 1 commit into
Draft
Conversation
* Retain references to string definitions in the default parse stack. * Document and test explicit interpolation before enclosure removal. * Preserve macro linkage during ordinary parse/write use.
This was referenced Jul 16, 2026
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
@stringdefinitions in the default parse stack.ResolveStringReferencesMiddlewareavailable as an explicit dereferencing choice.Closes #590.
Validation
pytest -p no:cacheprovider -W error tests/middleware_tests/test_interpolate.py: 5 passed.tests/test_entrypoint.py.Review note
This is a user-visible default change: callers who rely on immediate literal values must add
ResolveStringReferencesMiddlewareexplicitly. The reason for proposing it is that default expansion is irreversible during a write—macro linkage is semantic information, and the original reference cannot be reconstructed reliably from its expanded text.The PR deliberately uses basic references and does not depend on the broader concatenation work discussed in #396.
AI assistance
This pull request was prepared with ChatGPT Codex using GPT-5.6 Sol with high reasoning effort. Codex assisted with default-policy analysis, standalone test design, documentation, and validation. Automated validation is not a substitute for maintainer review.