Skip to content

Switch usage sync to Redis-only identities#34

Merged
Willxup merged 12 commits into
mainfrom
feature/issue-19-redis-only-sync
May 4, 2026
Merged

Switch usage sync to Redis-only identities#34
Willxup merged 12 commits into
mainfrom
feature/issue-19-redis-only-sync

Conversation

@Willxup
Copy link
Copy Markdown
Owner

@Willxup Willxup commented May 3, 2026

Summary

  • Switch usage ingestion to the Redis-only path and remove legacy export/snapshot run code.
  • Split Redis usage processing from metadata sync; add independent metadata runner, manual sync path, and focused app wiring.
  • Add schema migrations for Redis usage fields, legacy snapshot cleanup, unified usage identities, stats backfill, legacy metadata table removal, and prefix-generated identity cleanup.
  • Replace auth file/provider metadata tables and APIs with unified usage_identities, including aggregated usage stats and safe public identity responses.
  • Update metadata sync to write usage identities only, preserve provider partial-failure behavior, and stop syncing provider prefix values as identities.
  • Update Usage Events, Credentials, Analysis, and Pricing frontend/backend contracts for unified identities and stable source filters.
  • Filter zero-request source options from usage event filters and remove obsolete time params from the filter endpoint/client.
  • Fix credential source tagging, CPA metadata response decoding, mobile pricing card layout, and Overview cost availability for zero-token unpriced models.
  • Update README wording and configuration examples for the Redis-only sync behavior.

Closes #19

Test plan

  • go test ./cmd/... ./internal/...
  • npm --prefix web test -- StatCards.test.ts CostTrendChart.test.ts
  • npm --prefix web test -- api.test.ts
  • npm --prefix web test -- UsagePage.logic.test.ts
  • npm --prefix web run build
  • git diff --check
  • Started backend with project .env and manually smoke-tested UI/API

Willxup added 12 commits May 4, 2026 05:14
Introduce schema migrations for Redis-backed usage storage and remove legacy snapshot-run storage so startup can upgrade existing databases safely.
Route metadata sync, app wiring, and public APIs through unified usage identities while retiring the old auth-files and provider-metadata paths.
Align event filters, credential stats, and frontend API types with usage identities so historical provider and auth-file usage resolves consistently.
Accept CPA management metadata responses wrapped under their endpoint keys so scheduled metadata sync can refresh provider identities.
Let the Pricing card expand on mobile so saved model prices remain visible while preserving the desktop fixed-card layout.
@Willxup Willxup merged commit ce5974b into main May 4, 2026
13 checks passed
@Willxup Willxup deleted the feature/issue-19-redis-only-sync branch May 4, 2026 16:33
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