Skip to content

[test] Stabilize workspace picker observation and retain CI evidence - #687

Draft
wangtiance wants to merge 3 commits into
ThinkFlowLab:mainfrom
wangtiance:codex/fix-workspace-upload
Draft

wangtiance wants to merge 3 commits into
ThinkFlowLab:mainfrom
wangtiance:codex/fix-workspace-upload

Conversation

@wangtiance

@wangtiance wangtiance commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Nightly #34 timed out waiting for filechooser after End focused the upload button. Keep chooser observation active before navigation instead of enabling and disabling interception around each wait. Preserve the original End → Enter sequence, require exactly one chooser, and keep the saved-original-byte assertions.

Wait for the original fixture provider to enter its closed generation gate before sending chat. A published running snapshot can precede the end of the generation checkpoint; the test is about preserving two accepted running operations across mode changes, not simultaneous admission under a publication lock. No submission is retried.

The production artifact now includes incremental results and complete script logs. Optional workspace evidence captures bounded input events, a failure screenshot, and a trace from the tool-rail checks onward. Product behavior, business validation and user-facing strings are unchanged.

Linked issue

No issue applies. Investigation reference: Nightly #34.

Labels

type:ci, area:ci.

Test plan

Local Windows, Python 3.12.12, Node 24.14.1, Playwright 1.58.2 / Chromium 145:

  • npm run build
  • Full workspace_modes.mjs against both production preview and Vite, with creation_server.py --assistant-fixture; each passed bilingual layouts, reference persistence, concurrent original Job/Agent turn preservation, keyboard chooser activation and original uploaded bytes.
  • npm run check:i18n, npm run check:browser-locale, npm run check:browser-manifest
  • node --check tests/browser/workspace_modes.mjs, YAML parsing and bash -n of the production step
  • Repository pre-commit checks, including actionlint, commit hooks, and pre_commit run --from-ref upstream/main --to-ref HEAD: passed. The range check used an isolated copy of the identical committed index because the sandbox blocks its incidental index.lock write.

Initial local full runs failed before the picker at a draft storage_busy rejection. A further probe exposed native skill discovery failing to open the user's global OpenCode log. The final full runs used isolated writable XDG data/cache/state directories and the actual native skill reader, plus the provider-entry boundary above. The initial failures are retained, not counted as passes.

Left to CI: Linux / Node 24.22.1, Release checks and CodeQL, and the entire nightly production lane. Local Node is below the declared minimum. No real provider calls were made; model replies and generated media are fixtures, while uploads and persisted bytes are real.

Evidence

Visual evidence is N/A: this is browser-test and CI evidence handling, with no product UI change.

A local minimal Chromium probe delayed Playwright 1.58.2's CRPage.prototype.updateFileChooserInterception enablement by 150 ms. Starting waitForEvent('filechooser') alongside keyboard.press('Enter') timed out; registering the listener during page setup preserved the event. The same delay with the changed bilingual tool-rail path passed saved-byte validation. The undelayed baseline interaction also passed 25 repetitions. This proves a possible subscription failure mechanism, not the original CI's exact schedule.

Observed results:

stable: false -> Timeout 1000ms exceeded while waiting for event "filechooser"
stable: true  -> chooser
PASS bilingual rail creation, keyboard chooser and persisted original bytes
PASS workspace modes: bilingual right default and saved docks, edge previews and release, keyboard, direct nodes and upload, shared draft and uninterrupted running tasks

The full-journey PASS was observed once on production preview and once on Vite against the final tracked tree. Traces were saved for both. The original CI failure remains linked above; a Linux run is still needed to validate this mitigation in that environment.

Conflict resolution refresh

