Skip to content

feat(storage): archive expired usage events - #387

Merged
Willxup merged 2 commits into
mainfrom
worktree/usage-events-archive
Jul 30, 2026
Merged

feat(storage): archive expired usage events#387
Willxup merged 2 commits into
mainfrom
worktree/usage-events-archive

Conversation

@Willxup

@Willxup Willxup commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • move raw usage events older than 90 local calendar days into one permanently retained archive table during daily maintenance
  • preserve original event IDs and provide an archive-plus-hot replay path for future startup migrations
  • remove the destructive cleanup toggle and run full SQLite VACUUM only when free-page and disk-space safeguards pass

Validation

  • full backend verification
  • targeted repository, migration, and service tests under UTC and Asia/Shanghai
  • Windows repository cross-compilation
  • focused read-only review of archive transactions, migration replay, and VACUUM safeguards

Move raw events older than 90 local calendar days into a permanent cold table for future migration rebuilds. Replace destructive cleanup configuration and unconditional daily VACUUM with fixed archiving and guarded storage maintenance.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d16a37be38

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread internal/repository/usage_event_archive.go Outdated
Comment thread internal/repository/usage_event_archive.go
@Willxup
Willxup merged commit f5b1d19 into main Jul 30, 2026
4 checks passed
@Willxup
Willxup deleted the worktree/usage-events-archive branch July 30, 2026 11:24
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