Skip to content

Monorepo Integrity is red on main: pnpm lockfile has duplicate dependencies #490

Closed

Description

@thinkclay

integrity.yaml fails at Check for duplicate dependencies in lock file, listing a large set of duplicated resolutions (webpack, terser-webpack-plugin, [email protected] vs 3.0.0, webpack-dev-middleware@6 vs @7, semver, ws, and more). The job ends with:

Run pnpm dedupe to apply the changes above.
##[error]Process completed with exit code 1.

This blocks a green check on every PR — confirmed on #460, which touches no dependency files at all.

Aggravated by the volume of Dependabot merges landing today now that Actions actually run in the Scaffald org. main's own integrity runs are mostly cancelled because the concurrency group supersedes them as each Dependabot PR merges, so there is currently no green baseline.

Acceptance: pnpm dedupe committed, integrity green on main, and a fresh PR shows the check passing.

Activity

  1. added
    bug
    agent-ready
    on Jul 30, 2026
  2. thinkclay commented on Sep 1, 2026

    @thinkclay
    ContributorAuthor

    #692 clears the current backlog: pnpm dedupe there removes 23 duplicate packages (most of the [email protected] tree, plus fs-extra, hasown, image-size, pg-protocol, queue) and takes pnpm dedupe --check from exit 1 to exit 0.

    That fixes the instance but not the reason it keeps coming back. The job is gated on deps == 'true':

    # .github/workflows/ci.yml
    name: Monorepo integrity
    needs: gate
    if: needs.gate.outputs.deps == 'true'

    So a dependency PR is the only thing that ever runs it. main is never tested against pnpm dedupe --check, duplicates accumulate silently between dependency waves, and the debt then surfaces as a red check on whichever dependabot PR happens to arrive next — which reads as "this bump broke something" when it did not. That misattribution is what made this look like dependabot's problem in the first place.

    Worth deciding separately whether the gate should stay: running dedupe --check unconditionally on main costs about a minute and would catch the drift at the commit that introduced it.

  3. thinkclay commented on Sep 2, 2026

    @thinkclay
    ContributorAuthor

    Resolved. Monorepo integrity is green on main at 17fb3bd91, and has been for the three most recent runs.

    Three things had to land, because each fix exposed the next:

    One decision left deliberately open rather than folded in here: pnpm dedupe --check still runs only when the paths filter sets deps == 'true'. That gating is why this went unnoticed for so long — a lockfile can drift via any PR that touches dependencies indirectly. Whether it should run unconditionally on main is worth its own call; say the word and I'll open it separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readybugpriority: medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions