fix(selectors): make only value rewrites live recorded placeholders
Merged
TH
40m ago+34+34+01234567890123456789-6-6-0123456789
Summary
This is a follow-up to #4394, from the maintainer's non-blocking review note. #4394 merged before this commit was pushed.
#4394 had parameterizeRecordedResultEcho record every placeholder it wrote, including in object keys. A literal echoed only as a key could therefore mark its placeholder live, and the script writer would then leave a user-typed ${NAME} elsewhere in the same action unescaped.
The fix: the payload walk now tells its leaf transform whether it is rewriting a key or a value. The echo pass records only value rewrites, so a key match still redacts but is never live.
2 files, test included. Refs #4368.
Validation
- Tested SHA
3506315on current main. - A new recorder test echoes a literal only as an object key. The key becomes
${FOO}andlivePlaceholdersstays empty. The test fails on main. - Recorder and selectors tests pass (274), as do the script-writer tests.
check:quickandcheck:fallow --base origin/mainpass on the same change, which was committed first as0b4e235.- There is no device-facing change.
Generated by Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.