chore: resync package-lock.json root metadata to @lannguyensi/codebase-oracle@0.6.1#39
Merged
Merged
Conversation
…e-oracle@0.6.1 After PR #37 (scope rename) and PR #38 (0.6.1 hotfix) the lockfile root metadata (both top-level "name"/"version" and packages[""].name/version) still pointed at codebase-oracle@0.5.0. The published npm tarball was fine because `npm publish` reads package.json, but `npm ci` results, sbom generators, and IDE tooling that key off the lockfile root saw the stale name/version. In-place edit of the four metadata fields rather than `rm package-lock.json && npm install` so caret-ranged deps do not float against current npm state. lockfileVersion 3 carries no integrity/_id/workspaces fields on the root entry, so the rest of the lockfile is unaffected. `npm ci` succeeds (0 vulns), better-sqlite3 + sqlite-vec native deps load cleanly, tsc clean, vitest 172/172. Future drift is loud: a package.json version bump without a matching lockfile bump fails `npm ci` before the publish workflow's tag-version guard runs. Closes agent-tasks 62b8739a-ddc4-4ad8-a30f-def9888d7c31.
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.
Why
After PR #37 (scope rename) and PR #38 (0.6.1 hotfix),
package-lock.jsonroot metadata was never re-generated. Both the top-levelname/versionand thepackages[""]entry still pointed at the unscopedcodebase-oracle@0.5.0.npm publishwas unaffected (it readspackage.json), but tooling that keys off the lockfile root (sbom generators, audit reports, CI cache keys, IDEs) saw stale values, and anyone runningnpm installafter agit pullwould have produced an uncorrelated diff on the next PR.What
In-place edit of the four root metadata fields:
That is the entire diff: 1 file, +4/-4. No dep version churn.
Why in-place edit instead of
rm && npm installThe lockfile was last written 2026-05-11. Caret-ranged direct deps (
@langchain/*,commander, etc.) could float to current registry state on a fresh install, producing an unrelated cascade. The four root metadata fields are pure name/version copies from package.json: per npm v3 lockfile docs, the rootpackages[""]entry carries nointegrity,_id,_from,_resolved, orworkspacesfield, so editing them in place is equivalent to a fresh regenerate without the caret-float risk.Smoke (local)
Future drift is loud
The
npm-publishworkflow runsnpm ci(line 59) BEFORE the tag-version guard (line 61). A futurepackage.jsonversion bump without a matching lockfile bump failsnpm ciwith "Invalid: lock file's @lannguyensi/codebase-oracle@X.Y.Z does not satisfy ...", so the drift cannot silently slip into a release.Out of scope (potential follow-up)
The reviewer flagged: no PR-time CI check for lockfile-vs-package.json sync. Drift currently surfaces at release time, not at the PR that introduces it. Worth a separate task if we want a tighter loop.
Review
Internal review subagent (general-purpose): LGTM. Confirmed lockfile v3 root entry has no integrity/_id/workspaces fields; npm ci is the dispositive validator.