Repository navigation
chore(deps): bump the Payload family to 3.92.1 for the consumers - #1165
Conversation
Eleven exact pins move together, as `src/migrations/AGENTS.md` requires: Payload does not support a mixed-version family, and `@payloadcms/db-postgres` is what pins the drizzle-kit the rename patch keys on. 3.92.1 still pins drizzle-kit 0.31.7, so `patches/[email protected]` keeps matching. The lexical trio stays at 0.50.0 — the versions `@payloadcms/[email protected]` declares. The `nodemailer` override is dropped: `@payloadcms/[email protected]` declares `^10.1.1` itself, so the pin past its declared major is no longer load-bearing. Resolution is unchanged at 10.3.1. 3.92 indexes `_parent_id` on every localized table, which the migration ships. `pnpm generate:types` leaves `src/payload-types.ts` byte-identical. Refs #1162 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX5twGBZKZzNwA6RSq
…dmin` 3.92.1 added four admin flags to the plugin's own `_objectKey`, and the credentials-set/credentials-absent equality case compared whole field objects, so a cosmetic upstream change reddened the lane. `admin` is the one key that cannot reach DDL: an enabled plugin discards our field and pushes its own, and where it is disabled the field is already `hidden`. Drop `admin` from both sides and keep everything else compared, so an `index`, `hasMany` or `defaultValue` upstream adds still fires. Watched both directions fail: removing the shadow declaration reds all three cases, and an added `index: true` reds the equality case. The docblock's claim that the enabled plugin swaps in an identical definition was never quite true — it splices ours out. #1164 removes the copy entirely. Refs #1162 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX5twGBZKZzNwA6RSq
|
🚅 Deployed to the SahajCloud-pr-1165 environment in sahajcloud
1 service not affected by this PR
|
sydevs-bot
left a comment
There was a problem hiding this comment.
1 question for the reviewer, one per thread.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
Payload 3.92 added an `isValidID` guard to `findByIDOperation`: a
non-finite numeric id now throws `NotFound` before any SQL runs, so
`findByID({ id: NaN })` no longer reaches Postgres and the spec found
no 22P02 to assert on.
`find({ where: { id: { equals: NaN } } })` still does, with the same
`invalid input syntax for type integer: "NaN"` the production Sentry
issue carries. The assertions are unchanged; only the way in moved.
Measured, not assumed — a slug and a string in the `where` were both
probed, and neither reaches the driver.
Production is unaffected: the REST route passes the slug through as a
non-empty string, which the new guard admits.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXwbACQ2ZoBSTKtTcX
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the ticket and nothing more: eleven pins, one dropped override, one generated migration, one narrowed assertion, one re-aimed spec. I re-derived the risky claims instead of trusting the body, and they stand. The 32 indexes are exactly the snapshot delta, none redundant, with no column, table or enum change beside them.
The gap is in the body, not the code. 3.92.1 changes what findByID does with a bad id, which is why a third commit re-aims an integration spec. The outline never says so, and the change reaches API clients.
Findings
should-fix—package.json:70: the outline omits thefindByIDbehaviour change this pin ships.should-fix—tests/int/database-cast-errors.int.spec.ts:84: the comment presents a 3.92.1 change as an always-true fact, and retires the live case above it.consider—src/migrations/20261115_184420_payload_3_92.ts:6: the write freeze is described but never sized.
What was checked
- Both snapshots diffed whole: 32 indexes added, 0 removed, tables, columns and enums identical. No
*_localestable carries another index leading on_parent_id, so none of the 32 is redundant. All 32, not a sample. - Lockfile:
[email protected]only.[email protected]pinsundiciat7.30.1, past the^7.29.1override, so "inert" is right. findByID.jscompared between 3.90.2 and 3.92.1. The newisValidIDguard is the behaviour change.- Read whole on the branch:
storagePlugin.tsand both specs. The ladder adds onlyschemaShape, a local helper for one assertion, which earns it. src/payload-types.tsandresponseTypes.tsare untouched, so neither consumer needs a sync.- All three preview links reach the Cloudflare Access gate. This environment holds no service token, so the admin itself is unverified.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The ⚠ on the integer case read as an always-true fact about the local API. It is 3.92.1's: `findByID` gained an `isValidID` guard that refuses a non-finite id before any SQL, absent from 3.90.2's build of the same file. That retires the live path the case cites. Measured through `handleEndpoints` with each version installed: `GET /api/lectures/daily_fallback_shri_mataji_clip` answers 400 with 22P02 under 3.90.2 and 404 under 3.92.1 — Sentry 136881789's own request. So the case now pins that a 22P02 on an integer column survives drizzle's wrapping, not a request a client still makes, and the case name no longer calls it live. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXFyfUMBxmkpVkrUtU
|
Three review threads addressed. The Adopted — the outline's gap. 3.92 added an Adopted — the spec's ⚠, in Adopted — the unsized freeze. A btree on one 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
The entry floored undici at `^7.29.1` because `[email protected]` pinned the vulnerable `7.28.0` exactly, putting GHSA-4cwx-7wf7-3272 out of reach of an in-range refresh. `[email protected]` pins `7.30.1` itself, so that premise is gone and the override decides nothing. Resolution is unchanged, not assumed: the lockfile diff is the one deleted override line, `[email protected]` remains the single resolved copy, and the installed build reports 7.30.1. Dropping it rather than keeping it as a floor is the reviewer's call on the question thread. A future `payload` outside the 7.x line now resolves freely; #1065 owns scoping this family of overrides and re-measures with 3.92.1 installed. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjWh1H6eYRMqbk2Nwgv
|
One thread, answered and built. B — drop the Resolution is unchanged, measured not assumed: the lockfile diff is the one deleted override line, Body refreshed: the outline's overrides block and the first reviewer note both still described the entry as kept. Lean gate ✓ 135 s, 3876 unit tests. No security review — this push touches only 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
@sydevs-bot Fix the merge conflicts |
Conflicts were the three manifests, against main's routine update (#1166). - package.json: this branch's 3.92.1 pins, plus main's @photostructure/tz-lookup ^11.8.0 (next ^16.4.6 merged cleanly). - pnpm-workspace.yaml: the undici and nodemailer overrides stay dropped. Main had only rescoped undici to `undici@^7.0.0`; [email protected] pins 7.30.1 itself and [email protected] no longer caps at 9.x. - pnpm-lock.yaml: main's lockfile, re-resolved with `pnpm install`. The package set equals both sides' changes combined, except undici resolves 7.30.1 (payload's exact pin) instead of main's override-driven 7.30.2. `pnpm audit --prod` reports the same four advisories as main, none undici. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The merge conflicts were already resolved, in
Measured on this branch merged with
The body's 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
…storage-always-insert-fields main brought the Payload 3.92.1 bump (#1165). Three files conflicted. `storagePlugin.ts`: main reworded the comment above `withObjectKeyColumn`, the transform this branch deletes. Took this branch's comment, which documents `SCHEMA_ONLY_COLLECTIONS` instead. Nothing of main's intent is lost — its own wording already named #1164 as what replaces the transform. `storage-object-key.spec.ts`: main added `schemaShape`, which strips `admin` before comparing, because 3.92.1 added four admin flags to upstream's `_objectKey` and main compared that against our hand-written literal. This branch has one producer on both sides, so the difference it worked around cannot arise. Took this branch's spec whole, and confirmed the whole-field comparison stays green on 3.92.1. `src/migrations/index.ts`: both migrations, in timestamp order — `20261115_184420_payload_3_92` before `20261116_171937_storage_prefix`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjZA13k1h23uDZrPtgW
Summary
_objectKeydrift canary now compares schema keys, notadmin— 3.92 grew upstream'sadminblock.GET /api/<collection>/<non-numeric-id>moves from 400 to 404.Change outline
Contract — the dependency pins
Contract — the schema 3.92 adds
One index per localized table. The existing unique index leads with
_locale, so aparent-keyed lookup with no locale predicate could not seek on it.
Behaviour — what a bad id answers over REST
3.92 added an
isValidIDguard tofindByID(dist/collections/operations/findByID.js:51),absent from 3.90.2's build of the same file. A non-finite numeric id now throws Payload's
NotFoundbefore any SQL, so the 22P02 thatdatabaseErrorPluginmaps to a 400 never happens.Measured through
handleEndpointswith each version installed, not read off a changelog. This iswhy the third commit re-aims
database-cast-errors.int.spec.ts: its integer case reached Postgresthrough
findByIDand no longer can. A query-side cast is untouched —?where[type][equals]=pathstill answers 400 with 22P02, which is what the e2e disclosure specpins.
Visible to every API client, the two consumer repos included. A 404 for an unknown id is the
better answer; it is a change in what a caller reads, not a regression.
Behaviour — what the
_objectKeycanary compareswithObjectKeyColumnkeeps the column in the schema where the credentials are absent. Where theyare set, the plugin splices our field out and pushes its own — so our
adminblock never appliesthere, and where it does apply it cannot reach DDL. The spec compared whole field objects, so
upstream's four new flags reddened the lane over presentation config.
Preview
@payloadcms/uimoves, so the panel itself is the test_objectKeyData: not seeded.
previewUrl.seedis unset for this repo, so these open on empty lists untilsomeone adds a row. The admin chrome, which is what this PR risks, renders either way.
Migration
src/migrations/20261115_184420_payload_3_92.tsCREATE INDEXon*_localestables. No column, table or data change.downdrops all 32.Generated with the Cloudflare and R2 variables stubbed in
.env.local, sostoragePluginregistered its adapters instead of the local-storage fallback — that fallback is what hid
_objectkeyin #865. A second run wrote nothing.⚠ It is a write freeze on boot. All 32 builds share one transaction, so the
SHARElocksaccumulate and every localized table blocks writes until the last commits — the sum of the builds,
not the longest. 23 of the 32 are small; the cost sits in
_pages_v_localesand the three_*_translations_v_locales.CONCURRENTLYis not available: it cannot run inside a transactionblock, and Payload wraps every migration in one. Ship as generated.
Sized, as far as this environment can. A btree on one
integercolumn builds in 267 ms permillion rows here (Postgres 16.15,
maintenance_work_mem64MB, a 1M-row synthetic(_locale, _parent_id)table). The freeze is the sum of 32 such builds, so it stays inside a fewseconds until the localized tables together pass roughly 10M rows. The row counts themselves are
not readable from here — this session holds no production database handle, and a PR preview carries
one row in every table (
tests/AGENTS.md). One query against production settles it:SELECT relname, n_live_tup FROM pg_stat_user_tables WHERE relname LIKE '%_locales' ORDER BY 2 DESC;Test results
.claude/skills/pr-prep/check.sh— lint, format, typecheck ×2, 3876 unit testsvideos,meditations,image-orientation,clients-access,client-query-validation,client-hooks,client-origin-enforcement,eventspnpm build. CI does not build this app — Railway does — so a bump is worth building locally.database-cast-errors✓ 3 passed.pnpm audit --produnchanged at 6 moderate, none undici.Manual verification
@payloadcms/uiandrichtext-lexicalboth moved)._objectKeypath runs only where the credentials are set.Notes for reviewer
undicioverride is dropped, the reviewer's answer on the question thread. It flooredundici at
^7.29.1because[email protected]pinned the vulnerable7.28.0exactly;[email protected]pins7.30.1itself, so the entry decided nothing. Resolution is unchanged —the lockfile diff is the one deleted override line,
[email protected]is still the only resolvedcopy, and
pnpm audit --prodreports no undici advisory. A futurepayloadoutside the 7.xline now resolves freely; chore(deps):
pnpm updatebreaks the config import — overrides outlive their ranges #1065 owns scoping this family of overrides.adminflags into ourshadow field. They are inert in both modes, so that was a source edit made to satisfy an
assertion. Narrowing the assertion was the smaller change; refactor(storage): take the plugin's own
alwaysInsertFieldsinstead of the shadow column #1164 removes theduplication outright.
2daa9df's message is wrong on one point. It says production is unaffected becauseREST passes a non-numeric slug through as a string, which
isValidIDadmits. Measured, RESThands
findByIDthe numberNaN, so the request 404s. The outline above carries the measuredanswer; the commit message cannot be corrected without rewriting history.
[email protected]published before this ran. chore(deps): bump the Payload family to 3.92.1 for the consumers #1162 settles that landing higher is fine, but3.92.1 is what fix(deps): the live-preview pin is load-bearing, and #222 widened it to a caret WeMeditateWeb#223 agreed on, so this lands there.
Detail
Why the shadow field is not derived from upstream.
baseObjectKeyFieldis a function-localconstindist/fields/getFields.js, and the package'sexportsmap has only.,./types,./utilitiesand./client— no./fields, no wildcard — so a deep import is blocked by Node'sESM resolution. Vendoring is the same copy with more lines. The real fix is upstream's own
alwaysInsertFields, which becomes the default in Payload v4; it costs aprefixcolumn on theeight upload tables, which is why it is #1164 and not this PR.
Both directions of the narrowed assertion were watched failing, not assumed: dropping
withObjectKeyColumnfrom the pipeline reds all three cases, and addingindex: trueto theshadow field reds the equality case. An
admin-only difference no longer reds it, which is thepoint.
nodemailerresolution is unchanged at 10.3.1 after dropping the override —@payloadcms/[email protected]declares^10.1.1itself, andpackage.jsonalreadycarried
nodemailer: ^10.1.7directly for the Mailpit transport and the preview scripts.src/payload-types.tsis byte-identical after the bump. Verified by deleting it andregenerating, rather than trusting the generator's "no change" silence.
The 32 indexes are not redundant. Every affected table's only pre-existing
_parent_idindexis the composite unique
(_locale, _parent_id); none leads with_parent_id. Checked across all32 in the snapshot, not sampled.
Review passes:
/simplifyacross four lenses, plus/security-review(triggered bysrc/plugins/storage/) — no security findings; it confirmed the DDL is literal with nointerpolation and no privilege change, and that no 9.x
nodemailerreturns. Nopr-review-toolkiton this runner.Closes #1162
🤖 Generated with Claude Code
https://claude.ai/code/session_01Mg9rjX5twGBZKZzNwA6RSq