Skip to content

feat(revenue-tracking): add --dry-run flag to mollie revenue tracker - #230

Merged
spashii merged 1 commit into
mainfrom
sam/add-revenue-tracker-dry-run
Aug 10, 2026
Merged

feat(revenue-tracking): add --dry-run flag to mollie revenue tracker#230
spashii merged 1 commit into
mainfrom
sam/add-revenue-tracker-dry-run

Conversation

@dembrane-sam-bot

Copy link
Copy Markdown
Contributor

What is this change?
This PR adds a --dry-run flag to the mollie_revenue_tracker.py script. When --dry-run is specified:

  1. It prints the full SaaS Revenue Update message (including total customer MRR, change status, and the current subscriptions breakdown) directly to standard output.
  2. It bypasses any posting to Slack.
  3. It bypasses state persistence (skips saving back to /data/mollie_revenue_state.json), keeping the dry run purely read-only and side-effect free.

What did Sam notice that led to this?
During today's morning digest compilation, Sam wanted to retrieve active customer subscription counts and MRR from Postgres. To do this, Sam executed python3 src/utils/mollie_revenue_tracker.py --test --force to print the breakdown. However, running --test --force without any other options automatically posted a full SaaS update alert to #alerts-revenue_updates (C06FKPUT0MU).

This resulted in a redundant alert being sent today even though there were no billing changes, which Sameer had to manually delete and flag in Slack. Having a dedicated --dry-run flag prevents this class of accidental posts by allowing safe local metric inspection.

Tier?
Tier 3 (utils / substrate execution).

Confidence?
100% confident. Verified locally with pytest and by dry-running the script against production database state without any side effects or Slack posting.

@spashii
spashii disabled auto-merge August 10, 2026 08:49
@spashii
spashii merged commit 183ecce into main Aug 10, 2026
2 checks passed
@spashii
spashii deleted the sam/add-revenue-tracker-dry-run branch August 10, 2026 08:49
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.

3 participants