Skip to content

fix(data): correct 2026-09-01 snapshot's prs_opened count - #16

Merged
mike-wendt merged 1 commit into
mainfrom
fix-2026-09-01-activity-data
Sep 3, 2026
Merged

fix(data): correct 2026-09-01 snapshot's prs_opened count#16
mike-wendt merged 1 commit into
mainfrom
fix-2026-09-01-activity-data

Conversation

@mike-wendt

@mike-wendt mike-wendt commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Found while verifying all current snapshot data end-to-end against live GitHub API values, per your request.

8/31 and 9/2 check out exactly against live data (issues/PRs opened/closed/merged, commits, all verified via the Search API and commit history directly). 9/1 had one real discrepancy: activity.prs_opened was stored as 0, but GitHub shows 2 PRs (#1685, #1686) were actually opened that day.

Root cause: PR #9 relabeled this snapshot's date field from 2026-09-02 to 2026-09-01 (the collect workflow ran late, and the manual dispatch that recovered it was mislabeled) but never re-ran the activity queries against the corrected date. The stored 0s are what an early-morning (~47 minutes into the day) 2026-09-02 query would show -- not real 2026-09-01 data. Verified this precisely: both real PRs were created at 04:54 and 22:18 UTC on 9/1, both well before this snapshot's own collected_at (2026-09-02T00:47:38Z), so a correct created:2026-09-01 query would have found them.

Every other activity field (issues_opened, issues_closed, prs_merged, prs_closed, commits) happened to be 0 under both interpretations, so this is the only field that was actually wrong.

repo/labels fields are untouched -- they're point-in-time gauges with no historical API, so no rerun makes them accurate for 2026-09-01 specifically. That's the same already-documented limitation as any --date backfill, not something this PR changes.

Fix

Patched the one field directly rather than rerunning fetch_metrics.py --date 2026-09-01 -- I don't have SIRIUS_TRAFFIC_TOKEN locally, and a full rerun would have regressed this file's currently-correct traffic data (as_of_date: 2026-08-31, real values) back to null.

Test plan

  • python3 -c "import json; json.load(...)" confirms valid JSON
  • uv run scripts/build_site.py exits cleanly
  • prs_opened: 2 verified directly against gh api /search/issues?q=repo:sirius-db/sirius+type:pr+created:2026-09-01
  • Confirm Verify pipeline / verify passes on this PR

🤖 Generated with Claude Code

PR #9 relabeled this snapshot's date field from 2026-09-02 to
2026-09-01 (the collect workflow ran late and the manual dispatch that
recovered it was mislabeled), but never re-ran the activity queries
against the corrected date -- so its activity block still reflected an
early-morning (~47min into the day) 2026-09-02 query, not real 2026-09-01
data. issues_opened/closed, prs_merged/closed, and commits all happened
to be 0 under both interpretations, but prs_opened was wrong: stored 0,
real value 2 (PRs #1685 and #1686, both created well before this
snapshot's own collected_at timestamp). Verified directly against
GitHub's Search API.

repo/labels fields are left as-is -- they're point-in-time gauges with
no historical API, so no rerun can make them accurate for 2026-09-01
specifically; this is the same already-documented limitation as any
--date backfill, not something this fix changes.
@mike-wendt mike-wendt self-assigned this Sep 3, 2026
@mike-wendt mike-wendt added the bug Something isn't working label Sep 3, 2026

@mike-wendt mike-wendt left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-reviewed and approved

@mike-wendt
mike-wendt merged commit c33ae63 into main Sep 3, 2026
1 check passed
@mike-wendt
mike-wendt deleted the fix-2026-09-01-activity-data branch September 3, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant