🤖 tests: under a test HostClock, 5 phase 3 comparisons mix two clocks
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with the five comparisons listed in workspaceService.ts, contextManagement/strategies/continuous.ts, tools/task_await.ts, and tools/code_execution.ts, then trace where each compared timestamp is produced. Decide whether each producer should use HostClock or the comparison should stay on nodeClock; the issue leaves that choice open. Done means all five comparisons use compatible clocks under a non-live test clock, with tests covering the affected cases.
索引モデルが issue の本文から書いたものです。
説明
Summary
Phase 3 of the agent-loop refactor (#7255) gives the loop files a HostClock service. In the app, every HostClock is nodeClock, so all timestamps use the wall clock. A test that injects a non-live HostClock (for example through makeTestEffectRunner) moves only the phase 3 files to that clock. Producers outside phase 3 still call Date.now().
Codex found 5 places where a phase 3 file compares or subtracts a time that such a producer wrote. The phase 3 builder deferred them as out of scope. This issue tracks them.
The 5 places
| Thread | File | What mixes |
|---|---|---|
| #7275 r4355034357 | workspaceService.ts |
The goal acknowledgment time and the wall-clock times of WorkspaceGoalService |
| #7275 r4355034362 | contextManagement/strategies/continuous.ts |
The compaction cutoff and the report times of TaskService and the workflow completion times |
| #7275 r4355034369 | workspaceService.ts |
The completion recency and the renderer's lastRead (Date.now()) |
| #7277 r4355038197 | tools/task_await.ts |
Workflow elapsed time: the session clock minus the createdAt of WorkflowService |
| #7277 r4355038201 | tools/code_execution.ts |
The start time from the injected clock and the duration_ms of QuickJSRuntime (Date.now()) |
Effect
- In the app: none, because both sides read the wall clock.
- In tests: a non-live
HostClockgives wrong comparisons or durations at these 5 places. The builder's replies say that no current test relies on them. I did not check every test.
Fix options (not decided)
- Move the 5 producers to
HostClock:WorkspaceGoalService, the report times ofTaskService,WorkflowService.createdAt, the durations ofQuickJSRuntimeand the renderer'slastRead. - Keep these 5 comparisons on
nodeClock.
Trigger
Fix this before a test injects one test HostClock that covers a phase 3 file and one of these producers. The in-memory agent turn of phase 5 is the first likely case.
Refs #7255, #7275, #7277
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: max • Cost: $106.28
- 主要言語
- TypeScript
- スター
- 2.1k
- フォーク
- 140
- 平均マージ
- 5時間 8分
- マージ済み PR(30日)
- 952
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
coder/xum のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
grafana/profiles-drilldown#1212 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
grafana/traces-drilldown#980 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
openremote/openremote#3487 · コメント 1 件 ·
-
triage:needs-human
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
garrytan/gbrain#7635 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
coollabsio/jean#867 ·
メンテナーはふだん 1 日以内に返信