Skip to content

fix!: inherit read access for collection versions - #17634

Merged
JarrodMFlesch merged 26 commits into
mainfrom
codex/pyld-3081-versions-access-control
Sep 22, 2026
Merged

JarrodMFlesch merged 26 commits into
mainfrom
codex/pyld-3081-versions-access-control

Conversation

@JarrodMFlesch

@JarrodMFlesch JarrodMFlesch commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Inherits a collection or global's existing read access for version operations when readVersions is not configured. Explicit readVersions access remains authoritative.

How access resolves

Configuration Effective version access
readVersions is configured Uses that function as written
readVersions is omitted Uses the fully composed read function, including baseAccess.read

baseAccess.readVersions is applied independently in both cases, so inherited access combines read, baseAccess.read, and baseAccess.readVersions with AND semantics.

Boolean results pass through directly. Query-based results from inherited read access are translated to the version table's document structure:

Original document query Collection version query Global version query
{ status: { equals: 'published' } } { 'version.status': { equals: 'published' } } { 'version.status': { equals: 'published' } }
{ id: { equals: documentID } } { parent: { equals: documentID } } Not applicable—globals are singletons without document IDs

Nested and and or constraints are translated recursively. Queries returned from an explicitly configured readVersions function are not changed because they already target the version table.

findVersionByID

Collection version lookups involve two different IDs:

  • The requested version ID is passed to explicit readVersions and baseAccess.readVersions functions.
  • The parent document ID is passed to the inherited read function, matching normal document reads.

Payload resolves the parent ID internally before evaluating inherited access. If access returns a query constraint, the final lookup applies the translated constraint; a boolean result can reuse the prefetched version. The internal parent selection is removed from the response when the caller did not request it.

For findVersions and countVersions, access functions receive id: undefined because those operations do not target a single record.

Breaking Changes

Projects with versions enabled that omit readVersions now restrict version history using their existing read access. Projects that intentionally want version history to remain independently available to any authenticated user must configure that behavior explicitly:

 access: {
   read: customDocumentReadAccess,
+  readVersions: ({ req }) => Boolean(req.user),
 }

Adds unit and integration coverage for boolean, query-based, mixed, and ID-aware access across collection and global findVersions, countVersions, and findVersionByID operations.

PYLD-3081

@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖

Meta File Out File Size (raw) Note
packages/next/meta_index.json esbuild/index.js 214.77 KB ✅ No change
packages/payload/meta_index.json esbuild/index.js 1.86 MB ⚠️ +1.98 KB (+0.1%)
packages/payload/meta_shared.json esbuild/exports/shared.js 553.30 KB ✅ No change
packages/richtext-lexical/meta_client.json esbuild/exports/client_optimized/index.js 285.41 KB ✅ No change
packages/ui/meta_client.json esbuild/exports/client_optimized/index.js 36.54 KB ✅ No change
packages/ui/meta_shared.json esbuild/exports/shared_optimized/index.js 18.95 KB ✅ No change
Largest paths These visualization shows top 20 largest paths in the bundle.

Meta file: packages/next/meta_index.json, Out file: esbuild/index.js

Path Size
../../node_modules ${{\color{Goldenrod}{ ████████████████████████▊ }}}$ 99.0%, 210.74 KB
dist/adapters/router.js ${{\color{Goldenrod}{ }}}$ 0.3%, 718 B
dist/adapters/server.js ${{\color{Goldenrod}{ }}}$ 0.3%, 533 B
dist/adapters/layout.js ${{\color{Goldenrod}{ }}}$ 0.2%, 526 B
dist/adapters/views.js ${{\color{Goldenrod}{ }}}$ 0.2%, 409 B
dist/esbuildEntry.js ${{\color{Goldenrod}{ }}}$ 0.0%, 0 B

Meta file: packages/payload/meta_index.json, Out file: esbuild/index.js

