Skip to content

ci: fail when the standalone backend lockfile drifts from apps/backend/package.json - #143

Merged
EraPartner merged 1 commit into
mainfrom
claude/project-thread-ghv94e
Oct 28, 2026
Merged

EraPartner merged 1 commit into
mainfrom
claude/project-thread-ghv94e

Conversation

@EraPartner

@EraPartner EraPartner commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Why

apps/desktop/scripts/stage-backend.mjs runs npm ci against the standalone apps/backend/package-lock.json. Dependabot version updates only touch the root lockfile. So a backend bump leaves the standalone file behind, and the desktop build's npm ci then refuses it. Examples: #135 left undici at ^8.5.0 vs ^8.12.3, and before #140 it was zod.

Decision

The owner picked this option on a decision card. The card stated it adds one step to an existing job. The alternatives were generating the lockfile at build time (loses pinning) and leaving things as they are.

  • Offline check: it compares the declared specs in apps/backend/package.json with packages[""] in the standalone lockfile. No network, no install.
  • It runs as one more step in the existing Verify Generated Artifacts job. No new CI job.
  • It detects drift only. On failure it prints how to regenerate the lockfile.

CI time added

The CI log for run 40654622578, job Verify Generated Artifacts, shows the step taking about 0.04 s: it starts at 08:08:40.709 and prints its result at 08:08:40.744. Total job time is unchanged at 39 s.

Changes

  • scripts/verify-backend-lockfile.mjs (new)
  • package.json: verify:backend-lockfile script
  • .github/workflows/ci.yml: one step in Verify Generated Artifacts
  • docs/guides/running-the-desktop-app.md, CHANGELOG.md: notes

Verification

🤖 Generated with Claude Code

https://claude.ai/code/session_018QJtaLhrRDgpPKoydMiPCx

…d/package.json

Dependabot only updates the root lockfile, so backend bumps (e.g. #135, undici)
left apps/backend/package-lock.json stale and the desktop bundle's npm ci would
refuse it. Adds an offline spec comparison as a step in the existing
Verify Generated Artifacts job (no new job).
@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 84.8% 1674 / 1974
🔵 Statements 82.39% 1825 / 2215
🔵 Functions 76.68% 467 / 609
🔵 Branches 71.65% 1476 / 2060
File CoverageNo changed files found.
Generated in workflow #370 for commit d663136 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown

Coverage Report for backend

Status Category Percentage Covered / Total
🟢 Lines 92.32% (🎯 80%) 2573 / 2787
🟢 Statements 89.15% (🎯 80%) 2819 / 3162
🟢 Functions 86.13% (🎯 80%) 559 / 649
🟢 Branches 76.7% (🎯 72%) 1824 / 2378
File CoverageNo changed files found.
Generated in workflow #370 for commit d663136 by the Vitest Coverage Report Action

@EraPartner
EraPartner marked this pull request as ready for review October 28, 2026 08:11
@EraPartner
EraPartner merged commit 6cc7f43 into main Oct 28, 2026
18 checks passed
@EraPartner
EraPartner deleted the claude/project-thread-ghv94e branch October 28, 2026 08:11
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