chenchuchuan
|
a6f3b3060f
|
feat(core): 写操作幂等守卫与 IdempotencyStore SPI
业务键 + provider 请求键双锁:业务键不带 provider,直连与聚合器共用;
provider 键只防单 provider 内重试。
- 新增 idempotency 包:WriteScope / WriteResult / IdempotencyGuard
- 新增 SPI:IdempotencyStore 及 Claim / Record / Status 四态
- ChannelSdk.writes() 装配守卫;未注入 store 时显式失败,无降级路径
- 崩溃窗口由 provider 键恢复:平台已写但业务键未记成功时回放,不重复写
- testkit 新增 InMemoryIdempotencyStore / MutableClock,junit 改为 test 作用域
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |
chenchuchuan
|
9e6b8c5c61
|
refactor(capability): 详情参数改用 SalesOrderRef / ProductRef
裸 String 在擦除后使 SalesOrderCapable.get 与 ProductCapable.get 签名相同,
一个适配器无法同时实现订单与商品两种能力。改为包装类型后两者可共存。
- 新增 common.ecommerce.model.order.SalesOrderRef / model.product.ProductRef
- SalesOrderCapable / ProductCapable 的 get 参数改为引用类型
- 门面 SalesOrders.get(String) / Products.get(String) 对外签名不变
- LingxingAdapter、ChannelSdkTest 同步适配
- testkit 新增 FakeDirectAdapter 及其测试,验证 core 抽象未被聚合器带偏
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |
chenchuchuan
|
ff9ec456c2
|
refactor: 包名去掉 apelet 前缀并按职责拆分 model 子包
- 包路径 apelet.common.ecommerce → common.ecommerce(四个模块的 main/test 全量迁移)
- model 拆为 account / order / product / support 四个子包,枚举留在根包
- 同步更新 README 包结构与导入路径
行为无变化,仅重命名与目录调整。
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |
chenchuchuan
|
0f929a6be3
|
feat(testkit): InMemory SPI、FakeTransport 与夹具加载
- FakeTransport:按 URL 子串+方法路由,记录全部请求,可直接返回录制响应
- InMemory*:Accounts/TokenStore/CursorStore/Sink/LockProvider
- Fixtures:fixtures/{platform}/{operation}/{case}.json 约定加载
- Responses/TestData:响应与同步测试的快捷构造
目标:适配器单测不依赖网络、数据库、Spring。
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |
chenchuchuan
|
3b8c99d9b1
|
chore: 初始化 common-ecommerce 多模块骨架
四个模块:core / http / testkit / lingxing。
JDK 1.8 编译,依赖版本在 parent 统一管理,
core 仅依赖 slf4j-api,保证无第三方运行时耦合。
Co-Authored-By: Claude <noreply@anthropic.com>
|
3 weeks ago |