Path Size
../../node_modules ${{\color{Goldenrod}{ ██████████████████ }}}$ 72.1%, 1.33 MB
dist/collections/operations ${{\color{Goldenrod}{ ▋ }}}$ 2.9%, 53.94 KB
dist/fields/hooks ${{\color{Goldenrod}{ ▋ }}}$ 2.5%, 46.15 KB
dist/auth/operations ${{\color{Goldenrod}{ ▏ }}}$ 0.9%, 16.84 KB
dist/globals/operations ${{\color{Goldenrod}{ ▏ }}}$ 0.9%, 16.03 KB
dist/utilities/configToJSONSchema.js ${{\color{Goldenrod}{ ▏ }}}$ 0.9%, 16.02 KB
dist/queues/operations ${{\color{Goldenrod}{ ▏ }}}$ 0.8%, 14.29 KB
dist/fields/config ${{\color{Goldenrod}{ ▏ }}}$ 0.7%, 13.65 KB
dist/utilities/telemetry ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 11.88 KB
dist/fields/validations.js ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 10.82 KB
dist/collections/config ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 10.50 KB
dist/cli/commands ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 9.92 KB
dist/config/orderable ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 8.67 KB
dist/uploads/fetchAPI-multipart ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 8.38 KB
dist/database/migrations ${{\color{Goldenrod}{ }}}$ 0.4%, 7.99 KB
dist/index.js ${{\color{Goldenrod}{ }}}$ 0.4%, 7.77 KB
dist/hierarchy/utils ${{\color{Goldenrod}{ }}}$ 0.4%, 7.66 KB
dist/utilities/entityInputSchema ${{\color{Goldenrod}{ }}}$ 0.4%, 7.34 KB
dist/auth/strategies ${{\color{Goldenrod}{ }}}$ 0.4%, 7.32 KB
dist/config/sanitize.js ${{\color{Goldenrod}{ }}}$ 0.4%, 7.15 KB
(other) ${{\color{Goldenrod}{ ██████▉ }}}$ 27.9%, 516.32 KB

Meta file: packages/payload/meta_shared.json, Out file: esbuild/exports/shared.js

Path Size
../../node_modules ${{\color{Goldenrod}{ ██████████████████████▏ }}}$ 88.7%, 486.64 KB
dist/fields/validations.js ${{\color{Goldenrod}{ ▌ }}}$ 2.0%, 10.79 KB
dist/fields/config ${{\color{Goldenrod}{ ▎ }}}$ 1.1%, 5.83 KB
dist/utilities/traverseFields.js ${{\color{Goldenrod}{ ▏ }}}$ 0.8%, 4.34 KB
dist/utilities/deepCopyObject.js ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 3.52 KB
dist/collections/config ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 3.42 KB
dist/config/orderable ${{\color{Goldenrod}{ ▏ }}}$ 0.6%, 3.13 KB
dist/fields/baseFields ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 2.79 KB
dist/config/client.js ${{\color{Goldenrod}{ ▏ }}}$ 0.5%, 2.69 KB
dist/auth/cookies.js ${{\color{Goldenrod}{ }}}$ 0.3%, 1.55 KB
dist/utilities/flattenTopLevelFields.js ${{\color{Goldenrod}{ }}}$ 0.3%, 1.42 KB
dist/utilities/getVersionsConfig.js ${{\color{Goldenrod}{ }}}$ 0.2%, 1.04 KB
dist/globals/config ${{\color{Goldenrod}{ }}}$ 0.2%, 939 B
dist/utilities/unflatten.js ${{\color{Goldenrod}{ }}}$ 0.2%, 850 B
dist/utilities/flattenAllFields.js ${{\color{Goldenrod}{ }}}$ 0.1%, 794 B
dist/utilities/sanitizeUserDataForEmail.js ${{\color{Goldenrod}{ }}}$ 0.1%, 713 B
dist/auth/extractJWT.js ${{\color{Goldenrod}{ }}}$ 0.1%, 696 B
dist/utilities/getFieldPermissions.js ${{\color{Goldenrod}{ }}}$ 0.1%, 651 B
dist/utilities/fieldPath.js ${{\color{Goldenrod}{ }}}$ 0.1%, 639 B
dist/utilities/getSafeRedirect.js ${{\color{Goldenrod}{ }}}$ 0.1%, 632 B
(other) ${{\color{Goldenrod}{ ██▊ }}}$ 11.3%, 61.78 KB

