Repository navigation
Fail fast when a walkthrough file has unresolved hunk ids - #187
Merged
Merged
Conversation
codiff -w --walkthrough-file exited 0 even when the app could not apply the walkthrough, and the app silently dropped any stop with an unresolved hunk id. The app now checks a CLI launch's walkthrough file against the diff before opening a window, opens nothing when it cannot be applied, and reports the outcome through a result file that both launchers wait on. --share runs the same check, and the skill and guide describe the new behavior.
The packaged launcher read the JSON result with plutil, which only exists on macOS, so the reason was lost on Linux CI. A status line followed by the reason needs only head and tail.
matchai
force-pushed
the
validate-walkthrough-file
branch
from
October 25, 2026 08:52
2be00bc to
7ee2917
Compare
The app checks the walkthrough file at launch whether or not -w is set, so the launchers wait whenever a walkthrough file is given.
codiff-app runs with set -e, so reading the result file before the app wrote it ended the launcher with exit 1 and no message. Check that the file has content first, as the plan loop does, and test a result that arrives after the launcher starts waiting.
cpojer
approved these changes
Oct 26, 2026
cpojer
left a comment
Member
There was a problem hiding this comment.
Thank you! I'll take it from here.
cpojer
marked this pull request as ready for review
October 26, 2026 05:03
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.
codiff -w --walkthrough-fileexits 0 even when the app can't apply the walkthrough, because the app opens detached. The app also silently drops any stop with an unresolved hunk id, so a single bad id loses that stop with no error. Agents then report the walkthrough as open when it isn't. A common cause is zsh, where an unbraced"$sha:h1"applies the:hmodifier and produces.1.The app now checks a CLI launch's walkthrough file against the diff before opening a window. A file that can't be applied opens nothing, and the CLI exits 1 with the reason:
The window reuses the state the check read for its first diff view.
--shareruns the same id check before uploading. The skill no longer claims Codiff repairs drifted anchors, and the guide documents the exit code and the zsh trap.Merge danger: two-way door, CLI launches with
-w --walkthrough-file. A file that used to open with stops missing now opens nothing and fails the command.This PR was written primarily with fx, a coding agent. I reviewed the change; the agent diagnosed the failure, wrote the fix and tests, and verified it against real walkthrough files.
banana banana banana