Skip to content

fix(ci): honor the base lockfile when installing the head's exact release - #334

Merged
BenSheridanEdwards merged 7 commits into
mainfrom
fix/lockfile-honest-exact-install
Jul 31, 2026
Merged

fix(ci): honor the base lockfile when installing the head's exact release#334
BenSheridanEdwards merged 7 commits into
mainfrom
fix/lockfile-honest-exact-install

Conversation

@BenSheridanEdwards

@BenSheridanEdwards BenSheridanEdwards commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Why does this feature exist?

Cold npm base captures installed the head's exact StyleProof release inside the adopter checkout with lockfile resolution disabled. That second install could re-resolve unrelated ranged application dependencies on the base side only, producing real rendered differences that the pull request did not cause. The fix must preserve the dependency tree created by the base commit's frozen install.

What changed?

  • Install the exact npm StyleProof runtime under the ephemeral CI session directory, then link only that package into the cold base worktree.
  • Keep the adopter's application dependencies exactly as produced by npm ci; other package-manager paths remain unchanged.
  • Add a CLI-level regression that simulates a ranged rendering dependency and requires base and head captures to observe the same locked version.
  • Update the README and changelog for the corrected cold-capture contract.
  • Refresh brace-expansion to the non-vulnerable lockfile release required by the Node 22 audit gate.
  • Bound the deterministic demo's font wait externally so Chromium cannot deadlock the map-store dogfood capture.
  • Prepare patch release 4.7.1; the merge-to-main release workflow will publish and tag it.

Behavioural Proof (with video and screenshots)

  • Video: Not applicable — this changes CLI dependency isolation and CI capture reliability, not a rendered product interface.
  • Screenshots: Not applicable — generated or self-attested images would not prove package-resolution behaviour.
  • Behaviour tests:
Before: base rendering dependency = range-resolved; head = locked
After:  base rendering dependency = locked;         head = locked

styleproof-ci tests: 27 passed, 0 failed
repository tests:    631 passed, 0 failed
map-store demo:      5 passed, 0 failed
browser E2E:         116 passed, 0 failed
dependency audit:    0 vulnerabilities

Verification Summary

  • Definition of Done: followed .agents/project/DEFINITION_OF_DONE.md.
  • Commands run:
    • npm run build && npm run typecheck && npm run lint && npm run format:check
    • npm run privacy:check
    • npm test
    • npm run test:e2e
    • STYLEMAP_DIR=<temporary-directory> npx playwright test --config example/store-dogfood.playwright.config.ts --workers=2
    • npm audit --audit-level=high
    • npm pack --dry-run --json
  • Results: all commands above pass; package contains the expected build output.
  • Known risks or skipped checks: none. Hosted exact-head checks remain the merge gate.

Checklist

  • Proof above — pasted the command/test output that demonstrates the change
  • Capture/diff/report rendering is unchanged; demo report regeneration is not applicable
  • npm run build && npm run typecheck && npm run lint && npm run format:check pass
  • npm test and all 116 browser E2E tests pass
  • Added/updated tests for the change
  • Updated the README / CHANGELOG for changed behaviour
  • Captured output format is unchanged; adopters do not need to regenerate baselines
  • Followed .agents/project/DEFINITION_OF_DONE.md and .agents/skills/pr-inline-screenshot-proof/SKILL.md
  • Screenshots are not applicable for a package-resolution and CLI orchestration change
  • The PR body has no bare screenshot links, local paths, relative paths, or proof placeholders

…ease

The npm plan's exact-release install passed --package-lock=false, which
makes npm ignore the lockfile for the WHOLE tree reconciliation — not just
the requested package. Every ranged dependency in the base commit's
package.json re-resolved to its newest satisfying release, on the base
side only. Any package that changed its rendered output between the locked
release and the newest one then reds the visual diff with phantom changes
no PR made — observed in the wild as icon-glyph `path d` diffs across a
consumer's shared chrome on a PR that touched no UI code at all.

Reproduced directly: a fixture with a dependency ranged ^1.21.0 and locked
at 1.21.0, after `npm ci` then `npm install --no-save --package-lock=false
<other-pkg>`, ends with 1.28.0 installed. With --package-lock=false
dropped, the same sequence leaves the locked 1.21.0 in place, installs the
requested package, and leaves package.json and package-lock.json
byte-identical.

The flag existed to guarantee the capture tree stayed clean. That guarantee
now comes the same way the other package managers get it: package.json and
package-lock.json join packageMetadataFiles, so the driver restores them
after the exact install if npm ever writes them.
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

🗺️ StyleProof report

📊 View the side-by-side visual report →


Coverage, determinism, or report/diff consistency evidence is incomplete — repair the capture or reflow source; visual approval cannot clear this failure.

@BenSheridanEdwards
BenSheridanEdwards merged commit 71d236f into main Jul 31, 2026
12 of 13 checks passed
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