Skip to content

adopt(payload-refresh): ready to send: list view re-requests pending relationship documents, fix rebased to Payload main and 3.x - #156

Open
MeharPro wants to merge 1 commit into
mainfrom
claude/sharp-fermat-vk8ce1
Open

MeharPro wants to merge 1 commit into
mainfrom
claude/sharp-fermat-vk8ce1

Conversation

@MeharPro

@MeharPro MeharPro commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Status: ready to send. The sender's remaining steps are by hand: push the reproduction repository, reproduce the bug in a browser, run the test, read the diff, then send.

What was prepared

The 2026-10-24 Payload hunt found one bug, and it still exists today. In the list view, RelationshipProvider asks again for every relationship document whose batch is still in flight, each time its state changes. Both of the hunt's patches still apply as they are: main is now Payload v4 (4.0.0-beta.6) and v3 lives on the 3.x maintenance branch. Only the test changed: its cleanup moved from try/finally into a test.afterEach, because Payload's AI reviewer prompt flags try/finally in e2e tests. I re-ran everything without GenClass and rewrote the drafts for Payload's current issue form and PR template. The issue form now requires a public reproduction repository, so its files are prepared too.

Note: the swarm brief names the branch adopt/payload-refresh. This session was told to push only to claude/sharp-fermat-vk8ce1, so the work is on that branch.

Files (all under docs/adoption/hunts/)

  • payload.md: a new section at the end, "Refresh (2026-11-03)". It covers what changed upstream, the re-runs, the tracker search, the problems met and the status.
  • payload-issue.md: rewritten. It holds the "before sending" checklist (done items and by-hand items), the issue in the "Functionality Bug (v3)" form, and the PR for main in the What/Why/How template. Both carry the AI-assistance paragraph.
  • payload-refresh-main.patch: against payload main c2a3239.
  • payload-refresh-3x.patch: against 3.x 49b3c0b, for a backport.
  • payload-refresh/:
    • repro/: the reproduction-repo files, repro.patch and the repo README.
    • login.mjs, throttle-control.mjs, run-suite.sh, playwright.local.config.ts: the harness.
    • out/: small logs.
    • README.md: what each file is.
  • README.md: adds the Payload row.

To send (a person, from a personal account)

  1. Make the reproduction repo. Run npx create-payload-app@3.92.1 -n payload-relationship-batch-repro -t blank --db sqlite ... and then git apply payload-refresh/repro/repro.patch; the exact commands are in repro/README.md. Push it public. Run npm run dev, open the posts list with DevTools open, and confirm you see the second /api/categories request. Run npx payload info.
  2. Read both patches. In a Payload checkout, run the new test unfixed and fixed, using MongoDB through pnpm docker:start as Payload's CI does. Run pnpm oxfmt --check and pnpm oxlint on the two files.
  3. Search the tracker again using the words in the checklist. Then open the issue with the text in payload-issue.md: paste the repo link and the payload info output.
  4. Fork payloadcms/payload and apply payload-refresh-main.patch as one commit titled fix(ui): do not re-request relationship documents whose batch is still pending. Open the PR against main with "Fixes #" and leave "Allow edits by maintainers" on. Offer the 3.x backport in the PR rather than opening a second PR.
  5. If asked: the documents shown are always right, so this is about redundant requests only. A maintainer's content-branching PR (feat(ui): preserve branch context across admin workflows payloadcms/payload#19110) touches the same provider, and the patch applies cleanly on top of it.

Numbers (all re-measured today, without GenClass)

check result
new test, main, SQLite, --repeat-each=3 unfixed: fails 3 of 3 (received 4, 5 and 7 ids where 3 are expected); fixed: passes 3 of 3
whole relationship spec, main (40 tests, 6 skipped) unfixed: 25 passed, 9 failed; fixed: 27 passed, 7 failed. The 7 are the same tests on both codes. Unfixed's other 2 are the new test (fails by design) and a drawer test that was flaky in the hunt on both codes
reproduction on payload 3.92.1, 1 s read delay on categories unfixed: 6 of 6 runs repeat the batch (second request 135–199 ms after the first); with the fix in the client bundle: 0 of 6
controls on 3.92.1, no route delay hook on: 3 of 3 repeat; hook removed: 0 of 3 as served, 0 of 3 under DevTools "Slow 4G" values
React compiler fixed _c(19), unfixed _c(15), on main (compiler 1.0.0) and 3.x (19.1.0-rc.3)
lint formatter clean. Nothing reported in the provider. The new test lines get 3 warnings (two discouraged wait(500) calls and one non-retried assertion); the spec already has warnings of these kinds

The new test was not run on 3.x. MongoDB could not be installed: its download host, fastdl.mongodb.org, is denied by this container's network policy. On SQLite and Postgres the suite's own seed fails on 3.x with readOnlySlug / slug invalid, unfixed too. On 3.x the two files are byte-identical to v3.92.0, where the hunt's MongoDB runs failed 3 of 3 unfixed and passed 3 of 3 fixed. www.gravatar.com is also denied here. Its console error fails every Payload e2e test, so I disabled image loading in the local Playwright config only; that change is not part of the patch.

Tracker: I searched issues and PRs, 3 s apart, for RelationshipProvider, loadRelationshipDocs, "where[id][in]", unreturnedIDs, relationship requested twice, relationship cell loading and relationship list view duplicate requests. Nothing was filed on this bug.

Policy: Payload has no restrictive AI policy. CONTRIBUTING has an "AI Code Tool Compatibility" section, and there is no CLA or DCO.

Problems with GenClass itself

None found: GenClass was not run in this refresh, as the brief asked only for the fix, the test and the GenClass-free reproduction. One correction to the hunt report: its "ESLint reports nothing in the new test's lines" does not hold. The same 3 warnings appear with the hunt's version of the test. This is recorded in the Refresh section.

Time spent

About 1 h 20 min of session time, 16:34 to 17:55 UTC.


Generated by Claude Code

…nd 3.x

The hunt's fix for the list view's repeated relationship batch requests, refreshed for
sending (docs/adoption/swarm.md section 4.2):

- payload-refresh-main.patch (payload main c2a3239, 4.0.0-beta.6) and
  payload-refresh-3x.patch (3.x 49b3c0b, 3.92.1): the fix unchanged, the test's
  cleanup moved from try/finally into a test.afterEach
- on main (SQLite): the new test fails 3 of 3 unfixed, passes 3 of 3 fixed; the
  relationship spec has no failure with the fix that it lacks without it
- on 3.92.1 without GenClass: 6 of 6 runs repeat the batch, 0 of 6 with the fix;
  controls without the delay hook 0 of 3 as served and under Slow 4G
- payload-issue.md rewritten to the current v3 bug form and PR template, with the
  disclosure paragraph and the before-sending list; payload-refresh/repro/ is the
  public reproduction the issue form requires
- payload.md gains "Refresh (2026-11-03)"; hunts/README.md gains the Payload row

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fqwfq1vVudbsBpQRWUMytH

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants