gitdataai/libs
ZhenYi 8a6ec1f62f fix(billing): add transaction isolation and fix race conditions
Critical fixes:
- Wrap balance updates in database transactions with SELECT FOR UPDATE
- Move history insert after balance validation to prevent orphaned records
- Use Decimal throughout to avoid silent conversion failures
- Prevent concurrent requests from causing negative balances

Tasks resolved:
- Task #4: Silent Decimal conversion failures
- Task #5: Missing transaction isolation (race conditions)
- Task #6: History inserted before validation
2026-04-28 10:12:24 +08:00
..
agent fix(billing): add transaction isolation and fix race conditions 2026-04-28 10:12:24 +08:00
agent-tool-derive init 2026-04-15 09:08:09 +08:00
api refactor(agent): replace custom ReAct loop with rig::agent::Agent 2026-04-28 09:42:36 +08:00
avatar init 2026-04-15 09:08:09 +08:00
config refactor(db): simplify read-replica to single connection for CNPG 2026-04-26 01:03:39 +08:00
db revert(db): remove check_compatibility — method not available in sqlx 0.8 2026-04-26 15:49:51 +08:00
email fix: resolve remaining warnings and fix API method name 2026-04-27 16:42:01 +08:00
fctool refactor(fctool): add descriptions to tools and simplify model sync 2026-04-28 09:43:15 +08:00
frontend feat(api): pre-compress static assets with brotli and gzip 2026-04-25 20:09:09 +08:00
git fix(git): LFS token validation and remove IP rate limiting 2026-04-27 16:40:01 +08:00
migrate feat: thinking_content column + first-project budget logic 2026-04-26 13:11:06 +08:00
models feat(agent): model sync improvements - deduplication and offline status 2026-04-27 16:40:10 +08:00
observability fix: resolve remaining warnings and fix API method name 2026-04-27 16:42:01 +08:00
queue refactor(agent): replace custom ReAct loop with rig::agent::Agent 2026-04-28 09:42:36 +08:00
room fix(billing): track actual tokens in ReAct mode instead of hardcoded 0/0 2026-04-28 10:04:54 +08:00
rpc chore(rpc): regenerate after removing metrics endpoints 2026-04-24 13:22:01 +08:00
service refactor(fctool): add descriptions to tools and simplify model sync 2026-04-28 09:43:15 +08:00
session feat(admin): add admin panel with billing alerts and model sync 2026-04-19 20:48:59 +08:00
session_manager perf: sequence generation Redis-only + session MGET batch 2026-04-24 00:04:27 +08:00
transport init 2026-04-15 09:08:09 +08:00
webhook init 2026-04-15 09:08:09 +08:00