refactor(usage): address round-3 review on PR #871
- store: guard UsageEventStore.shared() with a class-level anyio.Lock so two concurrent cold-start callers don't both build (and one silently overwrite) the cached instance — mirrors get_shared_storage(). Document that tests should construct the store directly to avoid singleton leak. - migration: rename 20260610 -> 20260607 and fix Create Date to today so `alembic history` isn't future-dated (revision id 007 / down_revision 006 unchanged; single head verified). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2bbf4ed967
commit
3a8ea893c6
+1
-1
@@ -17,7 +17,7 @@ fallbacks (``TEXT``/``TIMESTAMP``); the control plane never queries SQLite.
|
||||
|
||||
Revision ID: 007
|
||||
Revises: 006
|
||||
Create Date: 2026-06-10 12:00:00.000000
|
||||
Create Date: 2026-06-07 12:00:00.000000
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
Reference in New Issue
Block a user