Repository navigation
fix: recognize bun.lock and npm-shrinkwrap.json in the git-diff lockfile signal - #64
Merged
adityankale190895 merged 2 commits intoOct 30, 2026
Merged
Conversation
…ile signal computeAnalysis's inline lockfile regex knew bun.lockb but not Bun's text lockfile bun.lock, and not npm's npm-shrinkwrap.json, so a change to either file alone still forced the full suite. The planner's three LOCKFILE copies (check-narrowing.ts, script-reads.ts, type-program.ts) already matched both. Share one LOCKFILE constant in src/repo/lockfiles.ts across the git-diff signal and the three planner copies, and add a git-diff analysis test case for each newly recognized name (issue DiffCI#47). Fixes DiffCI#47 Signed-off-by: bfs2021 <[email protected]>
Resolve the git-diff.ts import conflict with the Yarn Classic lockfile work (DiffCI#63), and switch its nested-lockfile check to the shared LOCKFILE pattern so no inline copy of the regex remains in git-diff.ts. Signed-off-by: adityankale190895 <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
|
Merged — thanks @bfs2021, and welcome as a DiffCI contributor! Fixing #47 and folding the four copies of the regex into one constant was exactly right. Heads-up: #63 landed first and conflicted with this PR in If you'd like another one, #48 (treat more package.json fields as data) is a good next issue. |
adityankale190895
added a commit
that referenced
this pull request
Oct 30, 2026
Bundles Core 0b82acb. verify no longer refuses a verdict when the run only writes new files (such as __pycache__ from a repository's own tests): those are listed as written during verification, while edits to existing files or a moved HEAD still block and are now named. Replaying 28 previously blocked DentalPresence commits on Cloudflare gave 0 blocked. Also includes Yarn Classic lockfile attribution (#63) and bun.lock / npm-shrinkwrap.json detection (#64). Records the Muse marketplace digest for the 0.3.19 package tree (pinned Muse 1.4.11-R6667.1, LF archive; the same method reproduces 0.3.18's). Also lists packages/diffci-cli/tests/client/verify-snapshot.test.ts in release-files.json: 0b82acb added it without an entry, so Core CI's boundary audit was failing on main. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: adityankale190895 <[email protected]>
Member
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.
Problem
computeAnalysisinsrc/git/git-diff.tsreports which changed files are lockfiles, and that signal is one of the reasons a replay falls back to the full suite. Its inline regex matchedpackage-lock.json,yarn.lock,pnpm-lock.yamlandbun.lockb, but not Bun's text lockfilebun.locknor npm'snpm-shrinkwrap.json— even though the planner's own lockfile checks (src/planner/check-narrowing.ts,src/repo/analyzer.ts) already treat both as lockfiles. A change to either file alone therefore still forced the full suite.Fixes #47
Root cause
Four copies of the lockfile regex had drifted apart. The planner carried three identical
LOCKFILEconstants (check-narrowing.ts:55,script-reads.ts:36,type-program.ts:28) matchingbun.lock(viabun\.lockb?) andnpm-shrinkwrap.json, whilegit-diff.tscomputed itslockfilesignalPath from a fourth, older inline copy that knew neither name.Fix
src/repo/lockfiles.tsexporting the singleLOCKFILEconstant (the planner form:package-lock.json,npm-shrinkwrap.json,pnpm-lock.yaml,yarn.lock,bun.lock/bun.lockb).src/git/git-diff.tsnow imports it instead of its inline regex, so the git-diff signal recognizes both names.release-files.jsonsonpm run audit:boundarystays green.No existing behavior narrows beyond the two names the issue asks for: the shared constant is exactly the union of the previous planner and git-diff regexes.
Testing
tests/git/git-diff.analysis.test.ts, one per newly recognized name; both fail againstmainand pass with the fix.npm run typecheck— passes.npm test— 524 pass; the 2 remaining failures are intests/cli-failure-baseline.test.ts(compareWithBaseline), which fail identically on unmodifiedmainatceaefd7and are unrelated to this change.npm run build— passes.npm run audit:boundary— passes (221 reviewed files, closed Core imports).