From 571ee55ca6e573f419aa4d8bcf40ed304fd03bd2 Mon Sep 17 00:00:00 2001 From: Tianyi Cui <53024+tianyicui@users.noreply.github.com> Date: Mon, 7 Sep 2026 11:38:36 +0800 Subject: [PATCH] test(web): pin recorded Cordis browser timezone --- .../2026-09-06-pr-ci-runner-temporary-storage.i18n.yaml | 4 ++-- .../testing/2026-09-06-pr-ci-runner-temporary-storage.md | 2 ++ .../testing/2026-09-06-pr-ci-runner-temporary-storage.zh.md | 2 ++ apps/web/tests/cordis-tool-round.e2e.ts | 5 +++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.i18n.yaml b/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.i18n.yaml index feb3cb7843..11d030ea3a 100644 --- a/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.i18n.yaml +++ b/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write .agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.md -2026-09-06-pr-ci-runner-temporary-storage.md: e7ce6447c885119970e3777adab9b29e74cd6a97 -2026-09-06-pr-ci-runner-temporary-storage.zh.md: fe2ee2e07d3566398b3b09069ec593360c039bfc +2026-09-06-pr-ci-runner-temporary-storage.md: 673d26cbe9ef29c0c316839f6d6cc042cf62fbe4 +2026-09-06-pr-ci-runner-temporary-storage.zh.md: 09938d15dfb631890f65b2b8de355d10d12431ff diff --git a/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.md b/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.md index e7ce6447c8..673d26cbe9 100644 --- a/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.md +++ b/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.md @@ -32,6 +32,8 @@ The two minimal PowerShell snapshots explicitly exclude unrelated inherited tool The persistent PowerShell test distinguishes the silence observation from command completion. It refreshes prompt evidence with empty submissions after `inferred_idle`, within the existing bound, and still requires exact `stdin_read` plus an independently written completion marker. A gated command proves that silence can occur before mutation; the mutation itself is never replayed. +The Cordis browser-tool fixture pins its recorded `Asia/Shanghai` browser timezone instead of inheriting the runner timezone; the persisted user-message timezone remains asserted. + ## Alternatives considered **Delete shared temporary files from a PR job.** Another runner may still own those files. Repository jobs must not reclaim a shared directory by pathname or age. diff --git a/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.zh.md b/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.zh.md index fe2ee2e07d..09938d15df 100644 --- a/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.zh.md +++ b/.agents/notes/implemented/testing/2026-09-06-pr-ci-runner-temporary-storage.zh.md @@ -32,6 +32,8 @@ Inspector console 集成测试在启用后等待 Client 的 `Runtime.evaluate` 持久化 PowerShell 测试将静默观察与命令完成区分开。在 `inferred_idle` 后,它在既有时间界限内通过空提交刷新提示符证据,仍要求精确的 `stdin_read` 以及独立写入的完成标记。带阻塞标记的命令证明静默可能先于修改完成;修改命令本身绝不重放。 +Cordis 浏览器工具夹具固定录制时的 `Asia/Shanghai` 浏览器时区,而不继承 runner 时区;持久化用户消息的时区断言保持不变。 + ## 考虑过的替代方案 **由 PR 作业删除共享临时文件。** 其他 runner 可能仍在使用这些文件。仓库作业不得按路径或文件年龄回收共享目录。 diff --git a/apps/web/tests/cordis-tool-round.e2e.ts b/apps/web/tests/cordis-tool-round.e2e.ts index 2b7c75b547..76c5ae8115 100644 --- a/apps/web/tests/cordis-tool-round.e2e.ts +++ b/apps/web/tests/cordis-tool-round.e2e.ts @@ -18,7 +18,7 @@ import { captureStableAria, compareOrRefreshGolden, fixtureUserPrompts, launchWebScaffold, recordFixture, watchConsole, webSnapshotMode, type WebScaffold, } from './scaffold.ts' -import { connectFreshWorkspace, expandOwningTurnProcess, newEnglishPage, saveFailureShot } from './support.ts' +import { connectFreshWorkspace, expandOwningTurnProcess, saveFailureShot } from './support.ts' const FIXTURE = fileURLToPath(new URL('../../../snapshots/web/cordis-tool-round/session.v2.jsonl', import.meta.url)) const UI_EXPECTED = fileURLToPath(new URL('../../../snapshots/web/cordis-tool-round/ui.expected.md', import.meta.url)) @@ -83,7 +83,8 @@ describe('web e2e: Cordis tools use their owned cards', () => { if (key === 'modelSelection') modelChanges.push(`${String(seq)}:${JSON.stringify(value)}`) }) browser = await chromium.launch() - page = await newEnglishPage(browser) + // The persisted user-message fixture records this browser timezone. + page = await browser.newPage({ viewport: { width: 1680, height: 1000 }, locale: 'en-US', timezoneId: 'Asia/Shanghai' }) page.on('websocket', (socket) => { socket.on('framereceived', (frame) => { const payload = String(frame.payload)