Skip to content

Dependency-scan fallback: per-run npm cache; lockfile-only fix recipe and CI-claim rule for audit PRs - #2121

Merged
remigiusz-antczak merged 1 commit into
mainfrom
land/wave-1029av
Oct 29, 2026
Merged

remigiusz-antczak merged 1 commit into
mainfrom
land/wave-1029av

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Summary

  • review_checks.sh dependency-scan fallback: when npm_config_cache is unset, the npm audit now runs with it pointed at a per-run directory inside the audit temp dir. A stub npm that fails EPERM-style when the cache is unset or is ~/.npm now yields a real scan result instead of a not-checked row; an exported value is left alone. pnpm keeps its own cache-dir, so this covers npm only (not verified for pnpm).
  • references/full-audit.md: lockfile-only dependency fix recipe (npm audit fix --package-lock-only --ignore-scripts, then npm install <pkg>@<range> --package-lock-only --ignore-scripts for advisories needing a range bump, then re-run npm audit --package-lock-only; no node_modules written).
  • references/full-audit.md: PR-body rule. Claim "CI will run X" only if a workflow in the repo runs X; otherwise ask reviewers to run the exact test command before merge. Pinned by new eval audit-pr-body-ci-claim.
  • Size budget row for full-audit.md raised 7635 to 8092 (marker in the commit message and the changelog fragment).

Verification

  • bash scripts/test-review-checks-dep-fallback.sh: 19/19 (two new cases: stub npm fails EPERM-style unless npm_config_cache is set and is not ~/.npm, and the JSON carries the npm finding with no not-checked row; an exported value is preserved).
  • bash scripts/test-changelog-fragments.sh: 23/23.
  • python3 scripts/skill_index.py --check: ok.
  • bash scripts/ci-gates.sh size-ratchet --base origin/main --config scripts/size-budgets.tsv .: ok.
  • bash scripts/ci-gates.sh size --config scripts/size-budgets.tsv . and fragments: ok.
  • bash -n on review_checks.sh: ok; evals.json parses.

🤖 Generated with Claude Code

… fix recipe and PR-body CI-claim rule

The npm/pnpm audit fallback failed with EPERM when ~/.npm held root-owned
files. It now sets npm_config_cache to a per-run temp dir when unset (an
exported value wins). full-audit.md gains a lockfile-only dependency fix
recipe and a rule to claim "CI will run X" only when a workflow runs X.
New eval audit-pr-body-ci-claim; two new cases in the dep-fallback test.

size-budget-raise: .claude/skills/deep-code-review/references/full-audit.md 7635→8092 lockfile-only fix recipe and PR-body CI-claim rule

Tests: 19/19 dep-fallback, 23/23 changelog fragments

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@remigiusz-antczak
remigiusz-antczak merged commit dde0d5f into main Oct 29, 2026
8 checks passed
@remigiusz-antczak
remigiusz-antczak deleted the land/wave-1029av branch October 29, 2026 06:40
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.

1 participant