Meta file: packages/richtext-lexical/meta_client.json, Out file: esbuild/exports/client_optimized/index.js

Path Size
dist/features/blocks ${{\color{Goldenrod}{ ███▎ }}}$ 13.2%, 37.20 KB
dist/lexical/ui ${{\color{Goldenrod}{ ██▉ }}}$ 11.8%, 33.21 KB
dist/lexical/plugins ${{\color{Goldenrod}{ ██▉ }}}$ 11.7%, 33.01 KB
dist/features/table ${{\color{Goldenrod}{ ██▍ }}}$ 9.6%, 27.18 KB
dist/features/link ${{\color{Goldenrod}{ █▋ }}}$ 6.7%, 18.82 KB
dist/features/toolbars ${{\color{Goldenrod}{ █▌ }}}$ 6.2%, 17.45 KB
dist/features/upload ${{\color{Goldenrod}{ █▎ }}}$ 5.0%, 14.24 KB
dist/features/textState ${{\color{Goldenrod}{ ▉ }}}$ 3.9%, 11.08 KB
dist/lexical/utils ${{\color{Goldenrod}{ ▉ }}}$ 3.5%, 10.02 KB
dist/features/relationship ${{\color{Goldenrod}{ ▊ }}}$ 3.3%, 9.43 KB
dist/features/converters ${{\color{Goldenrod}{ ▊ }}}$ 3.0%, 8.40 KB
dist/utilities/fieldsDrawer ${{\color{Goldenrod}{ ▋ }}}$ 2.9%, 8.12 KB
dist/features/debug ${{\color{Goldenrod}{ ▋ }}}$ 2.6%, 7.40 KB
dist/lexical/config ${{\color{Goldenrod}{ ▍ }}}$ 1.8%, 5.14 KB
dist/features/lists ${{\color{Goldenrod}{ ▎ }}}$ 1.3%, 3.67 KB
dist/features/format ${{\color{Goldenrod}{ ▎ }}}$ 1.2%, 3.28 KB
dist/lexical/LexicalEditor.js ${{\color{Goldenrod}{ ▎ }}}$ 1.1%, 3.23 KB
dist/features/horizontalRule ${{\color{Goldenrod}{ ▎ }}}$ 1.1%, 3.18 KB
dist/field/Field.js ${{\color{Goldenrod}{ ▎ }}}$ 1.0%, 2.88 KB
dist/lexical/nodes ${{\color{Goldenrod}{ ▏ }}}$ 0.9%, 2.66 KB
(other) ${{\color{Goldenrod}{ █████████████████████▋ }}}$ 86.8%, 245.00 KB

Meta file: packages/ui/meta_client.json, Out file: esbuild/exports/client_optimized/index.js

Path Size
dist/exports/client ${{\color{Goldenrod}{ █████████████████████████ }}}$ 100.0%, 26.90 KB

Meta file: packages/ui/meta_shared.json, Out file: esbuild/exports/shared_optimized/index.js

