Skip to content

test(e2e): wait for the slot read in spec 22 and fix every spec with that race - #38667

Merged
bolichen97 merged 1 commit into
mainfrom
crew/LinuxFlackyGuard/session-tags-drag-flaky
Nov 17, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
crew/LinuxFlackyGuard/session-tags-drag-flaky

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: spec 22 of website/playwright/session-tags-e2e.spec.ts passes on its first attempt, and the next Playwright spec that changes a slot after goto('/chat') waits for the page's own slot read before the change, so the race fixed in spec 8 does not come back a third time.

The race fixed for spec 8 of website/playwright/session-tags-e2e.spec.ts came back in spec 22 of the same file. Spec 22 drags a card with DragEvents instead of posting the drop over request, and the fix for spec 8 was applied to spec 8 only. Spec 22 then reddened the E2E job on unrelated PRs, for example run 44110067591, job 134138960142 on PR #38405:

Error: expect(locator).toBeVisible() failed
Locator: locator('[data-testid="column-aae683c4bbe4"] [data-slot-key="chat-65-1794929432"]')
Error: element(s) not found
    at website/playwright/session-tags-e2e.spec.ts:503:101

The page snapshot in that job's artifact still shows the card in ToDo with a ToDo chip, while the server poll just before had read [done]. Tracked in issue #37561.

Why it matters

Spec 22 reds the E2E job on PRs that do not touch the board. The spec change here is byte-for-byte the one in PR #38482, so whichever merges first, the other rebases cleanly. It is carried here because the documentation states the fix and its measurement, and that must stay true of the tree whatever the merge order. The docs then say why the race came back and what the author of the next such fix must do.

Not a goal

  • The product race: a slot-list reply older than a pushed list can still replace it on screen. That needs a version check on the read (fetchSlots.fulfilled), which is product code.

What changed (motivation -> approach -> change)

  • website/playwright/session-tags-e2e.spec.ts spec 22: registers page.waitForResponse for the page's GET /api/chat/slots before page.goto and awaits its finished() before the drag, the same wait spec 8 has. The drag, both assertions and their timeouts are unchanged.
  • docs/system-specs/common/testing-conventions.md, § A Playwright spec that passed only on a retry, the "state from before an API write" case: says the spec 8 fix covered spec 8 only, that a row on screen is no barrier (the socket's connect snapshot renders it while the read is in flight), and that a fix for this shape fixes every test with it in the same change. It names the search (goto('/chat'), then a slot write, then a page assertion on that slot), gives a WRONG/RIGHT pair for the drag form, and the measured numbers below.
  • website/docs/testing.md, § Rules every test keeps, Playwright: one bullet with the same rule (the file and its sibling specs), pointing at that section.

Sibling sweep of website/playwright/ for goto('/chat') followed by a slot write (/drop, /tags, /folder, DragEvent('drop')): specs 8 and 22 of session-tags-e2e.spec.ts assert the page after the write (8 already waits; 22 waits with this change). Specs 21 and 23 and session-tags-folders.spec.ts F6 assert only over request; F5 and F7ui reload before they assert.

Backwards compatibility

Compatible: one spec gains a wait on a real response, plus documentation. No product code, config or CI change; no assertion, timeout or step is removed.

Tests

Changed test: spec 22 of website/playwright/session-tags-e2e.spec.ts. Measurements behind the documented numbers, on Linux (32 cores, aarch64), Chromium, the harness gateway (spawn_feature_gateway, stub ACP backend), --retries=0 --workers=1, spec 22 only (--grep "22\. drag"):

run base b8bd2d33c2 this PR
unforced, all 32 cores busy, --repeat-each=30 30/30 pass 30/30 pass
forced, idle, --repeat-each=10 0/10 pass, each the CI error 10/10 pass
forced, all 32 cores busy, --repeat-each=20 0/20 pass, each the CI error 20/20 pass

Forced means a local-only page.route held the page's first GET /api/chat/slots reply (fetched from the gateway at once) until the drop's push had moved the card into the Done column, then fulfilled it. That is the order the CI snapshot shows. The probe is not committed.

python scripts/docs_lint.py: all documentation checks passed. python -m pytest -n0 test/test_flake_pattern_ratchet.py: 71 passed. npx tsc --noEmit -p tsconfig.json: clean.

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 653855eb0bf1c307d5f83ec87e830c253b13f4aa ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 653855eb0bf1c307d5f83ec87e830c253b13f4aa — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing to check. The diff only edits two docs files (testing-conventions.md and website/docs/testing.md), so no user-visible control changes and no screenshot is needed.

[UX-REVIEWED] 653855e

Description read

[DESCRIPTION-READ] c1f8472dab3b895123264d2a3c9896fd37d83f02916fa23272343e2ffec92c4c

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 653855eb0bf1c307d5f83ec87e830c253b13f4aa — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Docs-only change, nothing in it blocks; the description doesn't match the diff.

Notes

  • Phantom description: "What changed" and "Tests" say spec 22 of website/playwright/session-tags-e2e.spec.ts gains the waitForResponse wait. The diff touches only testing-conventions.md and website/docs/testing.md. The wait is already in the tree (lines 484–491), apparently from test(e2e): wait for the page's slot read before the drag in spec 22 #38482. Before merge, change the description to say this PR documents a fix that has already landed.

[DESIGN-REVIEWED] 653855e

Description read

[DESCRIPTION-READ] d75537bac353f81c21a801f6ca3eafcccc2913861318bca5d424b7d7e570a93d

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 653855eb0bf1c307d5f83ec87e830c253b13f4aa — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 653855e

Verdict parsed from the review's SHA-scoped output markers for commit 653855eb0bf1c307d5f83ec87e830c253b13f4aa.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 653855eb0bf1c307d5f83ec87e830c253b13f4aa false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 653855eb0bf1c307d5f83ec87e830c253b13f4aa and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 653855e

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 653855eb0bf1c307d5f83ec87e830c253b13f4aa false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 force-pushed the crew/LinuxFlackyGuard/session-tags-drag-flaky branch from 42923db to 653855e Compare November 17, 2026 17:33
@bolichen97 bolichen97 changed the title docs(testing): fix every spec with the slot-read race, not only the one that went red test(e2e): wait for the slot read in spec 22 and fix every spec with that race Nov 17, 2026
@bolichen97
bolichen97 marked this pull request as ready for review November 17, 2026 17:33
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 17, 2026 17:33
@bolichen97
bolichen97 requested a review from CrysisDeu November 17, 2026 17:33
@bolichen97
bolichen97 enabled auto-merge (squash) November 17, 2026 17:33
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 17, 2026
@bolichen97
bolichen97 merged commit a1f242e into main Nov 17, 2026
162 of 169 checks passed
@bolichen97
bolichen97 deleted the crew/LinuxFlackyGuard/session-tags-drag-flaky branch November 17, 2026 19:30
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 17, 2026
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.

1 participant