Can render an executable - #329
Merged
Merged
Conversation
myobie
force-pushed
the
agent/deterministic-render-modes
branch
2 times, most recently
from
August 23, 2026 20:46
1e03721 to
229f55b
Compare
myobie
marked this pull request as ready for review
August 23, 2026 21:09
myobie
marked this pull request as draft
August 23, 2026 21:11
myobie
marked this pull request as ready for review
August 23, 2026 22:01
myobie
force-pushed
the
agent/deterministic-render-modes
branch
from
August 24, 2026 21:34
229f55b to
856985e
Compare
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.
What changed
executable=#truetocopy,file,json-upsert, andensure-line.filecontent in positional and childcontentforms.0755when true and exact mode0644when false or absent.Why
Render copied only bytes and used
fs::write. A new destination used umask-dependent permissions. An existing destination retained its prior mode. The same declaration therefore produced different results from different local history.A rendered command wrapper could silently remain non-executable. A PATH lookup could then run another command and leave an audit log quiet.
User impact
Catalog authors can declare an executable copy:
They can also declare an executable inline file:
The blank line before the raw-string delimiter encodes the script's final newline. The copy source mode does not affect the destination.
Proof
The red test commit is
fea6ff2. Its exact inline-script regression fails before the implementation with mode0664instead of0755.The implementation proves exact bytes, the final newline, script execution, empty content, raw quote sequences, idempotency, and no unchanged-target report. It also proves the
true -> false -> truemode sequence.Focused checks pass:
cargo test --test materialize— 26 passed.cargo test --test validate— 44 passed.cargo fmt --all -- --checkpasses.git diff --check origin/main...HEADpasses.cargo build --release --lockedpasses.nix flake check --print-build-logspasses at229f55b.A real
st2 up --materialize-only --agentproof reports one operation, creates mode0755, and runs the script. Its second run reports zero operations.The full workspace run reaches a known current-main failure in
incomplete_apply_marker_blocks_declarations_but_not_the_state_plane. The same exact test fails onorigin/main. The existing catalog-diff classification test also fails on both states. Strict all-target Clippy has the same nine library failures onorigin/main.This PR stays draft under the st2 merge freeze.