Skip to content

Pin T-1001's pending-directory path resolution to git rev-parse --git-path - #218

Merged
MongLong0214 merged 1 commit into
devfrom
docs-fix-pending-path
Jul 30, 2026
Merged

Pin T-1001's pending-directory path resolution to git rev-parse --git-path#218
MongLong0214 merged 1 commit into
devfrom
docs-fix-pending-path

Conversation

@MongLong0214

Copy link
Copy Markdown
Owner

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 .git is a file, not a directory — naive path.join(cwd, '.git', ...) breaks there.

This codebase already has the fix as an established, working pattern: src/core/index-db.ts:325 ("--git-path is what makes this correct") and src/hooks/prepare-commit-msg.ts:27,75 both use git rev-parse --git-path already. The ticket for the new transaction store just never pointed at it.

npx tsc -p tsconfig.json --noEmit exits 0.

…-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
@github-actions

Copy link
Copy Markdown

CommitLore — record lint

Trailers: clean — 1 commit in origin/dev..233a891a87a4389b3aea8c9408f4f68c26126586
Active constraints: 1 limits · 3 ruled-out · 0 warnings — from 2 records over 1 changed path

Limits (1)

  • r-gateaacc 45a8f2b — nothing enforces the src/mcp/server.ts merge-sequencing rule automatically — it is a process constraint the next PR author has to read and follow

Ruled out (3)

  • r-pendpath 233a891 — 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
  • r-gateaacc 45a8f2b — rewriting ADR-0020/0021/0022 or the existing T-1001 · Pending transaction store #193-213 issue bodies | they already meet or exceed the source review's own requirements (exact ownership, forbidden scope, RED/GREEN, AC-to-test, four-tier verification, evidence invalidation, stop conditions); rewriting working documents to match a stale review would be pure churn
  • r-gateaacc 45a8f2b — inventing content for a hypothetical P0-7 original definition | none exists in history (verified); asserting one would be the exact failure this document exists to prevent

Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR.

@MongLong0214
MongLong0214 merged commit a10679c into dev Jul 30, 2026
8 checks passed
@MongLong0214
MongLong0214 deleted the docs-fix-pending-path branch July 30, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant