Skip to content

Ask the release gate which commitlore the plugin actually ran - #491

Merged
MongLong0214 merged 1 commit into
devfrom
plugin-resolution-notice
Aug 8, 2026
Merged

Ask the release gate which commitlore the plugin actually ran#491
MongLong0214 merged 1 commit into
devfrom
plugin-resolution-notice

Conversation

@MongLong0214

Copy link
Copy Markdown
Owner

Closes #483. Found running RELEASE-GATE.md §4 against a fresh clone during the 0.7.0 release.

The gate passed while resolving to the wrong build

node dist/commitlore.mjs --version                            → 0.7.0
CLAUDE_PLUGIN_ROOT=$PWD sh scripts/commitlore-run.sh --version → 0.6.0

Both exit 0. The check asked whether something resolved, not whether the right thing did — and it has passed that way for two releases.

The resolution order stays

commitlore-run.sh tries commitlore on PATH before CLAUDE_PLUGIN_ROOT, deliberately: the installer's wrapper execs node itself, so it works where this script would otherwise have to find node, and on the hook hot path a missing node means no context at all.

What changes is the gate. It narrows PATH and compares the version.

Two cases, both halves pinned

nothing shadows it entry point answers the repository's own version
a commitlore sits ahead on PATH entry point answers that one

The second is not a bug being enshrined. It is the documented order, asserted so that changing it becomes a decision someone makes rather than a side effect of an unrelated edit.

Why this option and not the other two

#483 recorded three. This is the smallest and the only one that does not touch the hot path.

  • Making the mismatch loud at runtime means running --version twice on every edit, to report a condition doctor's inject-version check already reports.
  • Preferring CLAUDE_PLUGIN_ROOT reopens how ADR-0011's ship-dist-in-the-repo interacts with the installer's wrapper — a decision, not a patch.

Stated limits

The gate catches it at release time and doctor catches it for a user, but nothing tells a user who has never run doctor.

The narrowed PATH includes the interpreter's directory, so a machine whose node lives beside a commitlore wrapper still shadows the plugin and the check would pass for the wrong reason.

The gate asked whether the plugin entry point resolved, and it passed for two
releases while resolving to the wrong thing. Found running it against a fresh
v0.7.0 clone on a machine carrying a 0.6.0 install: the clone answered 0.7.0
and the entry point answered 0.6.0, both exiting zero.

`commitlore-run.sh` tries `commitlore` on PATH before CLAUDE_PLUGIN_ROOT, and
that order is deliberate -- the installer's wrapper execs node itself, so it
works where this script would otherwise have to find node, and on the hook hot
path a missing node means no context at all. The order stays. What changes is
that the gate narrows PATH and compares the version, so it asks whether the
right thing resolved rather than whether something did.

Two cases pin both halves. The entry point reaches the plugin when nothing
shadows it, and a commitlore on PATH wins when one does. The second is not a
bug being enshrined: it is the documented order, asserted so that changing it
becomes a decision someone makes rather than a side effect of an unrelated
edit.

This is the smallest of the three options #483 recorded, and the only one that
does not touch the hot path. Making the mismatch loud at runtime would mean
running --version twice on every edit; preferring CLAUDE_PLUGIN_ROOT would
reopen ADR-0011's relationship with the installer, which is a decision rather
than a patch.

Limit: the gate now catches the mismatch at release time, and doctor's inject-version check catches it for a user, but nothing tells a user who has never run doctor
Ruled-out: preferring CLAUDE_PLUGIN_ROOT over PATH | it reopens how ADR-0011's ship-dist-in-the-repo interacts with the installer's wrapper, and the node-resolution advantage that motivated the current order would need re-examining rather than reversing
Ruled-out: comparing versions inside the run script | it sits on the hot path of every edit and would spend a second process launch there to report a condition doctor already reports
Warn: the narrowed PATH in the gate includes the interpreter's directory, so a machine whose node lives beside a commitlore wrapper still shadows the plugin and the check will pass for the wrong reason
Blast: local
Undo: easy
Certainty: firm
Verified: with PATH narrowed the entry point answers the repository's own version, and with a stub commitlore ahead of it on PATH it answers the stub -- both asserted, so the documented precedence cannot change silently
Provenance: authored
Record-Id: r-plugres483
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

CommitLore — record lint

Trailers: clean — 1 commit in origin/dev..7dab3e3376533712c8d9d806a656f84b98c8e4b7
Active constraints: 2 limits · 4 ruled-out · 3 warnings — from 3 records over 2 changed paths

Active constraints for the paths this PR touches

Limits (2)

  • r-plugres483 7dab3e3 — the gate now catches the mismatch at release time, and doctor's inject-version check catches it for a user, but nothing tells a user who has never run doctor
  • r-exit065 e545dee — any new command's exit codes must be drawn from SPEC §10, not invented locally

Ruled out (4)

  • r-plugres483 7dab3e3 — preferring CLAUDE_PLUGIN_ROOT over PATH | it reopens how ADR-0011's ship-dist-in-the-repo interacts with the installer's wrapper, and the node-resolution advantage that motivated the current order would need re-examining rather than reversing
  • r-plugres483 7dab3e3 — comparing versions inside the run script | it sits on the hot path of every edit and would spend a second process launch there to report a condition doctor already reports
  • r-exit065 e545dee — leaving guard's inversion in place and only documenting it | guard and inject are the two commands wired into hooks and CI, so a script written against guard today is already trusting the number; a documented inversion is still an inversion, and it gets load-bearing the longer it sits. The surface is one boolean per command right now — cheaper to fix once than to explain forever.
  • r-7a48c3 b85d847 — a CONFLICTED lifecycle state for divergent declarations | see above — it would block work on records that have a correct answer

Warnings (3)

  • r-plugres483 7dab3e3 (claim) — the narrowed PATH in the gate includes the interpreter's directory, so a machine whose node lives beside a commitlore wrapper still shadows the plugin and the check will pass for the wrong reason
  • r-exit065 e545dee (claim) — guard's swap is a breaking change for anything scripted against the old exit 2 for "matched" — see CHANGELOG Unreleased/Breaking
  • r-7a48c3 b85d847 (claim) — these two changes were developed concurrently in one worktree and share a built dist/. Splitting them would leave one commit whose dist/ did not match its src/, so they land together and are described together

git log --follow accepts exactly one pathspec, so renames are not followed for 2 paths; query one path at a time to follow its rename chain

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 ce5162a into dev Aug 8, 2026
8 checks passed
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