Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 128
Add --commit-plan-file option for plan file version control#7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Uh oh!
There was an error while loading. Please reload this page.
Closed
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
9cdc84d
Add --commit-plan-file option for plan file version control
SihaoLiu d977d3b
Add validation for plan file outside project with --commit-plan-file
SihaoLiu a05f080
Fix PROJECT_ROOT unbound variable and improve plan file modification …
SihaoLiu 8fc5d01
Update version bump rules for feature branches vs main branch
SihaoLiu 425b630
Fix plan file handling for all four cases (P1, P2, P3)
SihaoLiu a86bc04
Fix stop hook to follow Claude Code hooks spec
SihaoLiu 9bc8214
Simplify plan file handling code
SihaoLiu 9555c5c
Fix plan file handling edge cases (P1-P4)
SihaoLiu f112744
Move plan file validation to UserPromptSubmit hook
SihaoLiu 6d02655
Move pre-1.1.2 state file check to UserPromptSubmit hook
SihaoLiu 42009ed
Fix pre-1.1.2 loop handling and portable path resolution
SihaoLiu 34da7fa
Fix Python fallback injection, test signing, and README Case 4
SihaoLiu bc0fb24
Improve get_relative_path to handle paths outside base directory
SihaoLiu 6a18c15
Add pre-commit check to block git commit when plan file is staged
SihaoLiu 5dc3a6a
Fix --commit-plan-file validation for monorepo subdirectories
SihaoLiu 54147e1
Fix plan validator inside/outside repo check for monorepo subdirectories
SihaoLiu 1706bbd
Fix git status/diff path matching for monorepo subdirectories
SihaoLiu eb32366
Fix regex escaping for plan file paths with + character
SihaoLiu 00930e9
Add git ancestry check and prefixed state file termination
SihaoLiu 9c075fe
Fix git commands to use git-relative path in plan validator
SihaoLiu 4dd1ca2
Fix code review issues for monorepo and POSIX compatibility
SihaoLiu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On macOS (or any environment without GNU
realpath --relative-toand withoutgrealpath),get_relative_pathfalls back tobasenamewhen the target isn’t under the base directory. Downstream logic insetup-rlcr-loop.shandloop-plan-validator.shtreats “outside repo” asPLAN_FILE_RELstarting with../, so returning just the basename misclassifies an external plan file as inside the repo. That means the--commit-plan-fileoutside-repo conflict won’t trigger, and it can even incorrectly “match” a tracked file at the repo root with the same basename. This breaks the intended Case 3 behavior on macOS. Consider returning a true relative path (e.g., viapython -c 'os.path.relpath') or an absolute path and updating the inside/outside check accordingly.Useful? React with 👍 / 👎.