Path Size
dist/graphics/Logo ${{\color{Goldenrod}{ ███████▋ }}}$ 30.5%, 5.57 KB
../../node_modules ${{\color{Goldenrod}{ ███▌ }}}$ 14.5%, 2.65 KB
dist/graphics/Icon ${{\color{Goldenrod}{ ██ }}}$ 8.3%, 1.51 KB
dist/utilities/formatDocTitle ${{\color{Goldenrod}{ █▊ }}}$ 7.2%, 1.32 KB
dist/providers/TableColumns ${{\color{Goldenrod}{ █▏ }}}$ 4.7%, 866 B
dist/utilities/getGlobalData.js ${{\color{Goldenrod}{ █ }}}$ 4.2%, 762 B
dist/utilities/api.js ${{\color{Goldenrod}{ █ }}}$ 4.1%, 756 B
dist/utilities/groupNavItems.js ${{\color{Goldenrod}{ █ }}}$ 4.1%, 745 B
dist/elements/Translation ${{\color{Goldenrod}{ ▋ }}}$ 2.7%, 493 B
dist/utilities/handleTakeOver.js ${{\color{Goldenrod}{ ▌ }}}$ 2.4%, 440 B
dist/utilities/traverseForLocalizedFields.js ${{\color{Goldenrod}{ ▌ }}}$ 2.3%, 419 B
dist/elements/withMergedProps ${{\color{Goldenrod}{ ▍ }}}$ 1.9%, 339 B
dist/utilities/getNavGroups.js ${{\color{Goldenrod}{ ▍ }}}$ 1.9%, 338 B
dist/utilities/getVisibleEntities.js ${{\color{Goldenrod}{ ▍ }}}$ 1.8%, 329 B
dist/elements/WithServerSideProps ${{\color{Goldenrod}{ ▎ }}}$ 1.3%, 232 B
dist/layouts/Root ${{\color{Goldenrod}{ ▎ }}}$ 1.3%, 230 B
dist/utilities/handleGoBack.js ${{\color{Goldenrod}{ ▎ }}}$ 1.0%, 180 B
dist/fields/mergeFieldStyles.js ${{\color{Goldenrod}{ ▏ }}}$ 0.9%, 158 B
dist/forms/Form ${{\color{Goldenrod}{ ▏ }}}$ 0.8%, 152 B
dist/utilities/handleBackToDashboard.js ${{\color{Goldenrod}{ ▏ }}}$ 0.8%, 152 B
(other) ${{\color{Goldenrod}{ █████████████████▍ }}}$ 69.5%, 12.68 KB
Details

Next to the size is how much the size has increased or decreased compared with the base branch of this PR.

  • ‼️: Size increased by 20% or more. Special attention should be given to this.
  • ⚠️: Size increased in acceptable range (lower than 20%).
  • ✅: No change or even downsized.
  • 🗑️: The out file is deleted: not found in base branch.
  • 🆕: The out file is newly found: will be added to base branch.

@paulpopus

Copy link
Copy Markdown
Member

Also test coverage is needed for these scenarios:

  1. A collection with versions enabled and an id-based read function, for example read: ({ id }) => id === allowedDocID, with no explicit readVersions. Call payload.findVersionByID for a version of the allowed document and for a version of a different document. Confirm the correct result for each case.
  2. The same id-based read function used with payload.findVersions and payload.countVersions. Confirm id is undefined in these list operations and the fallback behaves as expected.
  3. A read function that combines an id check with a Where query fallback. Confirm both branches interact correctly with the readVersions inheritance.

Are globals being updated in a separate PR with the same treatment?

@paulpopus paulpopus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test cases to add for this change:

  1. A test that calls getEntityPermissions (or docAccessOperation) for the existing inherited-read-versions collection, using its id-based read function, for a document that read denies. Confirm the readVersions permission matches the direct result of read, not the opposite.
  2. A global collection with an id-based read function, checked through findGlobalVersionByID. The current global test only uses a Where-only read function, so it cannot catch a wrong id value reaching read.
  3. The new lookup inside the readVersions fallback in defaults.ts, and the lookup already inside findVersionByID.ts, now both query the same version row for the same findVersionByID call. Combining them would avoid a second database round trip on every call.

paulpopus
paulpopus previously approved these changes Aug 7, 2026
paulpopus
paulpopus previously approved these changes Aug 12, 2026
@DanRibbens

DanRibbens commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

findVersionByID (both collection and global) doesn't call sanitizeWhereQuery on the combined fullWhere. Before this PR that was a rarely-hit gap because readVersions had to be explicitly configured to return a query. With inherited-from-read access, any collection whose read returns a constraint referencing a virtual field will silently break findVersionByID.

Repro (sketch): a collection with a field like { name: 'authorName', type: 'text', virtual: 'author.name' } and read: ({ req }) => ({ authorName: { equals: req.user.name } }). Inherited readVersions rewrites that to { 'version.authorName': { equals: … } } via appendVersionToQueryKey, combineQueries merges it into { id: { equals: id } }, and the result goes straight to payload.db.findVersions / findGlobalVersions — no virtual-field rewrite ever happens.

findVersions (.../collections/operations/findVersions.ts:112) and countVersions (.../countVersions.ts:76) already run sanitizeWhereQuery({ fields: versionFields, … }) after combineQueries, and non-versioned findByID (.../findByID.ts:138) does the same on collection fields — so the fix would just mirror that in the two version-by-ID operations, using buildVersionCollectionFields / buildVersionGlobalFields. Not a security bypass — a functional gap this PR widens.

Follow-up PR with the fix + regression test: #17804 (based on this branch).

@DanRibbens DanRibbens left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get #17804 reviewed and merged before we merge this PR

@DanRibbens DanRibbens changed the title fix: inherit read access for collection versions fix!: inherit read access for collection versions Aug 15, 2026
JarrodMFlesch and others added 3 commits August 17, 2026 13:33
…ons-access-control

# Conflicts:
#	packages/payload/src/collections/operations/findVersionByID.ts
#17804)

## Summary

- Follow-up to #17634. Both collection and global `findVersionByID`
merge the version id lookup with the `readVersions` access result and
hand the merged `where` to the DB layer without running
`sanitizeWhereQuery`. `findByID`, `findVersions`, and `countVersions`
all sanitize the merged `where` in the same spot, so relationship-backed
virtual fields resolve to their underlying paths.
- With the inherited-from-`read` defaults introduced in #17634, any
collection or global whose `read` access returns a query referencing a
virtual field silently breaks `findVersionByID` — the constraint (e.g.
`version.relatedLabel` where `relatedLabel` is `virtual:
'related.label'`) never gets rewritten so the version lookup returns
nothing and the caller sees Forbidden/NotFound.
- Mirror `sanitizeWhereQuery({ fields: versionFields, payload, where })`
from the sibling operations in both `findVersionByID` variants.
- Adds a regression test to `test/access-control/int.spec.ts` that fails
on the base PR branch and passes with this fix.

## Test plan

- [x] `pnpm run build:core`
- [x] `pnpm run test:int access-control` (50 passed, 6 skipped)
- [x] Confirmed the regression test fails without the sanitize call and
passes with it

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
Co-authored-by: Jarrod Flesch <[email protected]>
…ons-access-control

# Conflicts:
#	packages/payload/src/collections/config/defaults.ts
#	packages/payload/src/collections/config/sanitize.ts
#	test/access-control/int.spec.ts
#	test/types/types.spec.ts

@paulpopus paulpopus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments, written with AI

