Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

🤖 tests: under a test HostClock, 5 phase 3 comparisons mix two clocks

オープン
#7,282 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
backend, testing

調査の方向性

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 HostClock gives 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)

  1. Move the 5 producers to HostClock: WorkspaceGoalService, the report times of TaskService, WorkflowService.createdAt, the durations of QuickJSRuntime and the renderer's lastRead.
  2. 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 ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

coder/xum のほかの issue

coder/xum の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。