Repository navigation
sandbox apply: hidden --no-template; keep labels and params called port as strings (into #374) - #375
Merged
davixcky merged 2 commits intoSep 25, 2026
Conversation
The template language has no escape for a literal @{, so a spec that
--dry-run rendered cannot always be rendered again: a substituted value
containing @{ (a PR title, an embedded Spring config) fails as an
unexpanded variable. --no-template decodes -f without substitution, so
what --dry-run printed can always be applied. The sandbox Action uses it
for every pass after the first render. Hidden, like --dry-run, while
the interface settles; --set with it is refused.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
Risk: medium. Approved based on a bounded hidden --no-template apply path with tests; default apply behavior is unchanged. Cursor Bugbot and Cursor Security Agent were not running after the first poll, so those signals were skipped, and no reviewers were assigned.
Sent by Cursor Approval Agent: Pull Request Approver
port2Int turned every string under a key named port into a number, so a sandbox label or a resource param called port was refused: 'cannot unmarshal number into ... params of type string'. Labels and params are maps of the user's own names, so do not descend into them. Endpoint ports still convert as before. Found by the sandbox Action's audit. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.


Stacked: #362 ← #373 ← #374 ← this one.
Why
The template language has no escape for a literal
@{. So a spec that--dry-runhas rendered can't always be rendered again:The sandbox Action renders once, then validates and applies the result. So any value containing
@{after the first render failed the step: a PR title indescription, an@{embed: file}of a Spring config (server.url=@{/login}), or an env value. The Action's correctness audit rated this high.What
--no-template:-fis decoded as a finished spec, with no@{…}substitution.--settogether with--no-templateis refused, because there's nothing to bind.--dry-run, for the same reason: the Action is the only caller that needs it while the interface settles.Also: labels and resource params called
portport2Intturned every string under a key namedportinto a number, including insidespec.labelsandresources[].params, whose keys are the user's own names. So a label or a param calledportwas refused withcannot unmarshal number into … params of type string. It now skips those two maps, and endpoint ports still convert as before (TestPortKeysInFreeFormMapsStayStrings). Found by the sandbox Action's re-audit.Tests
TestNoTemplateReadsARenderedSpecAsItIs: a value containing@{sha}and@{embed: x}renders once, fails to render a second time without the flag, and with the flag produces byte-identical output.TestNoTemplateRefusesSetTestNoTemplateIsHidden🤖 Generated with Claude Code