(async (args) => {
const result = await effectiveRead({ ...args, id: undefined })

return hasWhereAccessResult(result) ? appendGlobalVersionToQueryKey(result) : result

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wrapper changes relatedLabel to version.relatedLabel. Global find, count, restore, and collection or global permission paths send it to the database without sanitizeWhereQuery. Valid virtual-field access then returns no versions or no permission. Sanitise each path and add regression tests.


If the Collection has [Versions](../versions/overview) enabled, the `readVersions` Access Control function determines whether or not the currently logged in user can access the version history of a Document.

If `readVersions` is not configured, Payload uses the Collection's `read` Access Control. Boolean results are preserved, and query constraints are automatically adjusted to target fields within the stored version document.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fallback changes omitted readVersions from authenticated-user access to inherited read access. A public read function can therefore expose historical or unpublished versions to unauthenticated users. Add a v4 migration entry with both outcomes and show how to preserve authenticated-only access.

`SanitizedCollectionConfig` and its auth type no longer use `DeepRequired`. This reduces TypeScript checker work and makes optionality match runtime defaults.

Properties Payload does not default, such as `access.readVersions`, `auth.cookies.domain`, `auth.useAPIKey`, and `auth.depth`, now require undefined handling:
Properties Payload does not default, such as `auth.cookies.domain`, `auth.useAPIKey`, and `auth.depth`, now require undefined handling:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs/migration-guide/v4.mdx:432-437 still says SanitizedGlobalConfig.access.readVersions can be undefined. This change makes it required at runtime and in the exported type. Update the optional-property list and remove the undefined check.

@JarrodMFlesch
JarrodMFlesch dismissed DanRibbens’s stale review September 22, 2026 13:27

This was accounted for. We merged the referenced PR.

@JarrodMFlesch
JarrodMFlesch merged commit b0e85ef into main Sep 22, 2026
283 of 285 checks passed
@JarrodMFlesch
JarrodMFlesch deleted the codex/pyld-3081-versions-access-control branch September 22, 2026 13:27
Ducksss added a commit to Ducksss/payload-components that referenced this pull request Oct 4, 2026
Payload 4 is in canary (4.0.0-canary.37) and every install into a v4
project was refused. Allow major 4 in both support-matrix targets and in
every manifest (payloadMajors [3, 4], payload peer "^3.0.0 || ^4.0.0-0"),
the component template, and the `new` scaffold.

Widening the ranges alone was not enough: semver.intersects without
includePrerelease tests each comparator on its own, so "<5.0.0-0" rejects
4.0.0-canary.37 and a pinned prerelease never intersects "^4.0.0-0". The
"-0" bounds on every required range keep prereleases inside their major.

detectProject now names an unsupported Payload or Next.js major instead of
reporting "Unsupported project shape", which is what a v4 project got.

The base Pages collection gains an explicit readVersions (signed-in only).
Payload 4 inherits read access for versions (payloadcms/payload#17634), so
visitors could list every previously published version. Payload 3 already
requires a user here, so this is a no-op on v3.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ducksss added a commit to Ducksss/payload-components that referenced this pull request Oct 4, 2026
* cli(feat): accept Payload 4 projects alongside Payload 3

Payload 4 is in canary (4.0.0-canary.37) and every install into a v4
project was refused. Allow major 4 in both support-matrix targets and in
every manifest (payloadMajors [3, 4], payload peer "^3.0.0 || ^4.0.0-0"),
the component template, and the `new` scaffold.

Widening the ranges alone was not enough: semver.intersects without
includePrerelease tests each comparator on its own, so "<5.0.0-0" rejects
4.0.0-canary.37 and a pinned prerelease never intersects "^4.0.0-0". The
"-0" bounds on every required range keep prereleases inside their major.

detectProject now names an unsupported Payload or Next.js major instead of
reporting "Unsupported project shape", which is what a v4 project got.

The base Pages collection gains an explicit readVersions (signed-in only).
Payload 4 inherits read access for versions (payloadcms/payload#17634), so
visitors could list every previously published version. Payload 3 already
requires a user here, so this is a no-op on v3.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* cli(fix): scaffold the pinned Payload 4 version and template in the fresh smoke

create-payload-app 4 renamed --version to --payload-version. Its argument
parser is permissive, so the old flag was silently dropped and a smoke
pinned to 4.0.0-canary.37 scaffolded whatever the `canary` dist-tag
resolved to. Pass the flag each major reads, and both for a dist-tag.

create-payload-app 4 also downloads its template from the payloadcms/payload
main branch instead of the release it installs. Main had already renamed
createLocalReq (payloadcms/payload#18287, after canary.37 shipped), so the
pinned scaffold failed tsc in the template's own seed route. Pin a v4
template to the release tag with --branch when that tag exists; v3 keeps
its CLI's 3.x branch and needs no network check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci(feat): add a non-blocking nightly Payload canary smoke

The nightly fresh smoke follows Payload `latest`, so nothing exercised the
next major before it ships. Run the same bare and website scenarios against
`npm view payload@canary version` on Node.js 24 (Payload 4 requires 24.15+),
schedule-only and with continue-on-error, outside pr-gate.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* cli(fix): widen related-posts to Payload 4 and hold manifests to the support matrix

related-posts (#600) landed declaring Payload 3 only, so once Payload 4 is
allowed it would be the one component refusing v4 projects. Give it the
same supports and peer range as every other manifest; manifest-only, so the
versioned-source contract needs no version bump.

payload-components-support-matrix.int.spec.ts makes this class of drift
fail: every manifest, the component template and the `new` scaffold must
declare exactly the Payload and Next.js majors their targets allow, with peer
ranges that cover each major's stable line and the newest Payload major's
prereleases. A v3-only fixture keeps the guard from passing vacuously.
buildManifest is exported so the scaffold's output can be checked directly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

findVersionByID (collection and global) never runs sanitizeWhereQuery on the merged access-control where, unlike every other read operation

3 participants