Skip to content

feat: 10-minute stats during the v0.14.0 launch; exclude updater assets from totals - #30

Merged
ErikBjare merged 4 commits into
masterfrom
feat/launch-hf-stats
Oct 6, 2026
Merged

ErikBjare merged 4 commits into
masterfrom
feat/launch-hf-stats

Conversation

@ErikBjare

@ErikBjare ErikBjare commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

For the v0.14.0 launch (Discord Tue, Reddit/X Wed, Product Hunt Thu, …) we want to see each post's effect on downloads, so:

  • 10-minute samples during a launch window. The workflow is scheduled every 10 min; a first step decides whether to collect: always until WINDOW_END (2026-10-27), afterwards only if the last sample in stats.csv is ~6 h old, which keeps today's cadence without a second edit. GitHub may delay scheduled runs, so rows carry their own timestamps. Added a concurrency group and git pull --rebase before push so runs can't race each other or the Play Console workflow.
  • data/launch-events.csv: timestamped (UTC) posts per channel to correlate with the samples.
  • Updater assets excluded from the headline total. Every running aw-tauri polls releases/latest/download/latest.json, and updates fetch .sig/.app.tar.gz; v0.14.0's latest.json already has 51 "downloads" after half a day. Those stay in stats-assets.csv (useful on their own: update checks ≈ active Tauri installs) but no longer inflate downloads. Historical effect is ~150 counts across the betas. Note: the Linux Tauri updater fetches the AppImage itself, which can't be told apart from a fresh download.

Per-asset rows (stats-assets.csv) are appended only when a count changes, so the 10-min cadence gives per-version, per-platform time series at the same resolution.

Tested the cadence step locally (window open, window closed + fresh sample → skip, closed + stale → collect) and added unit tests for is_updater_asset.

Also in analyze_stats.py: per-platform and per-version series drop updater assets by default (.sig/.app.tar.gz were counted under macos/linux), and updater_checks() gives the latest.json series per release.

…er assets from totals

- collect-stats runs every 10 min; a cadence step collects every time until
  WINDOW_END (2026-10-27), afterwards only when the last sample is ~6 h old.
  Concurrency group + rebase before push so runs don't race the Play workflow.
- data/launch-events.csv: timestamped launch posts to line up with the samples.
- Headline downloads exclude Tauri updater assets (latest.json polls, .sig,
  .app.tar.gz); they stay in stats-assets.csv as their own signal.
@ErikBjare

Copy link
Copy Markdown
Member Author

@greptileai review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@greptile-apps

greptile-apps Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Changes stats collection cadence and asset filtering logic.

The PR appears safe to merge; both previous findings are addressed.

What we checked:

  • Competing pushes get another attempt: Both workflows put git push before && exit 0. A rejection reaches the wait and rebase, then the next push attempt.

Summary

Adds ten-minute download samples during the launch window and excludes updater assets from download totals.

  • Both collection workflows now retry rejected pushes after pulling and rebasing.
  • Analysis keeps updater checks available separately.
  • A test now checks the actual download total with mixed installer and updater counts.
  • Both previous findings are addressed. No new actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Commit collected data] --> B[Push to master]
  B -->|Success| C[Finish]
  B -->|Rejected| D[Wait, then pull and rebase]
  D --> E{Attempts remain?}
  E -->|Yes| B
  E -->|No| F[Fail the run]
Loading

Reviews (3) · Last reviewed commit: "fix: push with rebase-and-retry in both ..."

Comment on lines +19 to +21
concurrency:
group: collect-stats
cancel-in-progress: false

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Play updates can lose pushes

The new collect-stats group covers only stats runs, not the Play Console workflow. With stats now pushing every ten minutes, a stats commit can land while Play collects its daily data. Play then pushes from its older checkout without pulling, so its push is rejected and the collected Android data never reaches the repository.

The new git pull --rebase protects only the stats side. Give both workflows the same concurrency group, or make both writers pull and retry rejected pushes.

Knowledge Base Used: Collection automation

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 07c0318 and the follow-up: both workflows push with rebase-and-retry.

Comment thread test_collect_stats.py
Comment on lines +4 to +10
def test_updater_assets_are_excluded_from_downloads():
assert is_updater_asset("latest.json")
assert is_updater_asset("activitywatch-tauri-0.14.0-darwin-aarch64.app.tar.gz")
assert is_updater_asset("activitywatch-tauri-0.14.0-linux-aarch64.AppImage.sig")
assert not is_updater_asset("activitywatch-v0.14.0-windows-x86_64-setup.exe")
assert not is_updater_asset("activitywatch-tauri-0.14.0-linux-x86_64.AppImage")
assert not is_updater_asset("activitywatch-v0.14.0-macos-arm64.dmg")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Tests never check download totals

test_updater_assets_are_excluded_from_downloads only checks is_updater_asset(). It would still pass if the skip in downloads() were removed and updater counts returned to the headline total.

Add a test that replaces downloads_by_asset() with mixed updater and installer rows, then checks the exact total from downloads().

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixed in 07c0318: test_downloads_total_excludes_updater_assets checks the total (320).

@ErikBjare

Copy link
Copy Markdown
Member Author

Addressed in 07c0318: collect-play now rebases onto master before pushing (no shared concurrency group, since a pending run in a shared group would replace the daily Play run), and a test checks that downloads() excludes updater assets from the total.

@greptileai review

@ErikBjare

Copy link
Copy Markdown
Member Author

Addressed in 2d9adda: both workflows now push with a retry loop (push; on rejection back off, git pull --rebase, retry up to 5×) instead of a single pull-then-push, so a push landing in between can't fail the run.

@greptileai review

@ErikBjare
ErikBjare merged commit 9715b35 into master Oct 6, 2026
2 checks passed
@ErikBjare
ErikBjare deleted the feat/launch-hf-stats branch October 6, 2026 20:08
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