Skip to content

chore: consume published inventories, and stop exempting graphql - #1673

Merged
pyramation merged 1 commit into
mainfrom
feat/pnpm-policy-inventories
Aug 6, 2026
Merged

chore: consume published inventories, and stop exempting graphql#1673
pyramation merged 1 commit into
mainfrom
feat/pnpm-policy-inventories

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Switches this workspace to the two published inventories and closes an exemption that reached further than intended.

The problem

To exempt the graphile v5 stack from the release-age wait, this repo listed an upstream npm account under maintainers. That account also co-maintains graphql — the reference implementation — so pnpm-workspace.yaml on main carries:

minimumReleaseAgeExclude:
  - graphql

along with graphiql, monaco-graphql, graphql-language-service and the four @graphiql/* packages.

graphql has six maintainers. A compromise of any one of those accounts published a release this workspace installed immediately, with no wait — which is the exact scenario minimumReleaseAge exists to prevent, on one of the most depended-upon packages in the ecosystem.

maintainers is a delegation as wide as everything an account will ever publish. Fine for accounts we control; wrong for anyone who also maintains popular upstream software.

The change

inventory:
  - "@constructive-io/pnpm-policy/inventory.json"
  - "@constructive-io/pnpm-policy-graphile/inventory.json"

pnpm-policy merges them (constructive-io/dev-utils#116). The graphile one (constructive-io/dev-utils#117) enumerates 16 package names, derived from what the lockfiles actually resolve and filtered to packages published from Graphile-owned repositories — not from an account.

No npm account is named anywhere in this repo now.

What actually changed in the generated file

-# Exempt from the wait: 6 scope glob(s), 49 first-party package(s), 9 exception(s).
-# First-party membership comes from what <account>, <account> publish on npm...
+# Exempt from the wait: 6 scope glob(s), 41 first-party package(s), 9 exception(s).
+# First-party membership comes from the inventory.

-  - "@graphiql/plugin-doc-explorer"
-  - "@graphiql/plugin-history"
-  - "@graphiql/react"
-  - "@graphiql/toolkit"
-  - graphiql
-  - graphql
-  - graphql-language-service
-  - monaco-graphql

All 16 graphile packages remain exempt — grafast, grafserv, postgraphile, graphile-build, graphile-build-pg, graphile-config, graphile-utils, pg-sql2, pg-introspection, tamedevil, ruru, ruru-types, @dataplan/json, @dataplan/pg, @graphile/lru, @graphile-contrib/pg-many-to-many. Nothing about upgrading Graphile gets slower.

The eight above now wait two days like any other third-party dependency. We upgrade graphql rarely, so that costs nothing.

Deletes the local inventory

pnpm-policy.inventory.json (1041 lines) is gone. The list lived in two places, went stale independently of the published one, and had to be reviewed by hand. Both sources are pinned packages now, so a change to what skips the wait arrives as a version bump you can review rather than an edit to a thousand-line file in this repo.

policy:refresh goes with it — refreshing happens where the inventories are published.

Verification

pnpm-policy check      ✓ pnpm-workspace.yaml matches the policy
pnpm-policy generate   ✓ deterministic — second run byte-identical
exemption list         49 first-party names -> 41
graphile allowlist     16/16 present
forbidden names        none

Note on the lockfile

The 32-line lockfile diff is hand-spliced: the two new packages plus the pnpm-policy bump, with pnpm's own integrity hashes. Regenerating rewrote 10,283 lines and changed 59 resolutions — the committed lockfile was written by a different pnpm major, so any write re-resolves peer permutations. That churn does not belong in a policy PR. CI runs plain pnpm install, which will reconcile anything it needs to.

Pinned: @constructive-io/pnpm-policy@0.3.1, @constructive-io/pnpm-policy-graphile@0.2.0, pnpm-policy@^0.4.0.

Refs constructive-io/constructive-planning#1464

🤖 Generated with Claude Code

https://claude.ai/code/session_01CEswUi4ANuB58rva48aHge

This workspace listed an upstream npm account under `maintainers` to
exempt the graphile v5 stack. That account also co-maintains `graphql`,
so the exemption reached further than intended — `pnpm-workspace.yaml`
carried:

    minimumReleaseAgeExclude:
      - graphql

along with graphiql, monaco-graphql, graphql-language-service and the
four @graphiql/* packages. `graphql` has six maintainers, so a compromise
of any one of those accounts published a release this workspace installed
immediately, with no wait. `maintainers` is a delegation as wide as
everything an account will ever publish; that is fine for accounts we
control and wrong for anyone who also maintains popular upstream code.

Two published inventories replace it, merged by pnpm-policy:

    inventory:
      - "@constructive-io/pnpm-policy/inventory.json"
      - "@constructive-io/pnpm-policy-graphile/inventory.json"

The graphile one enumerates 16 package names, derived from what the
lockfiles resolve and filtered to packages published from Graphile-owned
repositories. All 16 are still exempt. The eight above are not, and now
wait like any other third-party dependency — we upgrade graphql rarely,
so the wait costs nothing.

Deletes the local 1041-line pnpm-policy.inventory.json. The list lived in
two places, went stale independently, and had to be reviewed by hand;
both sources are now pinned packages, so a change to what skips the wait
arrives as a version bump. Drops `policy:refresh` with it — refreshing
happens where the inventories are published.

No npm account is named anywhere in this repo now.

Verified: policy check matches, generate is byte-identical on a second
run, and the exemption list goes from 49 first-party names to 41 with all
16 graphile packages retained and none of the eight.
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​constructive-io/​pnpm-policy-graphile@​0.2.0671008889100
Added@​constructive-io/​pnpm-policy@​0.3.17610010093100
Addedpnpm-policy@​0.4.07610010091100

View full report

@pyramation
pyramation merged commit 14ea28b into main Aug 6, 2026
20 checks passed
@pyramation
pyramation deleted the feat/pnpm-policy-inventories branch August 6, 2026 10:02
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