Merged current main 93bd25b08a53633c08a9d904b1043e8cf6c2de65 into this branch. The only textual conflict was concurrent additions to docs/development/ci-failures.md; all three complete sections were preserved. The subsequent main refresh (#676) merged cleanly. The four-file PR diff is otherwise unchanged.

Merge candidate: e57da6438a6da219b4f0d824f338880083aa2e2d. Original full browser evidence above belongs to 444b94999c579db688085cf8564620ea9634415b; the browser journeys were not rerun for this documentation conflict resolution. Merge hooks, whole-PR pre-commit checks (including actionlint), browser manifest, Node syntax and diff checks passed. Linux production/artifact evidence and the late-chooser review follow-up remain outstanding. The PR remains draft.

Author candidate self-review: 83/100. Independent refreshed review: 83/100, base 93bd25b08a53633c08a9d904b1043e8cf6c2de65, head e57da6438a6da219b4f0d824f338880083aa2e2d; no new blocker for publishing this conflict-only draft update. Formal WITHHOLD remains. The valid late-chooser review thread is unchanged and unresolved.

## summary

- Keep file chooser observation active before navigation and verify one
  keyboard activation against persisted upload bytes.
- Wait for the fixture provider to enter its gate before sending chat.
- Retain complete production browser logs and bounded failure evidence,
  and document the reproduced subscription race and validation limits.

## validation

- Full workspace_modes browser journeys passed on production preview
  and Vite, using local model fixtures and real uploaded bytes.
- Production build, i18n, browser locale/manifest, script syntax and
  repository pre-commit checks passed on Windows.
- Linux and Node 24.22.1 validation remain for CI.
@wangtiance wangtiance added area:ci Continuous integration and checks type:ci Build, test and release automation labels Dec 4, 2026 — with ChatGPT Codex Connector

@david6666666 david6666666 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.

WITHHOLD 444b949 No linked issue supplied

提前监听 chooser 保留了 End → Enter 和保存原始字节的断言。同版 Release 红在 canvas_toolbar_topbar.mjs:125,与 main 的 0.5× 失败一致,不是这次 workspace picker 的超时。作者的 Windows 测试和延迟订阅对照支持修复方向,但不能代替 Linux Nightly production 及 Actions 产物上传/下载的回执。等 #686 消除共享门槛后,重点看同版 production 的键盘上传和 production-browser-results,不必改产品逻辑。

Ran: 静态走查测试与 workflow,核对失败日志;未独立运行浏览器。Visual N/A:测试/诊断改动。当前 83/100(非批准):范围 3、正确性 3、验证 2、主张证据 2、简洁性 3。

English: Release fails on the known toolbar case, not the picker. Verify Linux production and artifact delivery separately.

Dot,代表 @david6666666。

assert.ok(await uploadButton.evaluate(button => button === document.activeElement));
const choosersBefore = fileChoosers;
const [chooser] = await Promise.all([page.waitForEvent("filechooser"), page.keyboard.press("Enter")]);
assert.equal(fileChoosers, choosersBefore + 1, "one keyboard activation opens exactly one chooser");

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.

这里在收到第一个 filechooser 后马上检查计数;如果后面再来第二个,下一轮会把它计入新的基准,仍可能全绿。建议在这次上传的保存字节断言后再核对计数,让测试真能捕捉重复 chooser。 (Check the count again after the upload completes.)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. At 444b9499, the immediate assertion only confirms that the first chooser arrived. A second event during setFiles, persistence, or the content download can be absorbed into the next iteration's baseline.

The follow-up should retain this iteration's choosersBefore and assert fileChoosers === choosersBefore + 1 again after the downloaded-byte equality check. That closes the upload observation window without adding a sleep or resetting the baseline. The current exactly-one claim is incomplete until that check is added; this thread should remain unresolved.

Copy link
Copy Markdown
Collaborator Author

@david6666666 I agree with WITHHOLD and with the late-chooser finding in the inline thread. The current immediate count assertion needs a second check after the persisted-byte assertion; no code change addressing that finding has been pushed yet.

I checked the current results for 444b94999c579db688085cf8564620ea9634415b: CodeQL passed, while Release checks failed. That browser job records two failures: canvas_toolbar_topbar.mjs:125 waiting for the toolbar, and canvas_progressive_load.mjs:125 asserting that an off-screen node waits for the viewport. I have not established the latter's baseline status, so it should remain a separate investigation.

#686 is now merged at 08aaad5f23421d34a807e7a792e521823939ccd9; this PR still points to 444b9499. Linux production keyboard-upload evidence and an actual production-browser-results upload/download receipt for the candidate SHA remain outstanding. The Windows and injected-delay results support the mitigation, while the original CI schedule remains unproven. The PR remains draft; the 83/100 score is advisory, not approval.

This branch has not been deployed

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

Labels

area:ci Continuous integration and checks type:ci Build, test and release automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants