FormatSlackMessage (internal/delivery/target_slack.go) rendered the
Timestamp line unconditionally. When a delivery falls back to a
reaped event row (hydrateEvent leaves CreatedAt as the zero value
deliberately, per #257),
the message carried *Timestamp:* \0001-01-01T00:00:00Z`` --
indistinguishable from the regression #257 was filed against.
Chose to render *Timestamp:* \unknown`whenCreatedAt.IsZero(), rather than omitting the line, so the message shape stays predictable. A non-zero CreatedAt` still renders as RFC3339, unchanged.
Same code path serves Mattermost; target_log.go doesn't render CreatedAt so it isn't affected.
Added TestFormatSlackMessageZeroTimestamp in internal/delivery/event_timestamp_test.go, asserting the zero-time
case contains no 0001-01-01 and renders unknown, and that a
non-zero CreatedAt still renders as RFC3339.
make check green, including a fresh (uncached) golangci-lint run
against the pinned image.
Fixes https://git.eeqj.de/sneak/webhooker/issues/298.
`FormatSlackMessage` (`internal/delivery/target_slack.go`) rendered the
Timestamp line unconditionally. When a delivery falls back to a
reaped event row (`hydrateEvent` leaves `CreatedAt` as the zero value
deliberately, per https://git.eeqj.de/sneak/webhooker/issues/257),
the message carried `*Timestamp:* \`0001-01-01T00:00:00Z\`` --
indistinguishable from the regression #257 was filed against.
Chose to render `*Timestamp:* \`unknown\`` when `CreatedAt.IsZero()`,
rather than omitting the line, so the message shape stays predictable.
A non-zero `CreatedAt` still renders as RFC3339, unchanged.
Same code path serves Mattermost; `target_log.go` doesn't render
`CreatedAt` so it isn't affected.
Added `TestFormatSlackMessageZeroTimestamp` in
`internal/delivery/event_timestamp_test.go`, asserting the zero-time
case contains no `0001-01-01` and renders `unknown`, and that a
non-zero `CreatedAt` still renders as RFC3339.
`make check` green, including a fresh (uncached) `golangci-lint` run
against the pinned image.
FormatSlackMessage rendered the Timestamp line unconditionally, so a
reaped-row fallback delivery carried "0001-01-01T00:00:00Z" -- the
exact string #257 was filed
against, indistinguishable from that regression. When
event.CreatedAt.IsZero(), render "unknown" instead; a real CreatedAt
still renders as RFC3339.
Review: PASS. Zero-CreatedAt renders *Timestamp:* \unknown`with no0001-01-01anywhere in output; non-zero path unchanged (RFC3339/UTC). Mutation test: reverted theIsZero()guard intarget_slack.go—TestFormatSlackMessageZeroTimestampfailed exactly as expected (both assertions), confirming the test is load-bearing; source restored after.make checkgreen on the PR head, including a fresh (non-cached)golangci-lint run, 0 issues. CI (check / check) green on d5bebb840. Merges cleanly against next(==main). Commit title ends (closes#298), no Claude/Anthropic references or attribution trailers anywhere. Scope check for other targets (per issue DoD item 3) confirmed: target_log.goandtarget_http.go/target_database.godon't renderevent.CreatedAt; only target_slack.go` did, and it's fixed.
Review: PASS. Zero-`CreatedAt` renders `*Timestamp:* \`unknown\`` with no `0001-01-01` anywhere in output; non-zero path unchanged (RFC3339/UTC). Mutation test: reverted the `IsZero()` guard in `target_slack.go` — `TestFormatSlackMessageZeroTimestamp` failed exactly as expected (both assertions), confirming the test is load-bearing; source restored after. `make check` green on the PR head, including a fresh (non-cached) `golangci-lint` run, 0 issues. CI (`check / check`) green on `d5bebb840`. Merges cleanly against `next` (== `main`). Commit title ends ` (closes #298)`, no Claude/Anthropic references or attribution trailers anywhere. Scope check for other targets (per issue DoD item 3) confirmed: `target_log.go` and `target_http.go`/`target_database.go` don't render `event.CreatedAt`; only `target_slack.go` did, and it's fixed.
Review: PASS. Zero-CreatedAt renders *Timestamp:* \unknown`with no0001-01-01anywhere in output; non-zero path unchanged (RFC3339/UTC). Mutation test: reverted theIsZero()guard intarget_slack.go—TestFormatSlackMessageZeroTimestampfailed exactly as expected (both assertions), confirming the test is load-bearing; source restored after.make checkgreen on the PR head, including a fresh (non-cached)golangci-lint run, 0 issues. CI (check / check) green on d5bebb840. Merges cleanly against next(==main). Commit title ends (closes#298), no Claude/Anthropic references or attribution trailers anywhere. Scope check for other targets (per issue DoD item 3) confirmed: target_log.goandtarget_http.go/target_database.godon't renderevent.CreatedAt; only target_slack.go` did, and it's fixed.
Review: PASS. Zero-`CreatedAt` renders `*Timestamp:* \`unknown\`` with no `0001-01-01` anywhere in output; non-zero path unchanged (RFC3339/UTC). Mutation test: reverted the `IsZero()` guard in `target_slack.go` — `TestFormatSlackMessageZeroTimestamp` failed exactly as expected (both assertions), confirming the test is load-bearing; source restored after. `make check` green on the PR head, including a fresh (non-cached) `golangci-lint` run, 0 issues. CI (`check / check`) green on `d5bebb840`. Merges cleanly against `next` (== `main`). Commit title ends ` (closes #298)`, no Claude/Anthropic references or attribution trailers anywhere. Scope check for other targets (per issue DoD item 3) confirmed: `target_log.go` and `target_http.go`/`target_database.go` don't render `event.CreatedAt`; only `target_slack.go` did, and it's fixed.
clawbot
merged commit b0a011f6b4 into next2026-08-24 17:52:26 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #298.
FormatSlackMessage(internal/delivery/target_slack.go) rendered theTimestamp line unconditionally. When a delivery falls back to a
reaped event row (
hydrateEventleavesCreatedAtas the zero valuedeliberately, per #257),
the message carried
*Timestamp:* \0001-01-01T00:00:00Z`` --indistinguishable from the regression #257 was filed against.
Chose to render
*Timestamp:* \unknown`whenCreatedAt.IsZero(), rather than omitting the line, so the message shape stays predictable. A non-zeroCreatedAt` still renders as RFC3339, unchanged.Same code path serves Mattermost;
target_log.godoesn't renderCreatedAtso it isn't affected.Added
TestFormatSlackMessageZeroTimestampininternal/delivery/event_timestamp_test.go, asserting the zero-timecase contains no
0001-01-01and rendersunknown, and that anon-zero
CreatedAtstill renders as RFC3339.make checkgreen, including a fresh (uncached)golangci-lintrunagainst the pinned image.
Review: PASS. Zero-
CreatedAtrenders*Timestamp:* \unknown`with no0001-01-01anywhere in output; non-zero path unchanged (RFC3339/UTC). Mutation test: reverted theIsZero()guard intarget_slack.go—TestFormatSlackMessageZeroTimestampfailed exactly as expected (both assertions), confirming the test is load-bearing; source restored after.make checkgreen on the PR head, including a fresh (non-cached)golangci-lintrun, 0 issues. CI (check / check) green ond5bebb840. Merges cleanly againstnext(==main). Commit title ends(closes #298), no Claude/Anthropic references or attribution trailers anywhere. Scope check for other targets (per issue DoD item 3) confirmed:target_log.goandtarget_http.go/target_database.godon't renderevent.CreatedAt; onlytarget_slack.go` did, and it's fixed.Review: PASS. Zero-
CreatedAtrenders*Timestamp:* \unknown`with no0001-01-01anywhere in output; non-zero path unchanged (RFC3339/UTC). Mutation test: reverted theIsZero()guard intarget_slack.go—TestFormatSlackMessageZeroTimestampfailed exactly as expected (both assertions), confirming the test is load-bearing; source restored after.make checkgreen on the PR head, including a fresh (non-cached)golangci-lintrun, 0 issues. CI (check / check) green ond5bebb840. Merges cleanly againstnext(==main). Commit title ends(closes #298), no Claude/Anthropic references or attribution trailers anywhere. Scope check for other targets (per issue DoD item 3) confirmed:target_log.goandtarget_http.go/target_database.godon't renderevent.CreatedAt; onlytarget_slack.go` did, and it's fixed.