Repository navigation
chore(deps): bump the backend group across 1 directory with 7 updates - #870
Conversation
|
Blocked by #907, not by anything in this PR. All five open Dependabot PRs fail Monorepo integrity on the same step — Separately: I approved the workflow runs on all five. They had been sitting on |
|
This one has a second failure that is genuinely its own, and it should not be merged even once #907 clears.
The failing cases are every array-valued field on that form:
Nine failures confined to one file and to one kind of field is not flakiness. The suspect in this group is zod 4.1.13 → 4.6.5 — a five-minor jump that plausibly changed how array defaults or empty arrays survive a parse, which is exactly what those assertions inspect. The other six bumps here (posthog ×3, tRPC ×3) have no plausible path to that form. Suggested handling: split zod out of the |
|
Investigated. zod is the sole cause, and it's a real bug, not a test artifact — full write-up in #910. Isolated it on this branch with everything else in the group applied:
The mechanism, reduced: z.object({…}).partial().superRefine(…).pick({ drivers_license_classes: true })
// zod 4.1.13 -> works
// zod 4.6.5 -> Error: .pick() cannot be used on object schemas containing refinements4.1 allowed the pick and silently dropped the refinement; 4.6 refuses. So the 9 red tests are reporting a genuine regression this bump would ship. Latent today — Not merging this as-is. Two things have to happen first: #907/#908 for the Expo gate, and #910 for the schema. Worth splitting zod out of the |
|
#912 fixes the schema side of this (#910) and is verified green against zod 4.6.5 — 49 passed / 0 failed, where this branch currently gets 31/9. Once #912 lands, this PR needs a |
…912) zod 4.6 refuses `.pick()` on an object that carries a refinement: Error: .pick() cannot be used on object schemas containing refinements zod 4.1 allowed it and quietly dropped the refinement, which is the only reason the five employment cards worked. Each one picks a single field out of `profileEmploymentInputSchema` inside its save handler, and that schema ends in `.superRefine(...)`. On 4.6 the `.pick()` throws before `safeParse` is reached, inside an event handler — so ticking a licence class, a military status, an availability window, a work location or typing an hourly rate would save nothing, and say nothing. That is what made #870 (the backend Dependabot group, zod 4.1.13 -> 4.6.5) red: 9 failures in profile-employment-left.test.tsx, every one an array-valued field. Latent on main today, since main is still on 4.1.13. ## Changes `profileEmploymentBaseSchema` is the `z.object({...}).partial()`, exported on its own. `profileEmploymentInputSchema` is now that base plus the cross-field travel rule. Routers and whole-payload validation keep using the refined one and are unchanged; the cards pick from the base. The five cards each swapped to the base schema. They also each had: if (!result.success) return which discards something the user just chose without a toast, a log or a console warning. That is what turned a library guard into invisible data loss — the throw and the silent-discard path lead to the same place. Each now logs a warning with the zod issues before returning. `employment-schema-pick.test.ts` asserts that every field the cards pick is pickable without throwing, that a picked field still enforces its own rules (3-location max), and that the refined schema still rejects `open_to_travel` with no distance. It fails the moment a refinement is attached to the schema the cards import. ## Verification Ran both suites against zod 4.6.5 by temporarily moving the catalog pin, then reverted it — the bump itself belongs to #870, not here: zod 4.1.13, before -> 40 passed, 0 failed (the pin hid the bug) zod 4.6.5, before -> 31 passed, 9 failed zod 4.6.5, after -> 49 passed, 0 failed scf-core full suite 1267 passed / 0 failed on 4.1.13; scf-core and scaffald-app typecheck and lint clean. Note: `packages/supabase/functions/_shared/schemas/consolidated.ts` is a near-duplicate of the scf-trpc copy that nothing imports — the cards resolve through `@scf/supabase/client-types` to `@scf/trpc/schemas`. Changed in lockstep so the two do not drift further apart; the duplication itself is left alone. Co-authored-by: Claude Opus 5 <[email protected]>
|
#912 is merged — the schema fix is on This branch is currently CONFLICTING (the lockfile moved under it when #853 landed). Needs |
|
@dependabot recreate |
51d8618 to
5eb61a8
Compare
|
@dependabot recreate |
Bumps the backend group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [posthog-js](https://github.com/PostHog/posthog-js) | `1.424.1` | `1.434.9` | | [posthog-react-native](https://github.com/PostHog/posthog-js/tree/HEAD/packages/react-native) | `4.66.3` | `4.76.0` | | [posthog-node](https://github.com/PostHog/posthog-js/tree/HEAD/packages/node) | `5.51.6` | `5.52.5` | | [@trpc/client](https://github.com/trpc/trpc/tree/HEAD/packages/client) | `11.18.0` | `11.19.0` | | [@trpc/react-query](https://github.com/trpc/trpc/tree/HEAD/packages/react) | `11.18.0` | `11.19.0` | | [@trpc/server](https://github.com/trpc/trpc/tree/HEAD/packages/server) | `11.18.0` | `11.19.0` | | [zod](https://github.com/colinhacks/zod) | `4.1.13` | `4.6.5` | Updates `posthog-js` from 1.424.1 to 1.434.9 - [Release notes](https://github.com/PostHog/posthog-js/releases) - [Changelog](https://github.com/PostHog/posthog-js/blob/main/CHANGELOG.md) - [Commits](https://github.com/PostHog/posthog-js/compare/[email protected]@1.434.9) Updates `posthog-react-native` from 4.66.3 to 4.76.0 - [Release notes](https://github.com/PostHog/posthog-js/releases) - [Changelog](https://github.com/PostHog/posthog-js/blob/main/packages/react-native/CHANGELOG.md) - [Commits](https://github.com/PostHog/posthog-js/commits/[email protected]/packages/react-native) Updates `posthog-node` from 5.51.6 to 5.52.5 - [Release notes](https://github.com/PostHog/posthog-js/releases) - [Changelog](https://github.com/PostHog/posthog-js/blob/main/packages/node/CHANGELOG.md) - [Commits](https://github.com/PostHog/posthog-js/commits/[email protected]/packages/node) Updates `@trpc/client` from 11.18.0 to 11.19.0 - [Release notes](https://github.com/trpc/trpc/releases) - [Commits](https://github.com/trpc/trpc/commits/v11.19.0/packages/client) Updates `@trpc/react-query` from 11.18.0 to 11.19.0 - [Release notes](https://github.com/trpc/trpc/releases) - [Commits](https://github.com/trpc/trpc/commits/v11.19.0/packages/react) Updates `@trpc/server` from 11.18.0 to 11.19.0 - [Release notes](https://github.com/trpc/trpc/releases) - [Commits](https://github.com/trpc/trpc/commits/v11.19.0/packages/server) Updates `zod` from 4.1.13 to 4.6.5 - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](colinhacks/zod@v4.1.13...v4.6.5) --- updated-dependencies: - dependency-name: "@trpc/client" dependency-version: 11.19.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: "@trpc/react-query" dependency-version: 11.19.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: "@trpc/server" dependency-version: 11.19.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: posthog-js dependency-version: 1.434.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: posthog-node dependency-version: 5.52.4 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: posthog-react-native dependency-version: 4.75.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend - dependency-name: zod dependency-version: 4.6.5 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: backend ... Signed-off-by: dependabot[bot] <[email protected]>
d32ea42 to
fff83fd
Compare
Dependabot regenerates the lockfile without deduping, which fails the Monorepo integrity check. Applied automatically by .github/workflows/dependabot-dedupe.yml.
|
Green. The 9 For the record, the remaining red on the first run after recreate was not this bump: Merging all seven: posthog ×3, tRPC ×3, and zod 4.1.13 → 4.6.5. |
…ock (#753) (#915) `profile-view-tracking` and `results-view-xp` each keep a "the old shape really did loop" case beside the fix, so the guard above it cannot pass vacuously. Both did it by rendering the broken component, waiting a fixed 120 ms, and asserting the effect had re-entered more than 20 times. That made the result a function of how fast the machine was, and the loop is not slow. Measured locally it re-enters the effect **6,143 times in 60 ms**. Letting that run for a fixed window is enough to take the vitest worker down with it — `Error: Worker exited unexpectedly`, surfaced as `STACK_TRACE_ERROR` against whichever test happened to be in flight. That is the #753 flake. Both suites failed exactly that way tonight on unrelated PRs and passed on a plain re-run: #908 profile view tracking > the old shape really did loop #870 results view XP > the old shape really did loop They surface on dependency PRs specifically because CI runs `Test (affected)`, and a lockfile change makes every project affected — so `apps/scaffald`'s suite runs when an ordinary feature PR would not. Each one first read as a regression from the bump. ## The assertion never needed a clock Knowing the effect re-enters itself without a terminating condition is what the test is for, and 25 iterations establish that as well as six thousand. `unbounded-loop-probe.ts` counts calls, stops the loop the instant it reaches `LOOP_CAP`, and resolves. Fast machine or slow, the work is the same and nothing runs away. The two cases now finish in ~11 ms rather than 120 ms+. `shouldStop` is the *test's* bound, not a fix to the shape under test: the effect still has no terminating condition of its own, and the probe only trips it once the loop has already proved itself. ## The guard still guards A stall is now the interesting failure — it means the old shape stopped looping, so react-query changed its identity semantics and the reasoning behind the fix needs revisiting. `settled()` races the loop against a 2 s deadline so that case is a readable assertion rather than a suite timeout. Verified by mutation: replacing `Looping`'s unstable mutation object with the stable `mutate` makes it fail with AssertionError: expected 'stalled' to be 'looped' rather than passing. The 2 s is only paid when the test is about to fail. Ran the pair six times: 6/6 green each time. `scaffald-app` full suite 98 passed / 0 failed; typecheck and lint clean. Co-authored-by: Claude Opus 5 <[email protected]>
…924) `deno check` on the `api` function reported 404 errors and its step in api-tests.yml carried `continue-on-error: true` from the day it was written, so it had never once been able to fail. Nothing checked the other 25 functions at all. ## The zod split: 70 errors from one line `functions/api/deno.json` resolved `zod` from `deno.land/x` while `@hono/zod-openapi` resolved its own peer — declared `"zod": "3.*"` — from npm, where the workspace is on zod 4. So every `z.object()` handed to `createRoute` was built by a different zod than the library's types expected: Type 'ZodObject<…, ZodTypeDef, …>' is missing the following properties from type 'ZodType<any, ZodTypeDef, any>': "~standard", "~validate", openapi `"~standard"`/`"~validate"` are zod 4 internals; the five-arg `ZodObject` is zod 3. Pointing the import map at `npm:[email protected]` puts both sides on one instance and the family goes 70 -> 0. The function imports no workspace schemas, so nothing else moves with it. Not caused by the recent zod bump: 407 errors at 4.1.13 before #870, 404 at 4.6.5 after. The split is the 3/4 boundary in the import map and predates it. ## A ratchet, because the rest are real The 334 that remain on `api` are ~117 handlers returning a status the route's `responses` never declared and ~103 data-shape mismatches. Each needs a decision about that route's contract — per-route work, not a CI fix. So the known-bad is pinned per file and anything worse fails. Per file rather than one total: a single number lets you add errors to one route while fixing another and still pass. Verified all three failure paths by planting errors: a new file not in the baseline fails, an existing file gaining one fails, and a function becoming uncheckable fails. ## It now covers every function, and 12 are held at zero `pnpm test:deno:types` used to `find` every .ts and check them in one go — each file WITHOUT its function's import map. That is why it reported a different 315, including complaints about `scf-schemas` importing `awesome-phonenumber`, which is correct in context. It pointed at the new checker. Checked properly, from each function's own directory, 12 are already clean: auth-logout, auth-refresh, auth-session, auth-token-exchange, background-check-webhook, community-ai-summary, community-moderate, news, news-import, notify-check-receipts, notify-digest-daily, notify-digest-weekly. Their absence from the baseline holds them at zero. That includes deployed functions — the notify-* pipeline, webhooks-email, job-import — which the old api-only step never looked at. `--node-modules-dir=auto` is passed on the command line rather than added to each deno.json: only `api` sets it, and without it deno aborts at startup on any function using npm: specifiers. Keeping it out of the config leaves what the Supabase runtime reads untouched. ## The bug that nearly shipped in this script An earlier draft stripped ANSI with `/\[[0-9;]*m/` — no escape character — so every line kept a leading \x1b, `^TS` never matched, and all 26 functions reported zero. A ratchet that always passes. Caught by planting an error and watching it pass. The same draft scored a startup abort as zero errors, which reported three functions "clean" that deno had never looked at. The script now separates "no errors" from "could not be checked" and fails on the latter unless the baseline acknowledges it with a reason. `stripe-webhook` is the one entry: it pins `npm:[email protected]`, a version that was never published — #923. Co-authored-by: Claude Opus 5 <[email protected]>
Bumps the backend group with 7 updates in the / directory:
1.424.11.434.94.66.34.76.05.51.65.52.511.18.011.19.011.18.011.19.011.18.011.19.04.1.134.6.5Updates
posthog-jsfrom 1.424.1 to 1.434.9Release notes
Sourced from posthog-js's releases.
... (truncated)
Commits
2d98d58chore: update versions and lockfile [version bump]708a5f7fix(replay): defer input setter hooks on the timer zone.js leaves unpatched (...5ec9c85chore: update versions and lockfile [version bump]73a679cchore(mcp): document shared server event properties (#5047)5b655befeat(react-native): add aforceoption for symbol uploads (#5064)36f356dfix(dead-clicks): survive a denied property access in Firefox (#5054)3d09ad7chore: update versions and lockfile [version bump]c551218fix(replay): guard the network plugin's performance observer init (#5001)f6464f0chore: update versions and lockfile [version bump]4770179fix(replay): stop a tainted canvas from killing the whole recording (#5016)Updates
posthog-react-nativefrom 4.66.3 to 4.76.0Release notes
Sourced from posthog-react-native's releases.
... (truncated)
Changelog
Sourced from posthog-react-native's changelog.
... (truncated)
Commits
5ec9c85chore: update versions and lockfile [version bump]5b655befeat(react-native): add aforceoption for symbol uploads (#5064)dea3a53chore: update versions and lockfile [version bump]5cfec8bfeat(react-native): support partial survey responses and persistent resume (#...e65d81fbuild: adopt stable native TypeScript with targeted legacy fallbacks (#4984)d5123fcchore: update versions and lockfile [version bump]614e508fix(react-native): compose source maps after Babel transforms (#5006)63944c7chore: update versions and lockfile [version bump]0257a29refactor(surveys): share shuffling across web and React Native (#4977)d14b608chore: add semantic type checks for every SDK (#4985)Updates
posthog-nodefrom 5.51.6 to 5.52.5Release notes
Sourced from posthog-node's releases.
Changelog
Sourced from posthog-node's changelog.
... (truncated)
Commits
3e72e7bchore: update versions and lockfile [version bump]aad7464fix(flags): honor versioned local property matching (#4800)dea3a53chore: update versions and lockfile [version bump]5cfec8bfeat(react-native): support partial survey responses and persistent resume (#...e65d81fbuild: adopt stable native TypeScript with targeted legacy fallbacks (#4984)d14b608chore: add semantic type checks for every SDK (#4985)bba9db4chore: update versions and lockfile [version bump]39a8980fix(core): declare the evaluation runtime on /flags requests (#4885)8aecf43chore: update versions and lockfile [version bump]07c1045fix(error-tracking): link causes and aggregate members in one event (#4941)Updates
@trpc/clientfrom 11.18.0 to 11.19.0Release notes
Sourced from @trpc/client's releases.
... (truncated)
Commits
fcc6bcav11.19.0fd2d085build(deps): patch security advisories in packages/* (#7580)c2609f9build(deps): upgrade vitest to v5 (#7578)65bbb0bbuild(deps): upgrade prettier to 3.9.6 (#7577)352da1cbuild(deps): upgrade eslint to v10 (#7576)72af4afbuild(deps): upgrade typescript to v7 for packages/* (#7575)1ab54bfbuild(deps): upgrade tsdown to 0.23.0 (#7574)1420928build(deps): upgrade pnpm to v12 (#7572)c6a4f9bbuild(deps): upgrade node to 24.21.0 and@types/nodeto v24 (#7571)d1a9ec6fix(client): abort httpLink/httpBatchLink requests on unsubscribe (#7469)Updates
@trpc/react-queryfrom 11.18.0 to 11.19.0Release notes
Sourced from @trpc/react-query's releases.
... (truncated)
Commits
Updates
@trpc/serverfrom 11.18.0 to 11.19.0Release notes
Sourced from @trpc/server's releases.
... (truncated)
Commits
fcc6bcav11.19.055e26d3build(deps): patch security advisories in www and examples (#7581)fd2d085build(deps): patch security advisories in packages/* (#7580)c2609f9build(deps): upgrade vitest to v5 (#7578)65bbb0bbuild(deps): upgrade prettier to 3.9.6 (#7577)352da1cbuild(deps): upgrade eslint to v10 (#7576)72af4afbuild(deps): upgrade typescript to v7 for packages/* (#7575)1ab54bfbuild(deps): upgrade tsdown to 0.23.0 (#7574)c6a4f9bbuild(deps): upgrade node to 24.21.0 and@types/nodeto v24 (#7571)6a118b0fix(server): match lazy router keys on a path boundary in getProcedureAtPath ...Updates
zodfrom 4.1.13 to 4.6.5Release notes
Sourced from zod's releases.