Skip to content

Pin verbatim export of snippet and Blueprint source - #285

Open
sirreal wants to merge 1 commit into
fix-254from
pin-snippet-verbatim-export
Open

Pin verbatim export of snippet and Blueprint source#285
sirreal wants to merge 1 commit into
fix-254from
pin-snippet-verbatim-export

Conversation

@sirreal

@sirreal sirreal commented Aug 18, 2026

Copy link
Copy Markdown
Member

Settles a policy question left open during the #262 rebase: after the targeted redesign of global-name prefix stripping, doc.code_snippets[].code / expected_output and setup_blueprints receive no stripping at all — master's blanket array_walk_recursive used to touch them. That is the correct behavior — snippets and Blueprint definitions are executable, verbatim source, not prose — but nobody had stated it or pinned it.

This adds a fixture whose snippet code, expected output, and Blueprint writeFile data all contain \-qualified global names, and asserts they export exactly as authored.

The test passes on fix-254. The same test run against master fails: the blanket walk rewrites the snippet to echo Docs_Global::greet(); and the expected output to Hello from Docs_Global — demonstrating that the pin captures a real difference in #262's behavior, not a tautology. (Master happens to leave this particular Blueprint data alone because its backslashes follow a newline and a quote rather than a space — which only underlines how incidental the old stripping was.)

Targets fix-254 to land with #262.

🤖 Generated with Claude Code

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