Repository navigation
fix(deps): bump the Payload family to 3.90.2 for scoped bookkeeping validation - #865
Merged
Merged
Conversation
…alidation Under `unpublishAllLocales`, 3.90 validates the fields a write submits and skips only the stored rest, so `updateEventBookkeeping` now refuses a bad bookkeeping value instead of writing it unchecked (#852). The same release strips stored API keys from every read; `Clients` enables Payload's gated reveal so managers keep the built-in Reveal button. Also fixes what the upgrade broke: the Region slug generator losing its race against the sibling validator, video fixtures the new container sniffing rejects, and Lexical fixtures the relationship feature now refuses at write time. Adds the `managers.reset_password_requested_at` auth column. Co-Authored-By: Claude Opus 5.5 <[email protected]>
railway-app
Bot
temporarily deployed
to
sahajcloud / SahajCloud-pr-865
September 29, 2026 04:15
Destroyed
|
🚅 Deployed to the SahajCloud-pr-865 environment in sahajcloud
1 service not affected by this PR
|
13 tasks done
…e it plugin-cloud-storage 3.90 stores an `_objectKey` column on every collection it manages, but only when enabled — and it is disabled wherever the Cloudflare credentials are absent, including `migrate:create`. The first 3.90 migration therefore missed it, and every upload on the preview failed with `column images._objectkey does not exist`. `storagePlugin` now declares the field in every branch, derives the enabled map from the same registry, and a unit spec pins that both branches yield the same column. Stacked as a second migration because the first has already deployed to the preview. Co-Authored-By: Claude Opus 5.5 <[email protected]>
railway-app
Bot
temporarily deployed
to
sahajcloud / SahajCloud-pr-865
September 29, 2026 04:35
Destroyed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
railway-app
Bot
temporarily deployed
to
sahajcloud / SahajCloud-pr-865
September 29, 2026 04:36
Destroyed
This was referenced Sep 29, 2026
This branch was successfully deployed
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.
Summary
[email protected]requires). Follows chore(events): decide whether the unpublishAllLocales validation skip stays #852's Option 2 finding.unpublishAllLocales, 3.90 validates the fields a write submits and skips only the stored rest (shouldLimitValidationToSubmittedFields/fieldsToValidate).updateEventBookkeepingkeeps its one call unchanged, but a bad bookkeeping value is now refused instead of written unchecked. A new int case pins that.apiKeyhardening lands here as intended: no read returns a stored key any more.Clientsnow setsuseAPIKey: { reveal: true }, so managers keep a Reveal button in the built-in admin UI, backed by Payload's gated endpoint.managers.reset_password_requested_at, a new Payload auth column, and_objectkeyon the eight storage collections — which only appeared once the preview's smoke run failed (see Notes).Changes
package.json,pnpm-lock.yaml— the whole Payload family to exact3.90.2,lexicaland@lexical/*to0.50.0.@payloadcms/[email protected]still pins[email protected], sopatches/[email protected]still applies.src/migrations/20260929_041116_payload_3_90_auth_fields.{ts,json}— adds nullablereset_password_requested_attomanagers. One additive column; no earlier migration adds it.src/migrations/20260929_043344_storage_object_key.{ts,json}— adds nullable_objectkeytoimages,frames,videos,files,meditations(+_meditations_v),songs,user_choices,song_tags.src/plugins/storage/storagePlugin.ts— declares_objectKeyon every storage collection in all three branches (enabled, no credentials, E2E), and builds the enabled collections map from oneSTORAGE_BACKENDSregistry so the two can't drift.src/payload-types.ts— regenerated:resetPasswordRequestedAtonManager, virtualhasAPIKeyonClient, and a polymorphicuseronTaskSchedulePublish.src/lib/events/updateEventWithoutValidation.ts— the docblock now describes 3.90's scoped validation instead of a full skip. The quoted Payload source it cited no longer exists.src/collections/Regions/nonEmptySlug.ts,Regions.ts—withNonEmptySlug(inner, useAsSlug). On create, a blank slug is judged bysiblingData.namerather than by whether the sibling checkbox's generator has run yet (see Notes).src/collections/Clients/Clients.ts—useAPIKey: { reveal: true }.docs/rules/access.md,docs/rules/api-clients.md— theapiKeyfield lock is now the last gate on reveal and the whole gate on a client choosing its own key. Payload itself closes the read.tests/int/clients-access.int.spec.ts— key read-back goes throughPOST /:id/api-key/reveal. Three new cases pin its gates: a listed manager gets the key withCache-Control: no-store, an unlisted manager is refused, and a client key is refused 403 even for its own row.tests/int/expire-events.int.spec.ts— a bookkeeping write on an event with invalid stored data still goes through, but an invalidverificationStageis refused.tests/int/pages.int.spec.ts,lessons.int.spec.ts— the stale relationship node is planted throughpayload.db(the only way legacy data arises now), with a guard asserting the planted row really holds it.tests/int/storage-utils.int.spec.ts—storageFilePath, now a requiredHandleUploadargument. Our adapters don't read it.tests/utils/testData.ts—createVideo,createFile,createFramepass a realBuffer.tests/unit/region-non-empty-slug.spec.ts— covers thesiblingDatabranch.Test results
tsc(src + tests), 2243 unit tests (+3 intests/unit/storage-object-key.spec.ts)pnpm test:intlocally: ✓ 88 files, 1472 tests (run twice — the first surfaced thecreateFile/createFramevideo fixtures)pnpm generate:importmap— no changes.pnpm generate:types— the diff above only.Watched red before the fix, on 3.90.2:
nonEmptySlugchangecreateRegioncall — 33 of the 42 cases in the three specs #852 names (The following field is invalid: Slug)Bufferfixturescollections-smokevideos,frames-by-narrator,cleanup-orphaned-media(header.readUInt32BE is not a function)payload.dbplantingpages/lessonsstale-relationship cases (invalid: Content > Content)afterReadstrip on Pages, with the new plantingexpected [ { type: 'relationship', … } ] to deeply equal []— so the spec is not vacuousThe Region fix was also checked against 3.87.1: the same spec passes there unmodified, so the race flipped with the upgrade and was not latent.
Notes for reviewer
The first smoke run failed on
column images._objectkey does not exist, and nothing local could have caught it.plugin-cloud-storage3.90 stores an_objectKeycolumn on every collection it manages — but only when enabled, andstoragePlugindisables it wherever the Cloudflare credentials are absent: local dev, the integration suite (whose harness doesn't load it at all), andmigrate:create. Before 3.90 the plugin added no stored column here, so that never mattered.storagePluginnow declares the field whatever the credentials; an enabled plugin swaps in its own identical definition.storage-object-key.spec.tsstubs the credentials and pins that both branches produce the same field — red on all three cases with the fix reverted. And re-runningmigrate:createwith stubbed credentials (plugin enabled, as on Railway) now finds nothing to migrate. It's a second migration rather than a regenerated first one because the first already deployed to this preview (src/migrations/AGENTS.md, "Unmerged does not mean unapplied").The Region slug race is Payload's, and it is not new — only who wins it is.
slugFieldputs thegenerateSlugcheckbox and theslugtext field in onerow, andtraverseFieldsruns a row's fields through onePromise.all. The generator (the checkbox'sbeforeChangehook) used to finish before the text field'svalidate; on 3.90.2 it doesn't, sovaluearrivesundefinedon every create. ReadingsiblingData.nameremoves the dependency on order entirely.slugFieldis marked@experimentalupstream.reveal: trueis a choice, and a one-line revert. Without it the built-in UI shows a key once, at generation ("It will not be displayed again"), and a lost key means regenerating it — breaking whichever host embeds it, including the 13 WordPress sites. With it, reveal requires admin access, thenupdateon the row, thenClients.apiKey's ownupdatelock. Nothing insrc/read a client'sapiKeyback, so the admin UI is the only surface affected.The version-row overwrite (#841) and the
localizeStatushazard survive the upgrade.saveVersion({ unpublish })still overwriteslatest: true. The unpublish half is still inert only because Events omitsversions.drafts.localizeStatus, andevent-localize-status-guard.spec.tsstill pins that. payloadcms/payload#18375 stays open: 3.90 scopes validation only behindunpublishAllLocalesor trash, not as an option on an ordinary update.Deployment
Both migrations apply in-process on boot, like every other. No operator step.
Closes #852
🤖 Generated with Claude Code