feat(account): 账户层级与分桶限额、分账月账、对外接口文档,并修复审查三项与并发对账竞态
应用(app/) - 新增 account_admission.py:可用性查询与真实调用准入共用同一套主体判定(账户状态、网关绑定、 赠送门闩、未核清调用、主体级联停用、生效额度、当月用量、扣费桶余额) - 号段分配前移到业务锁之前(_mutate / 开户 provisioning / 赠送入账),发号器改用独立连接池 (db_generator_pool_size、db_generator_max_overflow;web 与 worker 双装配) - 凭证列表改分页 + status/subAccountId/scopeId 筛选,回执补 scopeId/subAccountId/scopeType - 并发同 requestId 对账:命中重放时重读业务行、版本不一致时在新事务复查幂等行, 消除"已成功却返回过期 version/phase"与误判版本冲突 - 门店/员工 scope 与员工自然月额度、分账维度索引、月账单直读、超额告警 测试(tests/) - 新增:review_findings_repro(三项修复护栏)、test_account_scope、test_account_sub_account、 test_account_usage_month、test_account_ledger_scope、test_account_overage_alerts、 test_account_scope_e2e - test_account_gifts 补并发对账重放护栏用例 文档(docs/、README) - external-api-reference.md(35 个操作全覆盖,路由自应用导出机械校验)、external-api-flow.html(含 SSE) - architecture-code-quality-risks-20260930.md(含修复记录 §8);设计文档 / p0 契约 / 开发计划同步 - DDL 与对账 SQL 归档至 scripts/sql/,新增 scripts/p1_mysql_instance.sh 隔离 MySQL 实例脚本 回归(python3 -m pytest -q -W error::sqlalchemy.exc.SAWarning) - 隔离 MySQL 8.0.43:2211 用例 / 2181 通过 / 0 失败 / 30 跳过 / 207s - SQLite:2211 用例 / 1677 通过 / 0 失败 / 534 跳过 / 69s
Showing
app/account_admission.py
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
docs/external-api-flow.html
0 → 100644
This diff is collapsed.
Click to expand it.
docs/external-api-reference.md
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
scripts/p1_mysql_instance.sh
0 → 100755
scripts/sql/README.md
0 → 100644
File moved
File moved
scripts/sql/archive/README.md
0 → 100644
scripts/sql/check.sql
0 → 100644
This diff is collapsed.
Click to expand it.
scripts/sql/saas/README.md
0 → 100644
scripts/sql/schema.sql
0 → 100644
This diff is collapsed.
Click to expand it.
tests/test_account_ledger_scope.py
0 → 100644
tests/test_account_overage_alerts.py
0 → 100644
tests/test_account_scope.py
0 → 100644
This diff is collapsed.
Click to expand it.
tests/test_account_scope_e2e.py
0 → 100644
tests/test_account_sub_account.py
0 → 100644
This diff is collapsed.
Click to expand it.
tests/test_account_usage_month.py
0 → 100644
tests/test_review_findings_repro.py
0 → 100644
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment