Ask the release gate which commitlore the plugin actually ran - #491
Merged
Conversation
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
CommitLore — record lintTrailers: clean — 1 commit in Active constraints for the paths this PR touchesLimits (2)
Ruled out (4)
Warnings (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.
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
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.shtriescommitloreon PATH beforeCLAUDE_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
commitloresits ahead on PATHThe 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.
--versiontwice on every edit, to report a conditiondoctor'sinject-versioncheck already reports.CLAUDE_PLUGIN_ROOTreopens 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
doctorcatches it for a user, but nothing tells a user who has never rundoctor.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.