Repository navigation
fix(deps): move zod to ^4.6.6 and clear the lockfile's high and critical advisories - #25657
Conversation
…cal advisories zod 4.6.5 and earlier are open to GHSA-mrhx-c7xc-m3w5, and because 4.6.6 changed zod's v4/core declarations a consumer cannot take the fix while this workspace resolves an older zod. Every manifest that declares zod now asks for ^4.6.6, and the workspace resolves one copy, 4.6.7, the version the pinned objectui console already bundles. The rest of what `pnpm audit` matched on main moves to its patched line: next 16.4.1 in apps/docs, postal-mime ^4.0.8 in service-mailbox, nodemailer ^10.1.4 in plugin-email, target-only lifts of the undici, dompurify, fast-uri and ip-address overrides, and new body-parser and happy-dom floors. happy-dom was only vitest's auto-installed optional peer and no longer resolves at all. One advisory stays: @azure/msal-node GHSA-xcx6-jx8p-x3h5 under tedious > @azure/identity. Its fix is msal-node 7.1.0 and no @azure/identity release admits it, so it is reported rather than forced. The lockfile is regenerated by pnpm. The spec's generated artifacts are unchanged under zod 4.6.7 (check:generated, 14 of 14 current). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016n6CWTNgTQKqAHM3ga7ZRt
📓 Docs Drift Check
What this run could not see
Coarse fallback — 163 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
|
ACCEPT ·
Generated by Claude Code |
…ssions groups, at an objectstack pin that declares them (objectui#13478) (#13485) <!-- claude-projects-attribution: {"github_login":"os-elon-musk"} --> _Requested by **Elon** · [project thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DSu9uoz6bLHskQmxnyBE86T)_ Fixes #13478 Clause-②: yes Metadata-protocol: none objectstack's `Console Pin Gate` is red on main because app-shell no longer type-checks against objectstack `47af3dde42` (#25701). That change added the `positions` and `permissions` groups to the per-app `TranslationDataSchema`, and `TranslationPreview`'s `CATEGORY_DEFS` is exhaustive over that schema's shape by `satisfies`. This PR adds the two rows and moves objectui's own pin to `47af3dde42`, so objectui type-checks against the same spec. Once it merges, objectstack can move its `.objectui-sha` past the merge commit (objectstack's own card names this one as its blocker). ## What changed - **`TranslationPreview.tsx`**: two `CATEGORY_DEFS` rows, in the schema's order (after `flows`, before `metadataForms`): `positions` with `Users` and `permissions` with `ShieldCheck`, the icons `PositionPreview` and `PermissionPreview` already draw. Both are nested groups (`flat: false`), so each card counts the group's top-level keys and samples them with their inner key count, as `objects` and `flows` do. - **`metadata-admin/i18n.ts`** (the designer table, the only pack these keys live in, `en` and `zh`): `engine.translationPreview.category.positions` = "Positions" / "岗位" and `engine.translationPreview.category.permissions` = "Permission Sets" / "权限集", the words the same table already uses for the two metadata types. - **Tests**: `TranslationPreview.categories-11765.test.tsx` gets a spec-valid fixture for each new group (its first case requires one per schema group). `adminPreviews.i18n-10862-s2.test.tsx` lists the two headings among the rendered locale sites and reads coverage over 13 groups (`2/13 (15%)`, was `2/11 (18%)`). - **Changeset** `.changeset/13478-translation-preview-positions-permissions.md`: `@object-ui/app-shell` patch. ## The pin - `.objectstack-sha` moves from `e649c2d91e` (the 18.1.0 release commit) to `47af3dde42bb4e77fd92025605b89b4a473295a4`. REST compare `e649c2d91e...47af3dd`: `status: ahead`, `ahead_by: 51`, `behind_by: 0`; the bump script also reported "(on origin/main)". It is pinned at the card's floor, not at objectstack main's head: the four commits after it on objectstack main are left for the next bump. - Path: `scripts/bump-objectstack.sh 47af3dd --no-commit` (built and packed the 7 packages), then `pnpm install`. - What moved besides the sha: three packed manifests in `.objectstack-pin/` (`core`, `lint`, `spec`), each only `zod` `^4.6.5` to `^4.6.6` (#25657). The lockfile already resolves `zod@4.6.7`, so **`pnpm-lock.yaml` is unchanged** and `pnpm install --frozen-lockfile` exits 0. - **Why the rows and the pin land together** (the seat's hypothesis; it held). At `e649c2d91e` the schema declares neither group: `grep -c '^ positions: z.record'` over that commit's `packages/spec/src/system/translation.zod.ts` reads 0, and 1 at `47af3dde42`; the same for `permissions`. Under `satisfies`, an extra key in an object literal is TS2353 "Object literal may only specify known properties" (probed with this repo's tsc 6.0.3 on a two-key `Record`). So the rows alone fail at the old pin, and the pin alone fails as the gate does. ## Clause-② reading (the claim asked for it) The claim declares `yes` because the seat could not tell whether `metadata-admin/i18n.ts` reaches app-shell's published entry, and the two lines above are copied from the claim. Measured on the built declaration closure (`packages/app-shell/dist`, walking the relative imports from `index.d.ts`, the only `exports` entry with types): - The closure holds 182 `.d.ts` files. `views/metadata-admin/i18n.d.ts` **is** one of them (the positive control), but its face is `t(key: string, …)`, `tFormat(key: string, …)` and the other helpers: the key table is not exported, and no key is a type. - Closure files that carry the string `translationPreview`: **0**. `previews/TranslationPreview.d.ts` is not in the closure at all. So the diff widens no published accept set and no public face of app-shell, and the reading is `no`. The declaration is the seat's, so the lines stay as claimed. ## Verification (local, this worktree, at the new pin) - `pnpm exec turbo run build --filter=@object-ui/console... --concurrency=2` (under the verify lock, 6144 MB heap): 35 of 35 tasks, including `@object-ui/app-shell`'s `tsc` and the console's vite build, SDUI manifest and plugin tsc. That is the build the Console Pin Gate runs, here at objectui's own pin. - `pnpm exec vitest run packages/app-shell/src/views/metadata-admin/ packages/types/` (under the lock): 980 files passed; 17091 tests passed, 1 skipped. - The three TranslationPreview test files: 63 of 63. Reverse check: with the two rows removed from `TranslationPreview.tsx` (on-disk count 0, back to 2 after the restore), the `categories-11765` file goes red on its order-and-coverage case and on every per-group case, the two new groups included. - Gates, each exit 0: `check:i18n-keys`, `check:i18n-designer-parity`, `check:i18n-dead-keys`, `check:i18n-drift`, `check:installed-pin-claims`, `check:spec-symbols`, `check:icon-record-names`, `check:control-bytes`, `check:new-line-citations` (0 new), `check-changeset-presence`, `check-changeset-no-major`, and `eslint` on the four changed source files. - `check:spec-floors`: exit 1 with the same two `floor-too-low` findings (`@object-ui/auth` `MEMBERSHIP_ROLE_EXTERNAL`, `@object-ui/types` `navItemVisibleDataNeedsDataSource`) that #13472 recorded as pre-existing on main. This diff touches neither package. The gate runs on push and schedule with `--cross-check`, which is its measurement, and that run is green on main `cd70b78`. NOT MEASURED locally (left to CI): the rest of the workspace `vitest` shards, `lint` and `type-check` across all packages, and e2e. ## Acceptance notes - objectui#13477 (the label render of the same objectstack change) is a different defect; it remains open and nothing here touches it. - [x] Adds no product-specific widget, dialog, hook or string (see AGENTS.md › Product-neutral renderer) Implemented by the ui lane card thread, session `https://claude.ai/code/session_01Usjyy1hT9FNxZHea9u7drp`; claim on the card, comment 6391374949. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Usjyy1hT9FNxZHea9u7drp --- _Generated by [Claude Code](https://claude.ai/code/session_01Usjyy1hT9FNxZHea9u7drp)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Elon · project thread
Fixes #25631
Clause-②: no
Metadata-protocol: none
Every manifest that declares
zodnow asks for^4.6.6, past GHSA-mrhx-c7xc-m3w5, and the workspace resolves one zod, 4.6.7. Every other advisorypnpm auditmatched onmainmoves to its patched release, except@azure/msal-node, which has no upstream path yet (below).pnpm audit, before and afterMeasured with pnpm 10.31.0 against the lockfile,
mainat49653f9vs this branch.pnpm audit --prod, mainpnpm audit(all), mainpnpm audit(all), this branchWhat moved
^4.6.6in the 12 manifests that declared^4.6.5and in apps/docs (^4.6.1)nextpeer followed it^3.4.17(mermaid^3.3.3admits it)^2.4.0(express 5.2.1^2.2.1admits it)^21.0.4; see Acceptance notes^4.0.5→^4.0.8^7.30.1and^8.12.2, selectors unchanged^10.0.2→^10.1.4^3.1.9^10.7.4The lockfile is regenerated by
pnpm install, never edited by hand. The resolved package set changes only in the rows above, the@next/*binaries that move with next, and happy-dom with its four private dependencies leaving. Each new or moved override carries its reason inpnpm-workspace.yaml, in the block dated 2026-10-24.Not cleared:
@azure/msal-nodeGHSA-xcx6-jx8p-x3h5 (high)5.4.1 comes from
@azure/identity4.13.1 (^5.1.0) under tedious 18.6.2, driver-sql's optional mssql peer. The fix is only in msal-node 7.1.0. No@azure/identityrelease admits it: 4.14.0 (latest) and 4.15.0-beta.1 both declare^6.0.0. Clearing it here would mean forcing two majors past identity's declared range on an Azure AD sign-in path that no test in this workspace runs, so it is reported as a finding and not pinned. This PR does not make it worse: the OSV verdict on a pull request is base-relative, andmainalready carries it.Generated surfaces
pnpm --filter @objectstack/spec build, thenpnpm --filter @objectstack/spec check:generated: all 14 generated artifacts are up to date under zod 4.6.7 (JSON schemas, API surface, export origins, declaration map, docs). Nothing was regenerated, so there is nothing to commit.The vendored Console keeps one zod: objectui at the pinned
2958f17e9c6aalready resolves zod 4.6.7, which satisfies the spec's new^4.6.6range.Verification
Local, at head
5396e799bb:pnpm build: 76 of 76 tasks.turbo run typecheck, 4096 MB heap, the runner's V8 default): 152 of 152 tasks. Under this container's 2096 MB default,@objectstack/plugin-hono-server'stsc --noEmitruns out of heap. That is not this change: the same program reports 4,167,189K memory used onmain's dependency set and 4,166,613K on this branch (tsc --extendedDiagnostics).--project unit4816 tests. All pass.dispatch-gates --commands: 101 derived families run, 101 exit 0, reconciled by--ran(0 unrun, 0 not measured). Two needed full history first:check-engine-split-ratioandcheck-plugin-teardown-shape --self-testrefuse a shallow clone.pnpm check:override-consistency,pnpm check:vendor-export-contract-resolve,node scripts/check-osv-exemptions.mjs,node scripts/check-commit-card-trailers.mjs --range origin/main..HEAD: exit 0.CI on the same head: all 44 check runs are success or skipped, including Validate Package Dependencies (OSV base-relative), Build Docs (next 16.4.1), Build Core, Test Core 1 to 6, TypeScript Type Check and Lint & Repo Gates. Console Pin Gate runs neither on a pull request nor in the merge queue (its
if:excludes both), so its first verdict comes after landing; the pinned objectui resolves zod 4.6.7, inside the spec's new^4.6.6, which is the range its build asserts against.Acceptance notes
@azure/msal-nodestays, for the reason above. It needs either an@azure/identityrelease that accepts msal-node 7.1.0 or a maintainer decision to force it.happy-dom: *peer, auto-installed; no manifest declares it and no vitest config selects that environment. With the peer rewritten to^21.0.4, pnpm does not install it.check:override-consistencylists the entry as having 0 consumers, which is a report, not a failure; the entry stays as the floor a future declaration lands on.main's scheduled OSV scan fails on every severity.pnpm-lock.yaml. Whichever lands second regenerates the lockfile with pnpm.🤖 Generated with Claude Code
https://claude.ai/code/session_016n6CWTNgTQKqAHM3ga7ZRt