Skip to content

test(workspace): release both research analysis reads - #8033

Closed
JasonBuildAI wants to merge 1 commit into
loopx-project:mainfrom
JasonBuildAI:codex/agent-a5b2
Closed

JasonBuildAI wants to merge 1 commit into
loopx-project:mainfrom
JasonBuildAI:codex/agent-a5b2

Conversation

@JasonBuildAI

Copy link
Copy Markdown
Contributor

Restores the Release Artifacts packaged-browser gate: four recent Release Artifacts runs fail the research-route-reading scenario and skip upload-release and publish-pypi, so maintainers cannot produce release artifacts from current main. This is a follow-up to #8003.

Goal And Delivered Outcome

Author Declaration

  • Written by: model_agent — OpenAI Codex, under user direction; no human review has occurred.

Implemented against

  • Specification and revision: No separate written specification; the linked issue and the reproduced Release Artifacts failure are the basis.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
Loading state keeps analysis reads pending until explicitly released implemented examples/personal-workspace-browser/research-route-reading.mjs:77-101 packaged research-route-reading smoke
Both sequential research-analysis reads resume after release implemented examples/personal-workspace-browser/research-route-reading.mjs:80,101,107 packaged research-route-reading smoke
Existing language, width, route-state, and layout assertions still run implemented examples/personal-workspace-browser/research-route-reading.mjs:96-108 packaged research-route-reading smoke
Release Artifacts build job no longer hangs on this scenario implemented same test path Local packaged smoke; remote Release Artifacts run remains post-merge verification
  • Self-check before submission: Read the issue/PR templates, docs/development/good-smokes.md, the predecessor fix(workspace): ground research reading in real benchmark state #8003 diff, and the production readAnalysisSnapshot path. Verified the failing selector and before/after behavior. Deliberately left production code, fixture data, and unrelated browser scenarios unchanged.

Scope And Continuation

  • Completed scope and remaining work: The packaged-browser loading gate now creates one releasable gate per loading case, so every request admitted while loading resumes together. No production behavior or fixture data changes.
  • Slice boundary / successor: Complete within this scope; no successor is needed. Remote release qualification is expected after merge, not a separate code task.

Validation

  • Tested revision: 958c17f0654fc2e916360dbaf7c75290cd11c442
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
static passed git diff --check; node --check examples/personal-workspace-browser/research-route-reading.mjs
unit passed PYTHONUTF8=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.
integration passed PYTHONUTF8=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.py did not mention changed files.
real_entrypoint passed Packaged dashboard bundle built with npm run build:chat; research-route-reading reported scenario-end=research-route-reading duration_ms=132841 and personal-workspace-browser-smoke (packaged): ok.
regression_parity passed Pre-fix packaged reproduction timed out after 39.3s on the same scenario; public CI shows the same 30s locator timeout in four Release Artifacts runs. The patched head completes the full matrix.
  • Coverage and gaps: The local packaged smoke exercises the full research route-reading matrix (two languages, three widths, seven route states) against the built frontend and synthetic fixture. No remote Release Artifacts run exists for the branch head yet; the post-merge run is the remaining qualification. Non-packaged CI coverage is unchanged.

Frontend / Visual Evidence

  • UI impact: none — the diff changes only a browser-smoke route gate; no product rendering or interaction changes.
  • Before: N/A
  • After: N/A
  • First viewport and preview: N/A
  • States and viewports shown: N/A
  • Source data: synthetic (the existing route-reading browser fixture)
  • Attention review: N/A; no user-visible surface changed.
  • Craft review: N/A; no user-visible surface changed.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: N/A

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A; synthetic browser test fixture only.
  • Provider conformance arms run: N/A
  • Read-only legacy/file/PostgreSQL three-arm rehearsal (required for promotion, runtime-routing, or compatibility-projection changes): N/A

Boundary Checklist

  • Neither the diff nor this PR body/comments/attachments disclose private state, credentials, raw traces or verifier output, internal links, or local machine paths (including .loopx/, .codex/goals/, and live ACTIVE_GOAL_STATE.md).
  • I did not duplicate maintainer-owned benchmark work unless a maintainer split out a public issue for it.
  • I kept the change scoped to the linked issue/task.
  • Existing English/Chinese RFC pairs (including ledger entries) both have a diff, and the local premerge check passes, or no paired RFC changed.
  • I completed the visual evidence section for UI changes, or marked UI impact none.
  • Every commit includes a DCO Signed-off-by trailer (git commit -s).

AI disclosure: this change was drafted with AI assistance at the user's direction; no human review has occurred.

Signed-off-by: JasonBuildAI <jasonbuildai@gmail.com>
JasonBuildAI added a commit to JasonBuildAI/loopx that referenced this pull request Nov 4, 2026
…-project#8033

Signed-off-by: JasonBuildAI <jasonbuildai@gmail.com>
@mergify

mergify Bot commented Nov 4, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @JasonBuildAI.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

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 HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 4, 2026

@loopx-agent loopx-agent left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,不需要为测试夹具改产品请求或权限。

具体改动

关键代码讲解

  1. loadingGate 与请求 callback:loadingGate 默认已完成,只有 loading state 的 GET 等待它,避免每个请求重建 Promise 并覆盖唯一的 releaseLoading。
  2. 逐 case 重置:每个 loading case 都创建新的 Promise/resolver。因此第一次释放不会让后面的 loading 检查失去阻塞。
  3. 真实产品消费者:语言版本缺失时还会取 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.

@huangruiteng

Copy link
Copy Markdown
Collaborator

This fix is superseded by #8037, whose merge includes f04ec308f6 on main.

At PR head 958c17f065, loadingGate is created once per loading case and both research-analysis GETs share it. The landed main implementation does the same through loadingRead; comparing f04ec308f6 with 958c17f065 leaves only the local variable name and an explanatory comment. There is no behavioral delta left to merge.

#8037 also records the packaged research-route-reading validation across Chinese/English and 1440/768/390px, including all seven lifecycle states. I am closing this conflicting duplicate rather than creating a no-op merge or treating the old-head approval as qualification for a changed head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Mergify: the pull request has merge conflicts with its base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Release Artifacts browser smoke hangs after #8003 adds a second research-analysis read

3 participants