Skip to content

refactor(ci-inference): use the shared lockfile names in lockfileFacts - #146

Merged
adityankale190895 merged 1 commit into
DiffCI:mainfrom
sarankumar1325:refactor/evidence-lockfile-names
Nov 16, 2026
Merged

adityankale190895 merged 1 commit into
DiffCI:mainfrom
sarankumar1325:refactor/evidence-lockfile-names

Conversation

@sarankumar1325

Copy link
Copy Markdown
Contributor

Part of #97 (the src/ci-inference/evidence.ts:65 copy from the follow-up list).

What changes

  • lockfileFacts in src/ci-inference/evidence.ts now loops over LOCKFILE_NAMES from src/repo/lockfiles.ts instead of its own hand-written list.
  • tests/ci-inference/lockfile-facts.test.ts gets a test that writes every name in LOCKFILE_NAMES into a temp directory and expects one fact per name, in list order. If a name is added to the shared list, this test covers it without a second edit.

One visible difference

The old list was in a different order (pnpm-lock.yaml, yarn.lock, package-lock.json, …). The facts now come out in LOCKFILE_NAMES order. This only matters when a repository commits more than one lockfile: pinnedDependencyBasis takes the first fact, so its detail text could name a different lockfile. pinned is true either way. If you'd rather keep the old order, I can sort by a priority list instead.

Validation

  • The new test fails on main (the order differs) and passes with the change.
  • npm run typecheck, npm test (1067 pass, 0 fail) and npm run audit:boundary pass.

lockfileFacts in evidence.ts spelled out the lockfile names in its own
list. Read LOCKFILE_NAMES from src/repo/lockfiles.ts instead, so the
list cannot drift from the other lockfile signals. A new test writes
every name in LOCKFILE_NAMES and expects a fact for each.

Part of DiffCI#97

Signed-off-by: sarankumar1325 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T07:54:51.876648Z 17e05d8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@adityankale190895
adityankale190895 merged commit bf7aba0 into DiffCI:main Nov 16, 2026
13 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.

2 participants