Repository navigation
test(workspace): repair the remaining dashboard-browser lane failures - #7508
loopx-agent merged 4 commits into
Conversation
The dashboard-browser lane installs the checkout without test extras, so the managed-agent fixture exits on `import pytest` before the scenario starts. Replace pytest.MonkeyPatch with a process-scoped setenv/setattr shim; like the sibling browser fixtures, it now needs only the checkout. The fixture owns its process, so nothing has to be restored afterwards. Refs loopx-project#7384 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lihua <1017343802@qq.com>
goal-workspace-m2 raced the UI in two places: - it counted visible work right after toggling each owner group, which read 126 of 200 on the hosted runner; poll until every item is visible (the 2s expansion budget still covers the whole wait) - it focused the drawer's help before the drawer's next-frame focus handoff to its title, which blurred and dismissed the tooltip Refs loopx-project#7384 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lihua <1017343802@qq.com>
loopx-project#7501 keeps the decision a reader just closed expanded and focused in its question, so a question no longer collapses to three records after an older finding was read. research-finding-reader asserted the collapsed default at exactly that point (20 !== 3). Assert the shipped contract instead: the decision just read stays in view with focus. The default three-record view remains owned by research-history. loopx-project#7501's dashboard-browser shards were cancelled, so the scenario had not run against it. Refs loopx-project#7384 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lihua <1017343802@qq.com>
Since 63784cf the work vital shows its partial listing inside the contextual help (labelled with the unknown total) instead of inline text, so goal-suggestions no longer found "已列出 5 项中的 0 项" in the vitals' visible text. Open that help and assert the same counts in its tooltip. The scenario runs after goal-workspace-m2 in shard 2, so hosted CI had not reached it since that change. Refs loopx-project#7384 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Lihua <1017343802@qq.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 bae64527cca4e3378a29162b54ef121e163cc753。
动机 / Motivation
维护打包工作区回归的开发者,以及依赖这些检查发现界面、会话与权限退化的用户。无 test extras 的浏览器任务无法启动托管会话 fixture;异步渲染和焦点交接尚未完成时读取 DOM 会产生竞态,研究返回与部分覆盖断言还停留在旧界面。原打包入口可启动真实隔离 SQLite/Chat fixture;测试在原预算内等到实际渲染/焦点状态,再核对准确旧结论与部分工作数量,而不把展开恢复当成初始折叠。没有产品代码、UI、权限、默认值、状态协议、provider 或模型调用变化;不以测试修复宣称新产品能力或最终发布资格。 这是修复发布验证入口的独立批次,不能把恢复测试运行本身当成最终发布或新功能证明。
改动思路 / Approach
复用既有五个场景、真实状态 owner 与本机浏览器入口,只移除 fixture 的测试依赖并修正观察时点和语义位置。 按 1b6dd6a42ab7f9620a4655061952adb58038a65b 的 docs/development/good-smokes.md 核对 NO-TEST-EXTRAS、BOUNDED-RENDER、DRAWER-FOCUS、EXACT-RESEARCH-CONTEXT、PARTIAL-COVERAGE 五项判据。先判断产品实际契约,再修复测试,不让旧快照或测试运行器依赖反过来决定产品语义。真实 Chat/SQLite、原字段、权限负例、完整记录和原两秒预算保留;不需要新增 UI、状态 owner 或通用等待框架。
具体改动 / Changes
四个原文件共 +27/-7。托管会话 fixture 用仅含 setattr/setenv 的进程级 adapter 复用 isolate_sqlite_runtime;临时目录、环境和 tempfile cache 的生命周期仍归该独立 fixture 进程。禁止导入 pytest 的同条件对照中,基线明确 ModuleNotFoundError,head 启动实际服务器并读回三个原受管会话。不是靠给浏览器任务补 test extras 隐藏依赖。
200 项工作展开等待实际 DOM 收敛,再沿原性能时钟检查总耗时严格小于 2 秒;轮询最长 5 秒不会放宽这个通过条件。Drawer 本来在下一帧将焦点交给标题,现在先观察 title 实际获得焦点,再打开并核对原 tooltip,避免被后续焦点交接关闭。部分覆盖仍核对同一五项中的零项,按真实 masthead 的未知总数帮助入口读取,没有删除数量或把未知说成完整。
研究返回沿 TrailQuestion 的 selectedIndex 展开到刚读过的旧结论;此时要求三条会与恢复原记录和焦点的契约矛盾。head 核对具体「比较 2」按钮的焦点,research-history 仍独立断言初始问题数和每题记录数均为三,旧结论选择、刷新、Back、窄屏和全文断言保留。两个研究 UI owner 的 Git blob 与实际触发 20≠3 的 early3 版本完全相同,差异来自测试观察而非产品改写;实际桌面与窄屏截图也已检查。
精确 head 上五个完整 packaged 场景通过,包括四个受影响场景和 research-history 的初始三条覆盖;禁止 pytest 导入仍得到真实三会话 ready,基线在同条件明确拒绝。premerge 5 direct+3 selected、规定 Ruff 范围、17 模块 mypy、三个 Node 语法检查及四路径公开边界通过。 首次辅助观察器误读启动的人类提示为 JSON,修复读取后同 head 通过,原失败保留。额外扩大到整个旧 fixture 的 Ruff 检查得到 10 条存量样式问题;相同命令比较 base/head 的 code、message 和出错原行完全一致,仅行位置改变。规定 Ruff 范围通过,不能将这个辅助失败改称整个旧文件 lint 通过。作者描述的 hosted CI 未作为独立验证,按 Goal 的 wait_for_ci=false 没有查询 CI。
对主干的风险 / Risks
主要风险是等待和定位变化掩盖迟到渲染或旧记录丢失。原 200 项与两秒断言、具体旧结论焦点、独立初始三条、未知覆盖的准确计数都保留,并在完整 packaged 场景上执行。ProcessPatch 不做进程内恢复,因此其正确范围是这个独立、由测试关闭的 fixture 进程,不能直接复制给共享 pytest 进程。源身份在三条资格 lane 前后未变且清理成功;没有真实用户 Goal、私有工作区或外部 provider 操作。
我的整体评价 / Verdict
这是合理的测试修复,复用现有真实 owner 和独立负例,移除了浏览器 fixture 不应依赖的 pytest,并把观察顺序与当前 UI 生命周期对齐。现有场景保留比增建镜像测试或放宽预算更直接的回归价值。同域简化已完成,无需无关格式清理、生产重构或通用重试层。正式发布仍须在包含其他主线修复的统一候选上完成全仓、完整打包目录、真实模型、安装和渠道验证。 当前批准只覆盖此精确测试修复提交,公开前后路径与 DCO 也已核对,正式发布的统一 source 资格仍单独完成。
English verdict: APPROVE bae64527cca4e3378a29162b54ef121e163cc753. Five complete packaged scenarios, a real no-pytest startup counterfactual and required local gates pass. The original two-second budget, exact older-record focus, fresh default-three view, partial counts and authority assertions remain. Ten optional file-wide lint diagnostics are unchanged at base/head; no product or provider behavior changes.
Goal And Delivered Outcome
dashboard-browserjob of Python Tests (feedsdashboard-acceptance→checks→merge-gate) is red onmain.maincommits already repaired those two (conversation-activity's elapsed receipt andcomposer-session-admissionnow pass), and test(workspace): preserve fixture failures and observe paged history #7494 made the managed fixture report its own failures. Running the shards on currentmainexposes the next failures that keep the lane red:managed-agent-sessions:managed_agent_fixture.pyimportspytest, but thedashboard-browserjob installs the checkout without test extras (pip install -e .). The fixture exits before the scenario starts. Before test(workspace): preserve fixture failures and observe paged history #7494 this surfaced as an unhandledEPIPE; now it surfaces asModuleNotFoundError: No module named 'pytest'. Both PRs that introduced and changed this scenario (feat(chat): open and continue original managed Agent Sessions #7284, fix(chat): retain one observer for active managed turns #7354) haddashboard-browserskipped, so it has not passed in hosted CI before.goal-workspace-m2: two races. The scenario counts visible work immediately after toggling every owner group (hosted:126 !== 200, "All work remains reachable in the original owner order"). It also focuses the drawer's help before the drawer's next-frame focus handoff to its title, which blurs and dismisses the tooltip (local: about 1 in 3 runs at line 261).goal-workspace-m2). Each one asserts UI that a later, deliberate product change moved:research-finding-reader: fix(research): restore historical decision reading context #7501 keeps the decision a reader just closed expanded and focused, so the question no longer collapses to three records after an older finding was read (20 !== 3). fix(research): restore historical decision reading context #7501's owndashboard-browsershards were cancelled. The scenario now asserts that shipped contract: the decision just read stays in view with focus. The default three-record view stays covered byresearch-history(lines 182-183).goal-suggestions: since63784cfa9, the work vital shows partial coverage in its contextual help (labelled with the unknown total), not as inline text. The scenario now opens that help and asserts the same "已列出 5 项中的 0 项" counts in the tooltip.dashboard-browser (1/2/3)run.main.Author Declaration
Implemented against
dashboard-browserjob is green onmainfor an unchanged checkout), plus each scenario's own stated assertions, which stay unchanged.examples/personal-workspace-browser/managed_agent_fixture.py(ProcessPatch)LOOPX_PERSONAL_WORKSPACE_SCENARIO=managed-agent-sessions node examples/personal-workspace-browser-smoke.mjswith nopytestinstalledexamples/personal-workspace-browser/goal-workspace-m2.mjsLOOPX_PERSONAL_WORKSPACE_SCENARIO=goal-workspace-m2 node examples/personal-workspace-browser-smoke.mjsverifyRemoteSelectionresearch-finding-reader.mjs,goal-suggestions.mjsdashboard-browser (1/2/3)managed-fixture-process.test.mjs. Deliberately left out: product code changes (see Scope).Scope And Continuation
conversation-activity, right after switching the Goal view Tasks → Chat, the live Turn's pending receipt is briefly absent: the Chat-exit cleanup retires it and recovery re-creates it only aftercreateChatSession. ACommand+Entersteer in that gap takes the ordinary-send path and clears the composer draft. It reproduced in about 3 of 4 local macOS runs atconversation-activity.mjs:253, but hosted Linux shard 1 passes this scenario. A real fix changes composer turn-admission or Goal-view observer retention, so it needs its own review rather than a test change here.research-worker-readback(ECONNRESETfrom the disposable backend in my environment) andresearch-record-search(focus, passes in isolation).Validation
bae64527c(onmain1b6dd6a42). An earlier hosted run ona73a070c8passeddashboard-browser (1)and(3)and failed(2)atresearch-finding-reader, which the later commits fix.regression_paritypassedmanaged-agent-sessionsfails withModuleNotFoundError: No module named 'pytest'when the checkout is installed without test extras; with this branch it passes (2/2).real_entrypointpassedgoal-workspace-m2: before the fix, fails 1 of 3 local runs (line 261); after, 4/4 and 3/3 on the rebased head. The hosted line-155 failure did not reproduce locally; the fix waits for the same visible count the assertion requires.real_entrypointpassedreal_entrypointpassedresearch-finding-reader(2/2),goal-suggestions(2/2),research-display-language,replan-cadence,since-you-looked,first-goal-agent-unavailable,attention-notifications,completed-history-isolation.unitpassednode --test examples/personal-workspace-browser/managed-fixture-process.test.mjs(6/6).staticpassedpy_compile;node --check;scripts/generate_semantic_inventory.py --changed-from HEADreports no new vocabulary carriers.real_entrypointrunningdashboard-browser (1/2/3)on this PR is the decisive check.goal-workspace-m2had not run on hostedmainbefore (the shard stopped there), so new failures there are possible and will be addressed on this PR if they appear.Frontend / Visual Evidence
Type of Change
LoopX Area
Shared-authority RFC fixture impact
N/A
Boundary Checklist
none.Signed-off-bytrailer.🤖 Generated with Claude Code