fix: guard package lock version parity #45
No reviewers
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:ci
scope:cli
scope:docs
scope:manifests
scope:packaging
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/stoke#45
Loading…
Reference in a new issue
No description provided.
Delete branch "build/43-lockfile-version-guard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #43
Summary
Normalize both package-lock version fields to 1.4.0 and add a governance regression test that prevents either field from drifting from package.json.
Worklog
Acceptance criteria
package-lock.jsonroot and nested root-package versions read 1.4.0, with no other lockfile field changedtest/governance.test.jsasserts both lockfile fields equal the package manifest versionnpm testandnpm run check:governancepass at the PR headci / testis green at the final PR headVerification
package-lock.json version is stale(1.3.0 !== 1.4.0)npm install --package-lock-onlychanged exactly the two version fields; focused parity test passedpackage-lock.json version is stale; mandatednpm run check:governanceexited 0, confirming the escalated wiring gappackage-lock.json root package version is stale; mandatednpm run check:governanceexited 0, confirming the same gapnpm testpassed 130/130;npm run check:governancepassedpackage.json, lockfile root, and lockfile nested root package all 1.4.0git diff --check origin/main...HEAD: clean; three scoped files changed125bc04edea41375dfdcec342d413297d71a81d5; worktree cleanRound log
Round at
125bc04eRound passed with no written reply.
⟲ resuming from
125bc04ede📣 round answered at head
125bc04edeWIP: fix: guard package lock version parityto fix: guard package lock version parity🔎 reviewing head
125bc04edenpm cicleannpm install --package-lock-onlyis a no-op at this headnpm test130/130,npm run check:governanceexit 0package-lock.json version is stale; nested-only →package-lock.json root package version is stale; distinct messages, so both assertions are load-bearingci / testsuccess at this head (run 674).deb: control, shipped package.json, lockfile root and nested all 1.4.0Refs-only, changelog fragment conforms, scope cleanApprove — head
125bc04edea41375dfdcec342d413297d71a81d5Reviewed the whole PR at this head in a detached worktree (
npm ciclean, 3 files, +13/-2). Every acceptance criterion on #43 verified by running it, not by reading the worklog.Acceptance criteria
package-lock.jsonL3 and L9 read1.4.0, no other field touched — ✅git diff 21b91e8...125bc04 -- package-lock.jsonis exactly the twoversionfields; nolockfileVersion, no dependency resolution rode along. Independently,npm install --package-lock-onlyat this head reportsup to dateand leaves the worktree clean, so the lockfile is npm-canonical rather than hand-shaped.npm testandnpm run check:governancepass — ✅npm test130/130 pass (129 → 130, the one new test);npm run check:governance→4 identities resolved; 5 scope rows valid, exit 0.1.3.0):not ok 7 - package lock versions match the package manifest/package-lock.json version is stale/expected: '1.4.0'actual: '1.3.0';node --test test/governance.test.jsexit 1,npm testexit 1.packages[""].version→1.3.0, L3 left correct):package-lock.json root package version is stale, same expected/actual, exit 1.npm run check:governanceexited 0 under both, exactly as the amended task note (2026-08-31T20:20Z) predicts; the criterion asks that command to pass at the head, which it does, so that is not a gap.ci / testgreen at the head — ✅ commit status for125bc04issuccess:ci / test (pull_request)run 674,labels / labels (pull_request)run 675..debmanifests agree — ✅bash scripts/build-deb.sh→dist/stoke_1.4.0_all.deb;dpkg-deb -f … Version=1.4.0; afterdpkg-deb -x,/usr/lib/stoke/package.json=1.4.0,/usr/lib/stoke/package-lock.jsonroot =1.4.0, nestedpackages[""]=1.4.0, packagedsrc/cli.js --version=1.4.0. The metadata defect described in #43's consequence table is gone in the artifact, which is where the criterion places it.Doctrine and constraints
Refs #43, no closing keyword anywhere near the number — the body's only two mentions areRefs #43andClaim #43, so the post-merge shape #200/#218 guards against is respected.changelog.d/43.md: one-bullet, 100 chars, ends(#43).with nothing after — conforms to BUILDER.md's fragment rule and matches23.md/36.md.CHANGELOG.mduntouched.README.mdL1122 correctly left alone per decision 4. No workflow, no.ceremonypin, no action-token surface touched.path.joinconsts beside the existing ones,assert.equalwith an intent message, samerequirestyle.Non-blocking nit
The fragment reads
Keep package-lock metadata aligned…while its two neighbours use past tense (Added…,Enforced…). Cosmetic, published prose only; address it or don't.What I did not verify
1.3.0) — I measured the head, not the merge base. They are not acceptance criteria and criterion 1's diff makes the pre-state self-evident.lintianis not installed in this box, so the build script's package lint was skipped (it self-skips and says so);dpkg-deb,dpkgandfakerootwere present, so the build and extraction themselves are real, not simulated.npm ci && npm test && npm run check:governancesequence I ran matchesci.ymlL25 and reproduces green.🔎 reviewing head
125bc04ede125bc04ede.Approve — head
125bc04edea41375dfdcec342d413297d71a81d5Reviewed the whole PR at the current head against #43's acceptance criteria, the repo's load-bearing constraints, and the changed code.
Verified:
package-lock.jsonL3 (version) and L9 (packages[""].version) both read1.4.0, matchingpackage.json.git diff origin/main...HEADtouches only those twoversionfields inpackage-lock.json; no other lockfile field changed.git diff --checkis clean.test/governance.test.jsasserts parity on both fields with distinct failure messages (package-lock.json version is staleandpackage-lock.json root package version is stale), matching the red outputs recorded in the PR body for the root-only and nested-only mutations.changelog.d/43.mdis a single-bullet, 101 characters, ending with(#43).Refs #43with no closing keyword before any#43reference.ci / testgreen on this head.Could not verify locally:
npm test,npm run check:governance, andbash scripts/build-deb.sh. This box has nonode,npm, ordpkg-debinstalled, so I relied on the green CI run and code inspection for those criteria.No blocking issues. Approving.
🔎 reviewing head
125bc04edeApprove — head
125bc04edea41375dfdcec342d413297d71a81d5Reviewed the whole PR at this head in a detached throwaway worktree against #43's acceptance criteria, the repo's load-bearing constraints, and the code. The PR-side diff (true merge base
21b91e8, current main01b25ca) is exactly three files:package-lock.json,test/governance.test.js,changelog.d/43.md. The README rename visible in a naive base..head diff is main's own #44, not this PR.Acceptance criteria — each verified by running it
git diff 21b91e8..125bc04 -- package-lock.jsonis exactly the twoversionfields; nolockfileVersionor dependency-resolution delta.npm install --package-lock-onlyat this head leaves the worktree byte-identical, so the file is npm-canonical, not hand-shaped (decision 1).git diff --checkclean.npm testandnpm run check:governancepass —npm cithennpm test: 130/130 pass (129 baseline + the one new test);npm run check:governance:4 identities resolved; 5 scope rows valid, exit 0.release.ymlrunsnpm ci && npm test && bash scripts/build-deb.sh, so the guard also covers tagged releases with no new wiring, per decision 2.package-lock.json version is stale; nested-only (packages[""].version→ 1.3.9, L3 correct) exits 1 withpackage-lock.json root package version is stale. Distinct messages prove the second assertion is load-bearing; restored head re-runs green.ci / testgreen on the head — commit status for125bc04issuccessfor bothci / test (pull_request)andlabels / labels (pull_request)..debmanifests agree — builtdist/stoke_1.4.0_all.deb; controlVersion1.4.0; extracted/usr/lib/stoke/package.json, lockfile root, and lockfilepackages[""]all read 1.4.0; installedstoke --versionprints 1.4.0. #43's consequence table is resolved in the artifact, where the criterion places it.Doctrine and constraints
Refs #43with no closing keyword before any#Nmention (the only other mention isClaim #43); the post-merge shape is the issue's own instruction.changelog.d/43.md: one-bullet, 101 bytes, ends(#43).— conforms to the fragment rule and matches its siblings..ceremonypin, or action-token surface changed.assert.equalwith intent messages).Non-blocking nit (rides the approval)
The fragment opens
Keep…where its neighbours use past tense (Added…,Enforced…) — cosmetic, builder's discretion; same observation as claude's round.What I did not verify
lintianis absent on this box, so the build script self-skipped package lint;dpkg-debbuild and extraction themselves are real.npm ci && npm test && npm run check:governancereproducesci.ymlL25 green.