Skip to content

feat(usage): on-demand period-scoped usage-data reset - #5831

Merged
diegosouzapw merged 1 commit into
release/v3.8.44from
feat/port-pr-2272-usage-reset
Jul 3, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.44from
feat/port-pr-2272-usage-reset

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks to @teddytkz for the original implementation.

Adds a Settings → Storage "Reset usage data" action that deletes usage-analytics rows older than a chosen period (5m, 1h, 3h, 6h, 12h, 1d, 7d, 30d) or wipes them entirely ("all"). Covers usage_history, daily_usage_summary, and hourly_usage_summary, all in a single transaction, with a whitelisted period validated both in the DB layer and via Zod in the route.

This PR is scoped to the usage-reset concern only. The connection bulk-delete part is intentionally not included — OmniRoute already has a native bulk-delete for provider connections.

Test plan

  • node --import tsx/esm --test tests/unit/usage-history-reset.test.ts — new regression test (fails without the implementation, passes with it)
  • npm run typecheck:core
  • npx eslint on all changed files
  • npm run check:docs-sync
  • npm run check:any-budget:t11

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.43 to release/v3.8.44 July 2, 2026 16:18
@diegosouzapw
diegosouzapw force-pushed the feat/port-pr-2272-usage-reset branch from 35e9ab9 to 0d3eafd Compare July 3, 2026 05:12
@diegosouzapw
diegosouzapw merged commit 0e98534 into release/v3.8.44 Jul 3, 2026
2 of 3 checks passed
@diegosouzapw
diegosouzapw deleted the feat/port-pr-2272-usage-reset branch July 3, 2026 05:12
@diegosouzapw diegosouzapw mentioned this pull request Jul 4, 2026
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
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