Commit Graph

7 Commits

Author SHA1 Message Date
Your Name
a2f042f1c2 test(supply-api): expand e2e coverage and support unix socket dsn
Add broader e2e coverage for account, package, billing, tracing, and reliability scenarios.\nSupport Unix socket DSN formatting in config and cover it with unit tests.\nIgnore local assistant metadata and generated gate artifacts to reduce workspace noise.
2026-04-13 18:53:35 +08:00
Your Name
5ea6750cf3 test(supply-api): validate shipped config samples
Add regression tests for the shipped development and SMS sample configs, and fix the SMS example to match the runtime flat Config schema instead of nested provider blocks. Verified with fresh go test runs for ./internal/config and ./internal/sms before commit.
2026-04-11 11:31:05 +08:00
Your Name
4adeee2e06 fix: close p0 auth and release gate gaps 2026-04-11 09:25:31 +08:00
Your Name
2689291e22 fix: 添加JWT RS256配置支持
- TokenConfig添加Algorithm和PublicKey字段
- 支持HS256(默认)和RS256/RS384/RS512
- 添加parseRSAPublicKey解析PEM格式公钥
2026-04-07 17:46:38 +08:00
Your Name
4bbd609ceb fix: 修复C-04/C-05/C-06/C-07架构级问题
C-06: DBSettlementStore.GetWithdrawableBalance 使用AccountRepository真实查询余额
C-05: DBEarningStore 使用新建的UsageRepository实现ListRecords/GetBillingSummary
C-04: 供应商ID从cfg.Server.DefaultSupplierID配置读取
C-07: PDF链接从cfg.Server.StatementBaseURL配置读取

新增:
- internal/repository/usage.go: 用量记录仓储
2026-04-07 17:24:26 +08:00
Your Name
aeeec34326 fix(supply-api): 修复P2-05数据库凭证日志泄露风险
1. 在DatabaseConfig中添加SafeDSN()方法,返回脱敏的连接信息
2. 在NewDB中使用SafeDSN()记录日志
3. 添加sanitizeErrorPassword()函数清理错误信息中的密码

修复的问题:P2-05 数据库凭证日志泄露风险
2026-04-03 10:06:14 +08:00
Your Name
0196ee5d47 feat(supply-api): 完成核心模块实现
新增/修改内容:
- config: 添加配置管理(config.example.yaml, config.go)
- cache: 添加Redis缓存层(redis.go)
- domain: 添加invariants不变量验证及测试
- middleware: 添加auth认证和idempotency幂等性中间件及测试
- repository: 添加完整数据访问层(account, package, settlement, idempotency, db)
- sql: 添加幂等性表DDL脚本

代码覆盖:
- auth middleware实现凭证边界验证
- idempotency middleware实现请求幂等性
- invariants实现业务不变量检查
- repository层实现完整的数据访问逻辑

关联issue: Round-1 R1-ISSUE-006 凭证边界硬门禁
2026-04-01 08:53:28 +08:00