Repository navigation
test(workspace): verify empty execution state through contextual help - #7316
Conversation
Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max
APPROVE — 当前 head 1204d299c0eefd7e570b70e975abbcc033d4a9ef 修复了独立复现的验收误报,同时保留说明内容、执行分类和可访问性语义。无阻塞发现。
动机
维护者运行 Goal 活动浏览器验收时,旧断言把已经转入按需帮助的空态说明当作常驻文字,导致有效界面被报失败。
同一打包界面中,旧断言只读到“正在执行”和 0;新断言打开对应帮助,核对完整中英文说明,再关闭并检查焦点回到原按钮。
本轮完整 goal-activity 场景通过;同一产品字节下旧测试失败,帮助正文被故意改错时当前测试也在新语义断言准确失败。
本 PR 只修复已有验收,不修改产品界面、执行判断、权限、配置或后端;不声称完成真实活动 Goal、模型任务或安装版 App 的验收。
这个维护任务的目标是让现有验收继续发现实际回归。删掉说明断言或仅把预期改成 0 会让测试失去意义;当前改动沿用用户已能操作的帮助入口,既修正误报,也保留“未知或不可读不等于执行中”的边界。这里的 goal_achieved 只指本次断言修复,不代表产品父 Goal、长程效果或后端已验收。
改动思路
先读取接受的设计 docs/development/design.md,不可变版本 59464f9741fe177381743eadaaffebbb54e5472e,原文条目 Explanations On Demand:默认界面避免重复说明,信息仍通过可访问帮助可达,支持关闭和焦点回返。另按同版本 docs/development/good-smokes.md 的 Prefer Semantic Pressure / 优先验证语义压力 和 Consolidate Without Losing Coverage / 合并时不丢失覆盖 判断保留价值。这些是改动前的标准,不是从新 helper 反推预期。
生产链没有变:现有 fixture 提供结构化观测,现有 ManagerBrief 决定哪些 Goal 真正在运行,ContextHelp 决定如何展示空态说明;新 helper 只执行断言。具体是零 count/零 rows → 点击名称精确匹配的按钮 → 检查可见 tooltip 内完整正文 → Escape → tooltip 隐藏且焦点回到来源。只检查按钮名会漏掉正文错误,因此当前独立负例特意保留按钮名及所有分类,只改可见正文。
无需新框架、独立页面或额外用户流程。把同样的三处流程放进一个本地 helper 已经完成有价值的复用。潜在共享 ContextHelp 机械操作可在同域 helper 收敛时再评估,当前不要求为此创建任务或扩大 PR。
具体改动
完整差异仅 examples/personal-workspace-browser/goal-activity.mjs,+20/-3。新增 readEmptyBriefHelp,替换中文未知执行方式、英文未知执行方式、会话读取不可用三处常驻文本断言。既有 running/queue/lane、claim、会话和宿主记录等判断没有删除,也没有扩大超时或放松状态要求。
顺着真实调用检查了既有 manager-brief.tsx 和 context-help.tsx:零行分支确实使用带完整 accessible label 的帮助按钮,tooltip 内有说明段落;click、Escape、焦点行为由同一个生产 ContextHelp 承担。新增 helper 消费的是现有产品路径,没有为测试专门制造未被使用的生产 helper。
本轮独立运行同一完整打包浏览器场景,结果如下。base/head 的全部前端源码 413 个文件及打包资产 36 个文件逐字节一致,两边 chat_bundle.py verify --source 都通过;差异就是测试文件,所以可以直接区分断言变化和产品变化。
| 对照 | 实际结果 | 能说明什么 |
|---|---|---|
| 不可变 base 的旧测试 + 同一产品 | 退出 1,旧断言实际只读到“正在执行”和 0 | 误报已独立复现 |
| 当前 head 完整场景 | 退出 0,acceptance PASS,场景 12.137 秒 | 三个修复后的帮助检查及其余原有状态路径可通过 |
| 当前测试 + 仅改错可见帮助正文 | 退出 1,在 helper 第 63 行 strictEqual 失败 |
新断言仍能拒绝语义回归;不是只匹配按钮标签 |
负例正文为 synthetic 错误说明,按钮名、count、rows 及测试代码保持原样;失败恰好发生在目标正文断言,未把启动失败冒充敏感性证据。该变体只用于私有验证,未修改 PR 或工作树。标准本地 premerge 在当前 exact head 退出 0,源码打包和校验通过;没有读取、轮询或等待 GitHub CI。首次准备命令误用了此基线不存在的 npm alias,随后改用仓库实际拥有的 scripts/chat_bundle.py build;该准备错误未计为产品回归。
对主干的风险
没有发现阻塞项。风险主要是测试与既有 DOM/accessible-name 契约的耦合;这里按实际的用户入口查询,并校验可见正文,范围比测试 class/text 位置更贴近已接受语义。完整原有活动场景加独立正文变异,覆盖了最容易被“修复测试”掩盖的错误方向。受控 API fixture 不能证明真实后端的新鲜度、执行或数据持久化,当前也没有这样的生产改动需要它证明。
同作者批次检查使用完整开放队列,并读取相邻 #7317/#7318/#7319 的公开差异作为去重背景。#7317 是团队委派范围及不启动模型的边界,#7318 是设置导航/紧凑布局及其他帮助,#7319 是实际运行时代码;它们不是本 PR 三种 ManagerBrief 空态的替代覆盖。仓库已有 goal-masthead、research-display-language、research-history 的帮助检查也不能替代这里的未知执行分类。当前没有证据支持重复案例堆叠或在警告后反复违规;不因多个小测试 PR 就升级到账号限制建议。相邻 PR 在本轮没有第三项评审、测试或发布动作。
作者先前的 dev-server network-idle 启动超时保留为历史限制,本轮未声称诊断或修复该问题;独立打包场景与定点语义负例足以验收这个测试修复边界。没有放宽硬门限、修改生产默认值、加入配置/权限/状态,回退只需恢复一个测试模块。
我的整体评价
这是完整且可独立回退的维护修复:证明确有旧断言失败,再让新断言覆盖实际信息获取路径,并证明错误正文仍会失败。一个本地 helper 服务三处已有场景,代码量合理;不需要额外框架或无实际后继的拆分任务。与“只让测试绿”相比,这里有独立产品语义的负向证据,保留了仓库可长期使用的回归保护。
本次只改 examples/personal-workspace-browser/goal-activity.mjs;ManagerBrief、ContextHelp 与所有生产界面源码及打包资产在 base/head 字节一致,没有渲染呈现变更。 真实活动 Goal 数据、在线后端、安装版 App 和模型执行未在本测试修复中验收;现有浏览器场景使用受控 API fixtures。 用户完成原有任务不需要新增陈述、选择、确认、复制或导航;测试点击的是可选的既有帮助,不是要求用户增加准备工作。无阻塞发现;最强未覆盖项就是上述真实数据/安装/模型边界,不将 fixture 成功升级为其通过。发布此批准意见后仍需按原生 closeout/readiness 读回已有评审门限;本意见不授予合并权限,也不代替其他 reviewer 的有效阻塞。
English verdict: APPROVE at 1204d299c0eefd7e570b70e975abbcc033d4a9ef. No blocking finding. The full native packaged scenario passes; the old assertion fails on byte-identical product assets, and a wrong visible help paragraph makes the unchanged new test fail at its exact semantic check. Existing liveness assertions are retained, with Escape/focus coverage. Local premerge passes; CI was not consulted. Controlled API fixtures qualify this test-only repair, not real active-Goal/backend/model or installed-App behavior. Approval does not grant merge authority or dismiss another reviewer's block.
Goal And Delivered Outcome
The packaged workspace build fails
goal-activityat its empty-running-tile assertion: it expects the unknown-mode explanation in persistent tile text, while the current UI exposes that explanation through contextual help. The same mismatch also affects English and unreadable-execution acceptance.Exercise the shipped interaction: find the exact named help control, click it, read the visible tooltip paragraph, dismiss with Escape and verify focus returns to its trigger. Keep execution counts, classification, liveness and lane assertions; also require no running rows in each empty state. Product rendering and behavior are unchanged.
ContextHelpinteraction at baseline59464f9741fe177381743eadaaffebbb54e5472e.main. No issue closeout is claimed.Author Declaration
Written by: model_agent (OpenAI Codex), under the author's direction.
Implemented against the existing
manager-brief.tsx/context-help.tsxcontract anddocs/development/design.mdat the baseline above: explanations remain available on demand; unknown/unavailable activity must never count as verified execution. Both criteria are covered through the existing packaged browser scenario.Validation
Tested revision:
1204d299c0eefd7e570b70e975abbcc033d4a9ef. Run state: finished. Inputs: synthetic. Native Windows, Node 24.20.0, own-checkout source backend and packaged assets; existing compatible test dependencies.正在执行and0, before the new interaction checks.goal-activityscenario: passed. Includes Chinese/English unknown-mode and unavailable-state help, existing desktop/mobile, execution/claim/mixed-observation and liveness checks. Package build and bundle verification passed..mjs, so its empty output is not semantic proof.page.gotonetwork-idle before target assertions. No development-server pass is claimed. Packaged execution completed the target scenario.Reproduce with the checkout's compatible test environment and Playwright configured:
Scope And Continuation
Placement: the existing durable browser scenario owns this interaction acceptance; no production helper, capability or shared decision owner is introduced. The local helper groups one real user interaction reused by three assertions. No packaged behavior, frontend/Lark/CLI operation or first-screen presentation changes. UI impact: none; screenshots are not required for this test-only delta.
Current-head CI and maintainer review remain pending. No live Goal, model turn, host installation, global upgrade or self-merge. Public/private scan clean; DCO signed. Type: focused test/CI repair. Shared-authority RFC fixture impact: N/A.