test(browser): wait for cadence editor hydration - #5738
loopx-agent merged 1 commit into
Conversation
aef0785 to
5e004e7
Compare
Signed-off-by: mika <[email protected]>
5e004e7 to
e06eae1
Compare
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh.
动机
没有阻塞发现。发布维护者运行已安装包的浏览器验证时,配置字段已经可见,但保存的值还没有填入;旧测试把这一瞬间的空值判为失败,阻断包发布。此修复等待已保存的单位和数量再执行原断言,使验证覆盖配置回读完成后的状态。本 PR 只修复既有测试等待点,不修改产品、发布标签、配置规则或原断言。
改动思路
精确评审 e06eae1f6fd8f5e2055630224d6ba46f401285a5,基线 77d23b7c09d6c1ee816d0c380c9935fbc67149f2。读取了 release-readiness 的包浏览器门槛、真实机器配置编辑器以及 fixture 的旧版 cadence 输入;这项竞态修复没有独立 RFC/协议变更。机器配置的异步读取和 React effect 仍由产品 owner 管理,测试只等待其可观察结果。重复旧测试、固定 sleep 或提高超时都不能证明配置已回读;现有 Playwright 条件等待是最小可回滚修复。
具体改动
仅 examples/personal-workspace-browser/typed-actions.mjs,新增 7 行测试等待,无产品代码。字段可见后等待单位 completed_todos、数量 3,随后保留单位、数量、两种选项及权限提示的原断言。
独立验证:以冻结发布源码 e1dd9e519c3057fda4b3765d0c93e7ae793608bf 新构建并安装的 wheel 执行完整 npm run smoke:personal-workspace-packaged,46 个场景及最终 team-evidence-return 均通过;replan-cadence 使用真实配置处理器和隔离存储验证旧版读取、非法预览不写入、迁移、Goal 覆盖及恢复设备默认。其周围 workspace discovery 为合成 fixture,不把它声明为真实模型验证。旧/新轮子的前端内容相同,仅源码标记更新为冻结发布提交。
从精确 head 提取等待谓词的独立浏览器探针证明:字段初始为空、延迟填入正确值可通过;错误单位或数量持续失败。该探针仅验证合成 DOM 上的等待条件。云端实际旧等待点的空值失败保留,未将历史失败改写为通过。Node 语法、diff hygiene、标准 canary 的维护性/语义/边界检查通过;没有查询 PR CI。
对主干的风险
风险局限于浏览器测试等待条件和标签定位,后续标签变化应显式失败。条件不会写配置、默认为空仍超时失败,也不会授予模型、文件、合并或投递权限。已检查类型化状态、域中立、行为披露、义务与指导、默认关闭隔离和 authority:本 PR 不引入协议词表、规则、开关或产品默认变化;复用现有 completed_todos 含义,不建立第二决策 owner。公共/私有扫描无新增凭据、内部链接或本地日志。
检查既有 replan-cadence 和 waitForInputValue 覆盖及同作者相关 PR:没有重复新增 smoke 或同形批次;此处修复的是 typed-actions 独有的双字段初始读取。未来重构评估认为 7 行直接等待无需新增通用 helper。发布 workflow 的真实执行、attestation、PyPI 及稳定渠道回读仍属于发布操作,完整本机通过不替代它们。
我的整体评价
APPROVE。独立证据覆盖了触发竞态、正确回读和错误值拒绝;保留全部发布验证和配置断言。没有失败、跳过或人工 hold 属于本改动;云端发布需按审查过的 fixture 提交再执行。授权 admin bypass 仍需精确 head 的质量、closeout 和 readiness 回读。
English verdict: APPROVE at e06eae1f6fd8f5e2055630224d6ba46f401285a5. The existing packaged-browser test waits for persisted cadence hydration while preserving every oracle and timeout. The full 46-scenario gate and team-evidence return pass on the immutable release wheel; delayed correct hydration passes and wrong unit/count remain rejected. No product behavior or publication authority changes. Hosted publication verification remains separate.
Goal And Delivered Outcome
typed-actionsscenario read cadence fields as soon as they became visible, before the saved v0 cadence had hydrated into the v1 editor.cf1f686cc517e844a164ac0f45fda7132d9c82b2, the packaged scenario could observe an empty unit instead ofcompleted_todos. It now waits for the saved unit and count before asserting them; the rebased candidate passes the full packaged smoke.mainat77d23b7c09d6c1ee816d0c380c9935fbc67149f2.Author Declaration
Implemented against
examples/personal-workspace-browser/typed-actions.mjsat77d23b7c09d6c1ee816d0c380c9935fbc67149f2.typedActionsScenariotyped-actionsbrowser scenariocf1f686cc; confirmed the full packaged smoke passes after waiting for editor initialization.Scope And Continuation
Validation
5e004e7df9783a8380f01d27048fd7068437b6a1(same candidate code as current heade06eae1f6fd8f5e2055630224d6ba46f401285a5; the later rebase added only an upstream documentation commit)regression_paritypassedcf1f686ccreproduces the transient empty unit; the candidatetyped-actionsscenario passes.integrationpassednpm run smoke:personal-workspace-packagedpasses on the same candidate code tree.staticpassednode --checkandgit diff --checkpassed.Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
Boundary Checklist
none.Signed-off-bytrailer.