Skip to content

Updater check-in metrics: daily active installs via the worker (#111 Phase 2) - #120

Draft
shellen wants to merge 1 commit into
mainfrom
updater-checkins
Draft

Updater check-in metrics: daily active installs via the worker (#111 Phase 2)#120
shellen wants to merge 1 commit into
mainfrom
updater-checkins

Conversation

@shellen

@shellen shellen commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Phase 2 of #111.

  • New worker endpoint GET /api/updater/latest.json — records one row per (day, salted-IP-hash) in D1, then 302-redirects to the GitHub latest.json. Uniques ≈ daily active installs. Privacy: only an HMAC of the IP (existing HMAC_SECRET), no raw IP/UA/version; a D1 failure never blocks the redirect (update delivery is the contract).
  • tauri.conf.json updater endpoints: worker URL first, GitHub URL kept second as fallback — a worker outage cannot block updates. The updater already follows redirects (the GitHub URL itself redirects to the asset).
  • /api/stats gains updater_checkins_by_day (last 30 days); the weekly metrics snapshot records uniques/totals into data/metrics.csv.
  • 3 new vitest cases (redirect + row written, same-IP increments vs new-IP uniques, stats reporting) — 20/20 pass.

Deploy ordering after merge: cd worker && npx wrangler deploy before cutting the release that ships the new endpoint (deploying early is harmless — the endpoint just redirects).

Draft — hold for the next release train; do not merge or deploy this week.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AdXEsWQTadb9qbTQjLkMqn

Phase 2 of #111. The updater manifest is now served via
pullread.com/api/updater/latest.json, which records one row per
(day, salted IP hash) in D1 and 302-redirects to the GitHub manifest —
daily actives and uniques without telemetry: no raw IP, no UA, no
version stored, and counting failures never block the redirect.

- tauri.conf.json updater endpoints: worker URL first, GitHub second
  as fallback so a worker outage never blocks updates
- /api/stats reports updater_checkins_by_day (30 days)
- metrics-snapshot records daily uniques/totals to data/metrics.csv

Deploy ordering: `wrangler deploy` the worker BEFORE cutting the
release that ships the new endpoint (harmless before; the endpoint
just redirects).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AdXEsWQTadb9qbTQjLkMqn
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