Task logs carry one end-of-run timestamp batch, so a run's timing is unrecoverable #1029

Closed
opened 2026-10-27 13:38:44 +00:00 by sam · 0 comments
Owner

Symptom, proven from a production attempt log: every one of a task's 34 agent-loop iteration records carries a timestamp within about half a millisecond of the others, all at the moment the run ended, even though the iterations spanned minutes. The per-task JSONL sink stamps each record itself (it writes through a slog JSON handler), so the collapse is upstream of the file: the daemon routes task log records into the sink through a log feed (the task-log registry is constructed in the daemon bootstrap with that feed), and an iteration record's own event time is either not carried in the record or is discarded when the feed re-emits it. Consequences: a task's log cannot answer when a stage actually ran, how long an iteration took, or whether a stage stalled (this is precisely what made a large token burn hard to explain); and if records only arrive at the end, live task logging is absent too. Investigate the feed producer and its consumer before changing the sink: establish whether the agent-side records carry their event time, and whether the consumer re-stamps or forwards it. Fix at the producer so the record keeps the time the event happened, while the unix receipt time stays available separately.

Acceptance criteria

a multi-iteration run's log records are interleaved with the timestamps at which the iterations actually happened rather than sharing one end-of-run timestamp, and a test proves a forwarded record keeps its own event time

Close reason

Closed


Imported from beads archie-core-2xbz · GitHub #1461 · type bug · priority P2 · created 2026-10-02 · closed 2026-10-02

Symptom, proven from a production attempt log: every one of a task's 34 agent-loop iteration records carries a timestamp within about half a millisecond of the others, all at the moment the run ended, even though the iterations spanned minutes. The per-task JSONL sink stamps each record itself (it writes through a slog JSON handler), so the collapse is upstream of the file: the daemon routes task log records into the sink through a log feed (the task-log registry is constructed in the daemon bootstrap with that feed), and an iteration record's own event time is either not carried in the record or is discarded when the feed re-emits it. Consequences: a task's log cannot answer when a stage actually ran, how long an iteration took, or whether a stage stalled (this is precisely what made a large token burn hard to explain); and if records only arrive at the end, live task logging is absent too. Investigate the feed producer and its consumer before changing the sink: establish whether the agent-side records carry their event time, and whether the consumer re-stamps or forwards it. Fix at the producer so the record keeps the time the event happened, while the unix receipt time stays available separately. ### Acceptance criteria a multi-iteration run's log records are interleaved with the timestamps at which the iterations actually happened rather than sharing one end-of-run timestamp, and a test proves a forwarded record keeps its own event time ### Close reason Closed --- _Imported from beads `archie-core-2xbz` · GitHub #1461 · type bug · priority P2 · created 2026-10-02 · closed 2026-10-02_
sam added the mediumbug labels 2026-10-27 13:38:44 +00:00
sam self-assigned this 2026-10-27 13:38:44 +00:00
sam closed this issue 2026-10-27 13:38:44 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1029