Repository navigation
test(workspace): release both research analysis reads - #8033
JasonBuildAI wants to merge 1 commit into
Conversation
Signed-off-by: JasonBuildAI <jasonbuildai@gmail.com>
…-project#8033 Signed-off-by: JasonBuildAI <jasonbuildai@gmail.com>
|
This pull request has merge conflicts with Choose the remote for the base repository, not an out-of-date fork. git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEADFor a same-repository clone whose Keep the DCO |
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max.
动机
未发现阻塞性问题。评审对象为 958c17f0654fc2e916360dbaf7c75290cd11c442,比较基线为 ed2e4591309014861472cf72fbf55fcbb0b28b20。
- 受影响调用者:维护 Personal Workspace Research 路由浏览器回归的贡献者,以及依赖该 loading 断言识别真实回归的维护者。
- 前后场景:带 language 的读取完成后,页面还会读取 original pack;基线只释放第一个 Promise,第二次读取继续挂起,按钮一直禁用。head 让同一 loading case 的两次读取共享一个 Promise,一次 release 后按钮可用;下一 case 重新阻塞。
- 可观察结果:修复既有 loading fixture 的单次释放语义,保留释放前禁用、释放后可用、只读拒绝和逐 case 重置断言。
- 非目标:不改变产品请求、布局或权限;不声称完整 42-case 原生矩阵、发布产物或远端 CI 已验证,也不处理分支冲突。
验收依据为 #8032 的 Expected behavior,不可变代码基线为 ed2e4591309014861472cf72fbf55fcbb0b28b20,并对照基线 good-smokes 约束与实际产品两次读取流程。此 PR 交付 loading fixture 的完整小修复;不把它等同于所有 release 检查已通过。
改动思路
同一个 loading case 应有一个可释放边界。把 Promise 放在 case 级,两个请求共享等待;release 后到达的第二个读取也会立即通过,下一 loading case 再建立新边界。默认 Promise.resolve() 保持其他 state 不阻塞,现有非 GET 拒绝规则不变。
这只需要一文件 +3/-2。重复调用 resolver 仍依赖请求到达顺序;resolver 数组和 released flag 更复杂。生产层保留现有语言读取与 original-pack fallback,不需要为测试夹具改产品请求或权限。
具体改动
关键代码讲解
loadingGate与请求 callback:loadingGate默认已完成,只有 loading state 的 GET 等待它,避免每个请求重建 Promise 并覆盖唯一的releaseLoading。- 逐 case 重置:每个 loading case 都创建新的 Promise/resolver。因此第一次释放不会让后面的 loading 检查失去阻塞。
- 真实产品消费者:语言版本缺失时还会取 original pack。这段生产代码未改,解释了原来的单请求等待为什么不成立。
独立验证:
- 执行实际 base/head 源码中的 callback 与 case reset:基线顺序第二次读取挂起,并发读取丢失 resolver;head 顺序、并发、迟到读取都只需一次 release,下一 case 重新阻塞,POST 仍被拒绝。
- 故意移除 head 的 case reset:首个 loading/read 立即通过,独立的释放前禁用/重置 oracle 失败;证明没有只看“最终完成”的空洞绿灯。
- 真实 packaged 页面 + 原生只读 history backend + 合成 analysis gate:基线 release 后第二个 GET pending、按钮仍禁用;head 在 zh-CN/en × 1440/768/390 六种 loading case 中均有两次 GET fulfilled、writes=0、按钮由禁用变为可用。五个主操作控件的间隔、容纳、最小高度和顶部对齐检查通过。两边产品 bundle 相同,因为 diff 只改 fixture。
- 相关原生 history/fixture 测试 13 passed,
node --check与npm run build:chat通过;quick premerge 的 diff/RFC/semantic-vocabulary/public-boundary gate passed,精确范围 CQR 通过。build 的大 chunk 提示保留,未放宽预算。
对主干的风险
最强风险是已释放 Promise 泄漏到下一 case,使 loading 断言失效;逐 case 重置和 no-reset 反例覆盖了该风险。原有七种 state、语言/宽度、只读和操作行断言没有删改。复用当前 smoke,不增加近似副本;同作者 JasonBuildAI 的 #8031 为 UTF-8 修复,与本 PR 有不同消费者和缺陷。#8055 的作者是 keoyyo85,不纳入同作者扫描;本次有界扫描未发现足以建议限制贡献者的重复堆积证据。
维护性 ratchet 实际返回 1,涉及 terminal.py、interaction_contract.py、pr_review.py、slash_command_install.py 的四项 module-budget 诊断。原生 runner 标为 advisory_inherited_failure,均不在此 diff;没有独立 base 同命令归因,保留历史原因未确认,不声称修复或扩大预算。当前 loading 不变量有上述单独通过的证据。
首次私有 browser proxy 因 Origin/Host 不匹配返回 asset 403,发生在 analysis 请求之前;确认原因并仅规范自身 origin 后继续,失败记录保留,未把它算作 PR 回归或成功 case。analysis payload 是合成的;完整原生 7 × 2 × 3 = 42-case 矩阵、发布/安装产物和远端 CI 未执行或查询。不能把六个 loading case 扩写为完整矩阵通过。当前 packet 已报告分支冲突;评审通过不解决冲突,改 head 后需重新确认。
我的整体评价
同意此 exact head:修复有真实两次读取消费者,且释放前、释放后、下一次与相反方向写请求均有独立证据。生产操作步骤、布局、权限和额外交互轮数保持不变;测试可以完成并保持重复 case 的有效性,不外推长期效率收益。
视觉评审不适用:此 diff 只改 examples/personal-workspace-browser/research-route-reading.mjs 的测试等待逻辑,没有 rendered presentation 变化;实际 packaged loading 操作行做了自动检查。未验证范围:完整 42-case 原生矩阵、发布/安装应用及美学意义的整页评审。没有未解决的阻塞性 finding;分支冲突、合并策略和授权单独保留,本评审不授权合并。
English verdict: APPROVE — one per-case Promise releases both research reads at 958c17f0654fc2e916360dbaf7c75290cd11c442, while loading/reset and read-only assertions remain meaningful. The full native matrix and release qualification are unverified; merge conflicts remain a separate hold.
|
This fix is superseded by #8037, whose merge includes At PR head #8037 also records the packaged |
Restores the Release Artifacts packaged-browser gate: four recent Release Artifacts runs fail the
research-route-readingscenario and skipupload-releaseandpublish-pypi, so maintainers cannot produce release artifacts from currentmain. This is a follow-up to #8003.Goal And Delivered Outcome
examples/personal-workspace-browser/research-route-reading.mjscreates a pending promise for each loading-state research-analysis GET but releases only the last resolver. With fix(workspace): ground research reading in real benchmark state #8003's second original-pack read, one GET stays pending, the analysis button remains disabled, and the scenario times out..research-analysis-entry-actions > button:not(:disabled); after, the packagedresearch-route-readingscenario completes in 132.8s and reportspersonal-workspace-browser-smoke (packaged): ok.loopx-project/loopx:main.Author Declaration
Implemented against
examples/personal-workspace-browser/research-route-reading.mjs:77-101research-route-readingsmokeexamples/personal-workspace-browser/research-route-reading.mjs:80,101,107research-route-readingsmokeexamples/personal-workspace-browser/research-route-reading.mjs:96-108research-route-readingsmokebuildjob no longer hangs on this scenariodocs/development/good-smokes.md, the predecessor fix(workspace): ground research reading in real benchmark state #8003 diff, and the productionreadAnalysisSnapshotpath. Verified the failing selector and before/after behavior. Deliberately left production code, fixture data, and unrelated browser scenarios unchanged.Scope And Continuation
Validation
958c17f0654fc2e916360dbaf7c75290cd11c442staticpassedgit diff --check;node --check examples/personal-workspace-browser/research-route-reading.mjsunitpassedPYTHONUTF8=1 uv run --extra test python -m pytest -q tests/presentation/test_research_history_fixture.py tests/presentation/test_explore_history.py→ 13 passed. An initial run under the Windows GBK default failed two fixture decodes before this UTF-8 rerun; those failures are environment-codec related, not this diff.integrationpassedPYTHONUTF8=1 uv run --extra test loopx canary premerge --from-git-diff --git-diff-base upstream/main→status: passed,merge_gate_passed: true. One advisory inherited failure remained:control-plane-maintainability-ratchet-smoke.pydid not mention changed files.real_entrypointpassednpm run build:chat;research-route-readingreportedscenario-end=research-route-reading duration_ms=132841andpersonal-workspace-browser-smoke (packaged): ok.regression_paritypassedFrontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).none.Signed-off-bytrailer (git commit -s).AI disclosure: this change was drafted with AI assistance at the user's direction; no human review has occurred.