Skip to content

Add daily traffic collection with weekly review cadence - #538

Merged
Alejandro Lopez (soyalejolopez) merged 5 commits into
microsoft:masterfrom
soyalejolopez:soyalejolopez-traffic-collection-fix
Sep 14, 2026
Merged

Alejandro Lopez (soyalejolopez) merged 5 commits into
microsoft:masterfrom
soyalejolopez:soyalejolopez-traffic-collection-fix

Conversation

@soyalejolopez

Copy link
Copy Markdown
Member

Category

  • Bug fix
  • New script
  • New sample

Related Issues

Related to #482. Follow-up to #529.

What's in this Pull Request?

Requested cadence

Keep collecting daily without requiring daily PR merges. Prepare one weekly stats update on Friday at 08:00 America/Chicago, with daylight saving time handled by the schedule timezone. GitHub scheduled runs can be delayed.

Changes

  • Persist daily collection at 06:00 UTC on automation/traffic-stats-staging. Daily runs do not attempt PR creation.
  • Prepare automation/traffic-stats-weekly each Friday and reuse an existing open weekly PR. No auto-merge: publishing remains review-required.
  • Keep daily collection advancing independently while a weekly PR waits for review.
  • Preserve successful GitHub/Clarity source outputs independently and report unavailable sources explicitly.
  • Reconcile durable Clarity state across weekly squash merges without summing overlapping snapshots. Preserve newer rolling-window state and reject unsafe source conflicts.
  • Make catalog builds render already persisted stats rather than performing separate live collection.
  • Add state reconciliation, source-availability, and temporary Git squash-cycle regression coverage; update traffic documentation.

Permissions and rollout

No GitHub App, secret, repository permission, or branch-protection change is included. An approved AUTOMATION_PAT can create the weekly PR; without it the Friday run provides a manual compare link because current organization policy blocks built-in-token PR creation. Daily staging persists independently of that manual step.

After merging, manually run daily collection once to initialize the staging branch, or allow the next daily run to do so. Friday publishing requires that staged data. These changes do not repair an invalid TRAFFIC_TOKEN or CLARITY_API_TOKEN.

Validation

  • npm run check from tools/catalog-build passed, including workflow, state, and Git integration checks.
  • Render-only stats check passed.
  • Independent Claude Opus 4.8 review identified a rolling-state reconciliation issue, which was fixed before push.
  • Synced with current upstream master; the diff contains only the ten intended weekly-publishing files.

github-actions Bot and others added 5 commits July 30, 2026 21:49
Preserve healthy GitHub and Clarity outputs independently, report unavailable sources, and make stranded catalog updates fail visibly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve workflow and generated stats conflicts while preserving pinned actions and independent source publishing behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Persist daily collection on a durable staging branch, publish a single weekly review branch, and reconcile stats across squash-merge cycles.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@soyalejolopez
Alejandro Lopez (soyalejolopez) merged commit 50e7ecb into microsoft:master Sep 14, 2026
5 checks passed
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.

2 participants