Give every CommitLore surface one runtime identity - #644
Merged
Conversation
CommitLore surfaces shared a command name while selecting independent entrypoints and package roots, so an upgrade could leave hooks, plugins, MCP, and index readers on incompatible programs. Record and compare the full runtime identity and make doctor prescribe surface-specific convergence. Ruled-out: version-only comparison | equal version strings still allow different entrypoints and package roots Blast: system Undo: easy Certainty: firm Record-Id: r-runtime001 Provenance: authored Verified: npx tsc --noEmit; runtime-identity, doctor, hooks, init, index-db, installer-hosts, mcp, codex-plugin, and doctor-snapshot Vitest suites; linux/amd64 npm ci and npm run build; dist 280 files
…01-runtime-identity
Two shipped entrypoints under one package root are the same runtime. A warning on a correct installation stops the identity check being believed when it matters. This narrows the finding faithfully: it targets surfaces running different installs; two files inside one install are not different installs. Ruled-out: filename equality | two shipped entrypoints of one install are one runtime Blast: module Undo: easy Certainty: firm Record-Id: r-oneinstall001 Provenance: authored Verified: npx tsc --noEmit; npx vitest run test/init.test.ts; npx vitest run test/doctor.test.ts; npx vitest run test/runtime-identity.test.ts test/hooks.test.ts test/index-db.test.ts; npx vitest run test/doctor.test.ts test/init.test.ts; docker linux/amd64 npm ci, build, artifact:manifest; npm ci; npm run artifact:verify
…01-runtime-identity # Conflicts: # dist/commitlore.mjs # dist/mcp/server.js # dist/mcp/server.js.map # installer/canonical-artifact.json
Provenance: authored Record-Id: r-canonf001b Verified: docker linux/amd64 build and artifact:manifest; artifact:verify reports e9d85e41; 280 files in dist; 101 cases across doctor, init and runtime-identity
CommitLore — record lintTrailers: clean — 6 commits in Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR. |
This was referenced Aug 14, 2026
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.
Summary
Closes F-001 (P0). Addresses the convergence half of #633, #634 and #635.
Every execution surface answers to the name
commitlore, and nothing established that they were the same program. Measured on one machine:A shared runtime identity — version, entrypoint, package root, index schema — is now produced by one function, reported by each surface, and compared by
doctorin a single report.RED, verified independently against unmodified main
The delegated report offered a failing test run as its RED, but those failures were module-resolution errors: the tests could not load a file that does not exist on
mainyet. That proves nothing about the defect, so the RED was re-established by hand.On
main, a repository whose hook pin names an older install:cause unclear. The version mismatch is the cause, and the user is not told.On this branch, same repository, same state:
A false positive, found and removed
The first implementation compared entrypoint filenames, so it warned on a correct installation: one install ships both
dist/commitlore.mjsanddist/cli.js, and a hook recorded against one while the CLI runs from the other is the same install reached two ways.A check that fires on a healthy machine stops being believed, which would have cost more than the defect it reports. Convergence is now decided on the installation — package root, version, index schema — with the entrypoint kept in the report because it is what a person needs when the roots genuinely differ.
Verified by hand in both directions:
okwarn, naming both roots, with the fix lineScope
Runtime identity only. Capture asset readiness is F-002 (#641) and trust-grade equivalence across routes is F-003; neither is touched here. No daemon, no hosted service, no new database — the existing shared core, doctor registry and hooks carry it.
Test plan
runtime-identity,doctor,hooks,index-db: 123 casesdoctorandinittogether: 96 casesinit: 24 ·doctor: 72npx tsc --noEmitnpm run artifact:verifyThe pinned doctor check list and count moved 16 → 17 for the added check, which is what those assertions exist to make visible.