Repository navigation
fix(deps): two HIGH advisories were failing every PR's Gate 1 - #884
Merged
Merged
Conversation
`main`'s own Gate 1 went red between 2026-10-23T15:53 and the next run, and
every open PR reads as a failure with it. CI runs `pnpm audit` before the
five checks, so a new advisory hides lint, types, build, tests and css-lint
behind one line that has nothing to do with the change:
zod <4.6.6 GHSA-mrhx-c7xc-m3w5
undici <8.12.2 GHSA-xjj6-f33q-929c
Both bumps are inside the same minor line, so neither is a breaking change.
**The overrides live in two files, and only one of them is the one the docs
mention.** `package.json` carries them, and `pnpm-workspace.yaml` carries the
same list with the reasoning attached; pnpm 10 resolves from the workspace
file, so editing `package.json` alone changed zod (a direct dependency) and
left undici pinned at 8.10.2. The workspace comment already said to keep the
two in step; the failure mode was that `pnpm install` reported success either
way.
Both lockfiles regenerated (`pnpm-lock.yaml`, and `package-lock.json` through
`npm install --legacy-peer-deps --package-lock-only`, per AGENTS), and
`THIRD-PARTY-NOTICES.md` regenerated because a version bump changes the
attribution it records — the test that caught this was
`third-party-notices.test.ts`, which is the check working as intended.
`pnpm audit --audit-level high --ignore-registry-errors` now exits 0: 8
vulnerabilities remain, 2 low and 6 moderate, none high.
Gate 1: lint 0, tsc 0, build clean, 349 test files / 4872 tests, css-lint 0.
Member
Author
|
Maintainer merge audit — GitHub does not let the author approve the author's own PR, so this comment is the audit trail for the merge that follows. The maintainer authorised the bypass for this PR explicitly. Gates checked before merging
|
green-dalii
added a commit
that referenced
this pull request
Oct 25, 2026
…pies `ai` 7.0.136 -> 7.0.142, resolved on the current `main` rather than on dependabot's branch: #884 raised the `zod` and `undici` overrides and rewrote all three lockfiles, so the branch conflicted on `pnpm-lock.yaml`. The bump alone was not shippable, and the two reasons were both measured. One: it is a quarter of a megabyte of duplication. `ai` 7.0.142 asks for `@ai-sdk/provider-utils@5.0.61` while the pinned `@ai-sdk/anthropic`, `@ai-sdk/openai` and `@ai-sdk/openai-compatible` still resolve 5.0.49 and 5.0.58, so three copies of both `@ai-sdk/provider` and `@ai-sdk/provider-utils` were bundled: ai 7.0.136 main.js 5,290,267 copies: 5.0.49, 5.0.58 ai 7.0.142 main.js 5,397,236 copies: 5.0.49, 5.0.58, 5.0.61 (+104.5 KB) Two: it silently broke error normalization. Four tests in the Codex client suite failed with the provider's own message instead of the plugin's `status 403: ...` form. That reads like an upstream wording change and it was not. Probing the thrown object gave `CTOR=APICallError STATUS=403 isAPI=false` - the error IS an APICallError and carries the status, but the class came from a different copy than the one `ai` re-exports. `mapAiSdkError` keys off `instanceof`, so the whole normalization block stopped running: the status prefix, the `statusCode` and `responseBody` fields, and every other AI SDK error class it matches. A duplicate dependency is not only bytes. Collapsing both packages to the version `ai` asks for removes the cause of both: ai 7.0.142, copies collapsed main.js 5,170,949 (-116.5 KB, -2.26% vs main) copies: 5.0.61 / 4.0.28 That is 221 KB smaller than the bump without it, and smaller than `main` was before the bump. All four previously failing tests pass and `mapAiSdkError` matches `instanceof` again. The override goes in both places it has to: `package.json` for the npm-side lockfile and `pnpm-workspace.yaml` for pnpm 10, which resolves from the workspace file. #884 learned that the hard way - editing one of the two reports success while the other stays stale, and the lockfile's own `overrides:` block is the only place it shows. `THIRD-PARTY-NOTICES.md` drops from 16 bundled packages to 12. It is generated from the built bundle, so it needs a `pnpm build` first; running the generator without one silently rewrites the file with the previous versions. Two follow-ups, neither a regression against what lands here. #891 aligns all four packages so one copy is bundled by construction, and it waits on what the SDK's new `'interrupted'` finish reason means for the retry path. #892 replaces `instanceof` with the SDK's `isInstance`, which is the only version of this correct that survives a future dependency shuffle. Gate 1: lint 0, tsc 0, build clean, 349 files / 4872 tests, css-lint 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main's own Gate 1 went red between 2026-10-23T15:53 and the next run, and every open PR reads as a failure with it. CI runspnpm auditbefore the five checks, so a new advisory hides lint, types, build, tests and css-lint behind one line that has nothing to do with the change:zod<4.6.64.6.7undici<8.12.28.12.3Both are HIGH. Both bumps are inside the same minor line, so neither is a breaking change.
pnpm audit --audit-level high --ignore-registry-errorsnow exits 0; 8 vulnerabilities remain, 2 low and 6 moderate, none high.The failure mode worth recording: the overrides live in two files, and only one of them is the one you would think of first.
package.jsoncarries them, andpnpm-workspace.yamlcarries the same list with the reasoning attached. pnpm 10 resolves from the workspace file, so editingpackage.jsonalone updatedzod— a direct dependency, so it resolved either way — and leftundicipinned at 8.10.2.pnpm installreported success in both cases, and the lockfile's ownoverrides:block was the only place that showed the stale value. The workspace comment already said "keep this list in step withpackage.json'soverrides"; a comment is not a mechanism, so the next version bump will hit this again.Both lockfiles regenerated —
pnpm-lock.yaml, andpackage-lock.jsonvianpm install --legacy-peer-deps --package-lock-only, per AGENTS.md's note that pnpmoverridesare flat and npm cannot honour them.THIRD-PARTY-NOTICES.mdregenerated, because a version bump changes the attribution it records. The test that caught this wasthird-party-notices.test.ts— which is the check working: it failed with "zod@4.6.7 must have its own section" before the regeneration and passes after.Gate 1: lint 0, tsc 0, build clean, 349 test files / 4872 tests, css-lint 0.