Skip to content

chore(ci): add lockfile + dependency guardrails#11

Merged
hoangsnowy merged 1 commit into
mainfrom
chore/dep-guardrails
May 18, 2026
Merged

chore(ci): add lockfile + dependency guardrails#11
hoangsnowy merged 1 commit into
mainfrom
chore/dep-guardrails

Conversation

@hoangsnowy
Copy link
Copy Markdown
Owner

Summary

Prevent the v0.3.0v0.3.2 release-tag ghosts from recurring with three layered checks:

  • lockfile-check CI job — re-resolves the lockfile from package.json under the CI-pinned npm@11.6.2 and fails any PR where git diff package-lock.json is non-empty. Also runs npm ci --ignore-scripts --dry-run to catch missing-from-lock errors before the release pipeline ever sees them.
  • Husky pre-commit hook — rejects local commits that stage package.json without also staging package-lock.json.
  • CODEOWNERS — adds /package.json, /package-lock.json, /.nvmrc so any PR touching dep metadata routes through review.

Documentation:

  • CONTRIBUTING.md: new "Dependency changes" section explaining the new gates and the npm version pin.
  • New RELEASE.md: pre-flight checklist, cut-the-release steps, workflow-watching tips, and a post-mortem table of the v0.3.0–v0.3.3 saga so the next person reading it can skip the same mistakes.

Test plan

  • lockfile-check job passes on this PR (lockfile already in sync from v0.3.3).
  • Manually verify pre-commit hook rejects a package.json-only stage locally.
  • Existing matrix test job still passes on both ubuntu + windows.
  • CodeQL + SBOM scan unchanged.

🤖 Generated with Claude Code

Prevent the v0.3.0–v0.3.2 release-tag ghosts from recurring with three
layered checks:

- New `lockfile-check` job in ci.yml: re-resolves the lockfile from
  package.json under the CI-pinned npm@11.6.2 and fails any PR where
  `git diff package-lock.json` is non-empty. Also runs
  `npm ci --ignore-scripts --dry-run` to catch missing-from-lock errors
  before the release pipeline ever sees them.
- Husky pre-commit hook rejects local commits that stage package.json
  without also staging package-lock.json.
- CODEOWNERS adds /package.json, /package-lock.json, /.nvmrc so any PR
  touching dep metadata routes through review.

Documentation:

- CONTRIBUTING.md: new "Dependency changes" section.
- New RELEASE.md: pre-flight checklist, cut-the-release steps,
  workflow-watching tips, and a post-mortem table of the v0.3.0–v0.3.3
  saga so the next person reading it can skip the same mistakes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hoangsnowy hoangsnowy merged commit 3e6bc54 into main May 18, 2026
6 checks passed
@hoangsnowy hoangsnowy deleted the chore/dep-guardrails branch May 18, 2026 00:45
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