docs(review): correct lockfile-tamper.ts's module header to state its npm-only scope - #7039
Conversation
… npm-only scope The module header claimed the check scans "package-lock.json (or another *.lock file)", but isNpmLockfilePath only ever matches package-lock.json -- yarn.lock and pnpm-lock.yaml are never scanned, exactly as isNpmLockfilePath's own doc comment already states. Aligns the module header with that.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7039 +/- ##
=======================================
Coverage 93.74% 93.74%
=======================================
Files 692 692
Lines 68740 68740
Branches 18768 18768
=======================================
Hits 64443 64443
Misses 3302 3302
Partials 995 995
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-17 19:19:23 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Summary
src/review/lockfile-tamper.ts's module-level doc comment claimed the check scans "a changedpackage-lock.json(or another*.lockfile) diff" — butisNpmLockfilePath, the function that actually decides what gets scanned, matches onlybasename === "package-lock.json";yarn.lock,pnpm-lock.yaml, and any other*.lockfile are never scanned, exactly asisNpmLockfilePath's own accurate doc comment already states.isNpmLockfilePath's own correct comment. Doc-only change — no behavioral diff. Does not extend lockfile parsing to yarn/pnpm (explicitly out of scope per the issue).Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #6997
Validation
git diff --checknpm run actionlintnpm run typecheck— the whole-repotsc --noEmitreliably OOMs on this shared, memory-constrained sandbox regardless of what changed; this is a comment-only change with zero behavioral surface, sonpx vitest run test/unit/lockfile-tamper.test.ts(below) is sufficient local confidence, and CI's isolated runner performs the authoritativetsc --noEmit.npm run test:coverage—test/unit/lockfile-tamper.test.ts(28 tests, including the existingisNpmLockfilePathcoverage ofyarn.lock/pnpm-lock.yamlrejection the issue calls out as the acceptable no-op assertion) — 28/28 passing, unmodified.npm run test:workers/npm run build:mcp/npm run test:mcp-pack/npm run ui:openapi:check(not applicable — this is a single comment change in one backend module)npm audit --audit-level=moderate(no dependency changes)isNpmLockfilePathtest suite already exercises the exact behavior the corrected comment now accurately describes.)If any required check was skipped, explain why:
npm run typecheckOOMs on this sandbox under current memory pressure regardless of diff size, so it was not run standalone for a change with no type-surface at all; the existing, unmodified test suite plus CI's isolated runner cover the rest.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots. (N/A — no UI changes.)