Repository navigation
test(e2e): wait on the fork response, not the transient "Fork of" title - #19063
Conversation
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] 0533ceb Description read[DESCRIPTION-READ] a94ac67088aac4d97c3b5bcdec7467597961945b94b03f32f2ce45e72d110349 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 |
First Principles Review (Opus 5.5, fork) — ⏭️ skippedRevision |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm that [DESIGN-REVIEWED] 0533ceb Description read[DESCRIPTION-READ] 2ef74d974eaeb9e96226f4473d90bbb5f360f7d53e9ea272f89e19a86d2d0529 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 |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
|
Disposition for head 1e99741. Design (PASS) punchline, sidebar stub rows: checked. A windowed row renders as a stub only when it is not the active one. Backend Tests (Windows) (2): E2E (stub ACP backend, offline): passed on this head with no retry. First-pass check: R1-R8 OK. The diff is test-only, Live decisions has no entry for this PR, and no Python changed, so the R8.2 Python lint and mypy floor does not apply. Website typecheck and eslint ran, and so did every |
1e99741 to
2d8d860
Compare
|
Disposition for head 2d8d860, Design (PASS) punchline on stub rows. This is the same point as on 1e99741 and the code has not changed. A row stubs only when it is not active. Backend Tests (Windows) (2) passed on this head, so the #14218 flake did not recur. E2E (stub ACP backend, offline) passed with no retry on both heads. |
|
Delta for head
Local runs on the harness gateway (stub ACP backend, Chromium, Independent review dispositions (APPROVE on
|
2d8d860 to
76ed017
Compare
The fork spec asserted that some "Fork of " text became visible after clicking Fork. The child is born as "↳ Fork of <parent>", but its background title pass renames it straight after the fork answers, and the stub ACP backend answers that pass at once. Under load the rename lands before the new row paints, so the text never appears and the spec only passes on a retry. Wait on the POST /fork response instead: assert its birth title, then the switch to the returned key and the "↳ " marker on that key's sidebar row, which survives the rename. Fixes kirodotdev#19049
76ed017 to
0533ceb
Compare
|
Delta for head The previous head
All review lanes on the previous head were PASS or no-findings (Opus, GPT, Design, UX; First Principles skipped because the diff ships no capability), so no per-span dispositions are owed. First-pass check: R1-R8 OK (spec-only; no new state, no sensitive path, no new strings). |
|
Disposition for head 0533ceb, Design (PASS) punchline on the sidebar selectors. Confirmed in the app source: |
iamwhatever
left a comment
There was a problem hiding this comment.
This de-flakes the offline E2E fork spec at its cause. The test was asserting a birth title, "↳ Fork of ", that refresh_forked_title deliberately replaces moments later, and the stub backend answers that title pass at once. The spec now waits on the POST /fork response. It asserts the response is OK, that its key differs from the parent's, and that its title is the birth title. It then waits for the URL to switch to that key and for that key's sidebar row title to start with the ↳ marker, which survives the rename. I checked the contract the spec relies on. api_chat_slot_fork returns key and title (chat_fork.py:396-401). The sidebar row carries data-slot-key={s.key} with a nested data-session-title (ChatSidebar.tsx:1679, 2133). The only POST ending in /fork on this page is forkChatSlot. The author shows 29/30 failures with the old spec under 4x CPU throttling and 30/30 passes with the new one. Product code is untouched, checks are green, and both AI lanes pass. — crew-pr-reviewer (deep re-check)
Problem / Motivation
Goal: The offline E2E job stops failing on
fork.spec.ts"fork button appears on assistant message and creates new tab", which passes only on a retry under load.On #19040 (a diff with no fork code) the "E2E (stub ACP backend, offline)" job failed with
1 spec(s) passed only on a retry, ceiling is 0: fork.spec.ts > Fork Session E2E > fork button appears on assistant message and creates new tab. The first attempt timed out atawait expect(page.getByText(/Fork of /).first()).toBeVisible({ timeout: 10000 })with "element(s) not found".Why it matters
The suite's flaky ceiling is 0, so every PR that draws this race goes red on a job unrelated to its diff and has to push again to clear it.
Not a goal
chat_fork.fork_slot,refresh_forked_title). Renaming a fork straight after it opens is the shipped behaviour from fix(chat): refresh stale inherited titles after conversation fork #18231.Forking from long timestamped sessions) is left alone: its imported session has no person-typed question, sorefresh_forked_titlereturns without renaming and itsFork ofassertion cannot race.What changed (motivation → approach → change)
Fork oftext never appears after clicking Fork.fork_slotbirths the child as↳ Fork of <parent>, answers the POST, then startsrefresh_forked_title. That pass renames the child to↳ <generated title>and pushesslot_title. The stub ACP backend answers the title prompt at once (pong from the fake ACP backend), so on a loaded runner the rename lands before the client paints the new row and the birth title is never on screen. The failing page snapshot shows the fork row as↳ pong from the fake ACP backend./forkresponse. Assert it is OK, that itstitleis the↳ Fork ofbirth title, that the URL switches to the returned key, and that the sidebar row for that key ([data-slot-key] [data-session-title]) starts with the↳marker, which survives the rename. Each step is synchronised on a specific response or element for the fork's own key, not a fixed wait or a page-wide text match.Backwards compatibility
Compatible: test-only change to one Playwright spec.
Removes nothing: no product code, route, key or record changes.
Tests
website/playwright/fork.spec.ts"creates new tab": now pins a fork key that differs from the parent's, the fork response's birth title, the switch to the fork's key, and the↳marker on that key's row. The URL and row assertions keep the 10 s budget of the line they replace.Local runs against the harness gateway (
spawn_feature_gateway, stub ACP backend),--retries=0, Chromium CPU throttling via CDPEmulation.setCPUThrottlingRatein a scratch copy of the spec:--repeat-each=30 --workers=2: 29 failed, all at theFork ofline.--repeat-each=30 --workers=2: 61 passed (60 plus setup).--repeat-each=15 --workers=2, 31 passed (30 plus setup); throttle 4x--repeat-each=10, 10/10 passed.Gates on the head: website
npm run typecheck, eslint and a stricttsc --noEmiton the spec;scripts/check_*.pyguards, including comment-history and changelog-history against origin/main, harness parity from the merge-base, and docs_lint.Manual verification
N/A: the change is a Playwright spec, and it was exercised above under load.
Related Issues
Fixes #19049
Pattern harvest
Rule candidate: review-prompt
Pattern: an E2E assertion on a value the app deliberately replaces moments later (a birth title, a placeholder, a pending label) in place of the response or state that carries it.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.