qa: run-trace-toggle 在 run-trace-panel 里定位不到——DA-19c 同 SHA 三趟 3/3 稳定红(每趟吃满 180s),ui-refinement 卡同一个定位器
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 969
Description
## 结论
同 SHA 三趟 `e2e-full` 的 `chat-read` 里,**唯一的稳定红**除 S8(#3119 已记)外就是
`copilotkit-v2-tool-rendering.spec.ts:154`(DA-19c),三趟**失败模式逐字相同**:
在 `run-trace-panel` 里等不到 `run-trace-toggle`,一路吃满 180s 超时。
同一轮里 `agent-workbench-ui-refinement.spec.ts:9`(趟 1 红)**卡在同一个定位器上**,
只是它用 30s 断言超时收场,红得比较快。两条大概率是同一个缺陷的两种表现。
判定类型:**待分诊**——我没有区分开「产品真的不再渲染 toggle」与「两条 spec 的锚点过时」,
这需要看实现,超出我只验证取证的边界。
## 实测 SHA
`9de57821e3fe034796c813fd758e785cab204e43`(当时的 `origin/main`,含 #3127)。
同一 SHA 三趟 `workflow_dispatch`:
[34238087140](https://github.com/boardx/workspacex/actions/runs/34238087140)、
[34238069791](https://github.com/boardx/workspacex/actions/runs/34238069791)、
[34238127530](https://github.com/boardx/workspacex/actions/runs/34238127530)。
三趟日志都有成片 `✓`/`✘` 行(非 #3128 的零执行)。
## 证据
**DA-19c —— 三趟 3/3 红,模式完全一致:**
```
2) [chat-read] › e2e/copilotkit-v2-tool-rendering.spec.ts:154:5 › DA-19c search_documents 定制卡片……
Test timeout of 180000ms exceeded.
Error: locator.getAttribute: Test timeout of 180000ms exceeded.
Call log:
- waiting for getByTestId('copilotkit-v2-tool-search-documents').first()
.locator('xpath=ancestor::*[@data-testid="run-trace-panel"][1]')
.getByTestId('run-trace-…')
106 | if (await toggle.getAttribute("aria-expanded") === "false") await toggle.click();
at expandToolDetails (apps/web/e2e/copilotkit-v2-tool-rendering.spec.ts:106:20)
at apps/web/e2e/copilotkit-v2-tool-rendering.spec.ts:212:11
```
**ui-refinement —— 趟 1 红(趟 2/3 绿),同一个定位器:**
```
2) [chat-read] › e2e/agent-workbench-ui-refinement.spec.ts:9:5 › real streaming chat uses a collapsed butterfly trace without a duplicate progress card
Error: expect(locator).toHaveAttribute(expected) failed
Locator: getByTestId('run-trace-panel').last().getByTestId('run-trace-toggle')
Expected: "false" Timeout: 30000ms
Error: element(s) not found
19 | await expect(trace.getByTestId("run-trace-toggle")).toHaveAttribute("aria-expanded", "false");
```
## 两条线索,指向「不是纯粹的用例过时」
1. 同一份 `copilotkit-v2-tool-rendering.spec.ts` 里,**`:270` 那两条(D2 折叠/回放)
在同样的 `run-trace-panel` 上是绿的**(三趟里「项目」3/3 绿,「个人」2/3 绿)。
所以 `run-trace-panel` 与它的 toggle 在这条链路上**是会出现的**——
DA-19c 的差别在于它是**从 `copilotkit-v2-tool-search-documents` 卡片往上找祖先**。
若 `search_documents` 的定制卡片这一轮压根没渲染出来,`.first()` 永远不解析,
表现就正好是这个「等满 180s」。
2. ui-refinement 只红了 1/3 趟,说明至少它那一侧带时序性。
⇒ 建议先回答一个问题:**`copilotkit-v2-tool-search-documents` 卡片本轮到底有没有挂上**。
产物里有 `test-failed-1.png` 与 `trace.zip`(路径见上述 run 的 artifact),
`pnpm exec playwright show-trace` 一看即知;这一步我不做,交给实现方分诊。
## 代价
DA-19c 每趟稳定吃掉 **180s** 的 `chat-read` 预算(三趟共 9 分钟),
而这条车道正是 #3047 记着「35 分钟预算不够」的那条。
## 边界
- 与 #2016(`search_documents` 结果文本稳定为空)**不是同一条**:这条 spec 的标题
自己写着「result 文本断言见文件头已知限制③」,它红在拿不到 toggle,还没走到文本断言。
- S8(`agent-workbench-scroll-acceptance.spec.ts:6`)同样三趟 3/3 红,但已在 #3119 里记过,
本条不重复开。
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with apps/web/e2e/copilotkit-v2-tool-rendering.spec.ts, especially expandToolDetails and the DA-19c and D2 cases, plus e2e/agent-workbench-ui-refinement.spec.ts. Inspect test-failed-1.png and trace.zip with Playwright trace viewer to determine whether the search-documents card is rendered or the locator is stale. Done means the cause is established and both affected checks no longer wait on a missing run-trace-toggle.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript
- Domain
- frontend, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100