Skip to content

fix(action): keep one anonymous install id across Action runs - #295

Merged
mountainowl merged 2 commits into
mainfrom
bugfix/action-stable-install-id
Oct 22, 2026
Merged

mountainowl merged 2 commits into
mainfrom
bugfix/action-stable-install-id

Conversation

@mountainowl

Copy link
Copy Markdown
Owner

Requested by Ajay Singh · project thread

What changed

  • Before: the Action keeps its state in ${{ runner.temp }}/bubo, which starts empty on every run. Every run therefore created a new random install_id and new project IDs. One repository using the Action looked like one install per run, which inflated install counts and pushed retention towards zero.
  • After: the Action restores var/state/install_id and var/state/analytics_projects.sqlite with actions/cache before Bubo starts. The cache is keyed by github.repository_id, so a repository's runs share one anonymous install.
  • How:
    • The new step is pinned by commit (actions/cache v6.1.0), like the other actions.
    • The cached files hold only random IDs. Nothing about the repository is sent, and the cache key never leaves GitHub.
    • GitHub's cache scoping still applies: PR runs read caches from their own PR and from the base branch. A repository's PRs share one id once a run on the default branch has saved the cache.

Verification

  • tests/test_action_install_id.py runs the real bubo init and the real identity code in two fresh roots. It carries over only the paths listed in the Action's cache step.
  • On main there's no cache step, and two runs give two install ids. With this change both runs share one id. The test also checks that the cache step runs before Initialize Bubo workspace, is keyed by repository ID, and is pinned by SHA.
  • The layout tests pass, and ruff check, ruff format --check and cz check pass.
  • docs/pages/github-action.mdx lists the new step.

Generated by Claude Code

runner.temp starts empty on every run, so each Action run created a new
random install_id and new project ids. One repository using the Action
showed up as one install per run, which inflated installs and pushed
retention towards zero.

The Action now restores var/state/install_id and analytics_projects.sqlite
with actions/cache, keyed by github.repository_id. The cached files hold
only random ids; nothing about the repository is sent.
@mountainowl mountainowl self-assigned this Oct 22, 2026
@mountainowl
mountainowl merged commit 7d34e34 into main Oct 22, 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.

1 participant