Skip to content

fix(workflows): send Statsig event time in milliseconds#69716

Open
clown6613 wants to merge 1 commit into
anthropics:mainfrom
clown6613:fix/dedupe-statsig-timestamp-ms
Open

fix(workflows): send Statsig event time in milliseconds#69716
clown6613 wants to merge 1 commit into
anthropics:mainfrom
clown6613:fix/dedupe-statsig-timestamp-ms

Conversation

@clown6613

@clown6613 clown6613 commented Jun 20, 2026

Copy link
Copy Markdown

What

claude-dedupe-issues.yml sent the Statsig time field as epoch seconds (now | floor) and as a string.

Statsig's /v1/log_event API expects time as epoch milliseconds (number). The sibling workflow log-issue-events.yml already does this correctly via $(date +%s)000.

-                time: (now | floor | tostring)
+                time: (now * 1000 | floor)

Why

As-is, every github_duplicate_comment_added event is timestamped ~1000x in the past (1970-era when interpreted as ms), so events are misdated or dropped. This aligns the dedupe workflow with the sibling workflow's millisecond, numeric format.

Spec reference

Per the Statsig Log Custom Events API, time accepts a "unix timestamp in milliseconds or ISO date string", with the example value "time": 1616826986211 (13-digit number). Epoch seconds is not an accepted format, and a numeric string (e.g. "1781958740") is neither a millisecond number nor an ISO date string. The fix produces the documented numeric-millisecond form.

Verification

$ echo | jq -n '{time: (now * 1000 | floor)}'
{ "time": 1781958740731 }   # 13-digit ms, numeric

The claude-dedupe-issues workflow sent the Statsig `time` field as
epoch seconds (`now | floor`) and as a string, while Statsig's
/v1/log_event API expects epoch milliseconds as a number. The sibling
workflow log-issue-events.yml already does this correctly via
`$(date +%s)000`.

Change to `now * 1000 | floor` so duplicate-comment events are
timestamped in milliseconds, matching the sibling workflow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant