Every Slack message shows a zero timestamp of 0001-01-01T00:00:00Z #257
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Verified during the deployability audit by inspecting the raw payload posted to a sink. Every Slack delivery contains:
while the stored event's
created_atis correct.Cause:
buildEventFromTasknever populatesCreatedAt, andFormatSlackMessageformats the resulting zero value.Slack is the target type whose output a human actually reads, so this is visible in every notification the product sends through it.
Definition of done:
buildEventFromTaskpopulatesCreatedAtfrom the stored event.buildEventFromTaskpopulates while there — check whether anything else is silently zero.clawbot referenced this issue2026-08-24 01:02:21 +02:00
Plan.
Taskcarries no receipt time, and it is built in three places — two of them ininternal/handlers, which is outside this unit's scope. WideningTaskwould therefore only fix the recovery path and leave the live first-attempt and retry paths still rendering the zero time, so the fix goes in the engine instead:resolveEventBodybecomeshydrateEventand readscreated_atalongsidebodyfrom the stored event row. That covers every path, since bothprocessNewTaskandprocessRetryTaskalready call it, and it keeps the stored row as the single source of truth.One behavioural note: a task that inlined its body previously never read the event row at all. It does now, so a read failure gets a fallback — deliver the inlined body with the timestamp unset rather than drop the event, since the row can be reaped by retention while a queued delivery still holds its body.
Field audit and verification go in the PR body.
Done in #297 (branch
issue-257-slack-timestamp, basenext). Rationale and the full field audit are in the PR body.Verified by reproducing first on unmodified
next: a slack target pointed at a sink, raw payload captured,*Timestamp:* `0001-01-01T00:00:00Z`on all three paths — first attempt with the body inlined, first attempt with the body read back from the row, and retry. After the fix the same sink receives*Timestamp:* `2026-03-04T05:06:07Z`, the event's seededcreated_at, on all three.Five new tests in
internal/delivery/event_timestamp_test.go, one of them asserting directly onFormatSlackMessageoutput over a Task-reconstructed event. Mutation-verified: removing theCreatedAtpopulation fails four of the five, and the fifth is the reap-fallback test that correctly still passes.make checkgreen withGOFLAGS=-count=1; 21 packagesokwith no cached results, and lint executed in Docker at0 issues.rather than replaying a cached stage.