Skip to content

Commit aa77b95

Browse files
committed
fix(sdk): use build_replacements unresolved set instead of post-scan for curly templates
The curly template formatter raised a false TemplateFormatError when a substituted value happened to contain {{...}} patterns (e.g. template examples or code snippets in user input). Root cause: after substitution, compute_truly_unreplaced() re-scanned the rendered output for {{...}} patterns and intersected with the original placeholder set. It could not distinguish between genuinely unreplaced placeholders and {{...}} patterns injected by substituted values. Fix: use the 'unresolved' set already returned by build_replacements() to detect truly missing variables. This set is computed before substitution, so it is immune to patterns in substituted values. Changes: - types.py: use unresolved from build_replacements instead of compute_truly_unreplaced - handlers.py: same fix - Remove now-unused compute_truly_unreplaced from both files - Add unit tests covering the false-positive scenario Fixes #3770
1 parent a722743 commit aa77b95

File tree

5,582 files changed

+0
-882513
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,582 files changed

+0
-882513
lines changed

.all-contributorsrc

Lines changed: 0 additions & 569 deletions
This file was deleted.

.better-commits.json

Lines changed: 0 additions & 186 deletions
This file was deleted.

.claude/agents/changelog-editor.md

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)