Pin T-1001's pending-directory path resolution to git rev-parse --git-path - #218
Merged
Conversation
…-path T-1001 never specified how src/core/pending.ts resolves .git/commitlore/pending/, and ADR-0021 claims that directory "is per-worktree and per-clone" as a property of the design. That property only holds if the path is resolved correctly. A linked worktree's .git is a file containing a gitdir pointer, not a directory; path.join(cwd, '.git', 'commitlore', 'pending') resolves against the wrong location there. This codebase already has the fix as an established pattern -- src/core/index-db.ts:325 states outright "--git-path is what makes this correct", and src/hooks/prepare-commit-msg.ts uses git rev-parse --git-path twice already. The ticket for the new transaction store simply never pointed at that precedent. Ruled-out: leaving this to the implementer's judgment | the precedent already exists in this codebase and the failure mode (silently wrong location in a worktree) would not surface as a test failure unless someone specifically writes a worktree test -- worth pinning explicitly rather than hoping it's noticed Blast: local Undo: easy Certainty: firm Record-Id: r-pendpath
CommitLore — record lintTrailers: clean — 1 commit in Limits (1)
Ruled out (3)
Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR. |
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.
ADR-0021 claims
.git/commitlore/pending/is "per-worktree and per-clone", but T-1001 never specified how the path is resolved. A linked worktree's.gitis a file, not a directory — naivepath.join(cwd, '.git', ...)breaks there.This codebase already has the fix as an established, working pattern:
src/core/index-db.ts:325("--git-pathis what makes this correct") andsrc/hooks/prepare-commit-msg.ts:27,75both usegit rev-parse --git-pathalready. The ticket for the new transaction store just never pointed at it.npx tsc -p tsconfig.json --noEmitexits 0.