Skip to content

feat(metrics): mark desktop installation source - #164

Merged
Soulter merged 1 commit into
mainfrom
codex/installation-source-metrics
Aug 7, 2026
Merged

feat(metrics): mark desktop installation source#164
Soulter merged 1 commit into
mainfrom
codex/installation-source-metrics

Conversation

@Soulter

@Soulter Soulter commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Set ASTRBOT_INSTALLATION_SOURCE=desktop when launching the packaged AstrBot backend.
  • Extend the desktop-managed command test to cover the installation source marker.
  • Document the new desktop environment variable.

Why

AstrBot's anonymous metrics need a stable installation-source marker so desktop launches can be distinguished from other installation methods.

Impact

Packaged desktop launches now identify their installation source as desktop; existing desktop management markers remain unchanged.

Validation

  • cargo fmt --manifest-path src-tauri/Cargo.toml -- --check
  • cargo test --manifest-path src-tauri/Cargo.toml mark_as_desktop_managed_sets_desktop_management_markers

Summary by Sourcery

Mark packaged desktop backend launches with a stable installation-source environment variable for metrics.

New Features:

  • Introduce the ASTRBOT_INSTALLATION_SOURCE=desktop environment variable for packaged desktop backend launches.

Documentation:

  • Document the new ASTRBOT_INSTALLATION_SOURCE desktop environment variable in the environment variables reference.

Tests:

  • Extend the desktop-managed command test to assert the installation source environment variable is set for packaged desktop launches.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry, we are unable to review this pull request

The GitHub API does not allow us to fetch diffs exceeding 300 files, and this pull request has 864

@Soulter
Soulter force-pushed the codex/installation-source-metrics branch from f13a77c to f39978d Compare August 6, 2026 08:44
@Soulter
Soulter marked this pull request as ready for review August 6, 2026 13:56
@Soulter
Soulter requested a review from zouyonghe August 6, 2026 13:56

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider whether mark_as_desktop_managed should respect a pre-existing ASTRBOT_INSTALLATION_SOURCE env value (e.g., only set it if not already present) to allow explicit overrides in more complex launch scenarios.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider whether `mark_as_desktop_managed` should respect a pre-existing `ASTRBOT_INSTALLATION_SOURCE` env value (e.g., only set it if not already present) to allow explicit overrides in more complex launch scenarios.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Soulter
Soulter merged commit 5bc3a2b into main Aug 7, 2026
4 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