Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#7,282 11 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
backend, testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
TypeScript
Estrellas
2.1k
Forks
140
Merge medio
3 h 23 min
PR fusionados (30 d)
953

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coder/xum

Todos los issues de coder/xum

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.