🤖 tests: under a test HostClock, 5 phase 3 comparisons mix two clocks
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
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
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
- 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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de coder/xum
-
🤖 tests: lock in git status outgoing-count rename equivalence and clarify index-lock commentAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
🤖 fix: Daytona startAndWait can start a sandbox after its deadline and then report a timeoutAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
coder/xum#7358 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
keptinventory/kept#336 ·
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
hemi-earn
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
vetro-protocol/vetro-monorepo#1013 ·
Los mantenedores suelen responder en 1 día