Repository navigation
fix(cli): snapshot apply writes a text candidate's prompt - #1152
Merged
Merged
Conversation
Collaborator
Author
|
Review (Birfy) Tip SHA: 8e983aa
|
Birfy
enabled auto-merge (squash)
November 17, 2026 22:24
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.
Summary
#1138made a snapshot the complete candidate, and for a text run that candidate isrendered.snapshot evalalready scores that text, butsnapshot applymaterialisedfiles(the strategy's internal rule store) into a temp directory and handed it toapply_from_payload's tree path. A user who named a file got a directory of hash-named rule files, and an empty-rules snapshot reported a no-op instead of writing the seed prompt.cmd_snapshot_applynow writessnap.render()to a temp file whenkind == \"text\"and passes that file toapply_from_payload, so the text plan,.bak-Nbackup, no-op detection, and parent creation apply. A directory--tois refused with an error naming FILE. Tree-kind snapshots keep the materialise path.Closes #1149.
Tests
tests/test_snapshot_cli.py::test_snapshot_show_export_eval_and_apply: text fixture now pins--to missing.txtwrites exactlyrendered, a second apply isnoop: true, a directory--tois refused, and an empty-rules snapshot writes the seed prompt. Tree assertions move to askill_dirsnapshot.Checklist
changelog.d/1149-snapshot-apply-text.mdVerification at the tip
Tip SHA: 8e983aa
Ran:
prompt.txt(exit 0,noop: false)Not run:
pytest -q— the CI test matrix is the line