k88936
|
b23ed023fc
|
文档(会员目录):注明单调校验要求 existing 覆盖完整档位
- 说明缺失档位会让倒挂静默通过,要求新增调用方传全量目录表
|
2026-10-04 10:30:50 +08:00 |
|
k88936
|
dfa92607b4
|
Merge remote-tracking branch 'origin/master' into feat/pricing-plan
Project CI / Backend tests (pull_request) Failing after 1m51s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 3m10s
Project CI / Frontend tests (pull_request) Failing after 1m31s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 4m59s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m50s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m38s
Project CI / Repository checks (pull_request) Failing after 4m27s
Project CI / Native shell tests (pull_request) Successful in 7m43s
# Conflicts:
# docs/project-memory/shared-memory/decision-log.md
# server-rs/crates/module-runtime/src/lib.rs
|
2026-10-03 20:32:40 +08:00 |
|
k88936
|
5826b2e56c
|
fix(会员结算): 升级单冻结账期身份并在支付时校验
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
- ProfileMembershipOrderSnapshot / ProfileMembershipSettlement 增加 cycle_index_before 与 cycle_resets_at_before_micros,建单时写入订单已有的会员快照列,不新增 schema 字段。
- 支付结算前比对冻结期号与刷新时刻,账期已推进则返回「会员状态已变化,请重新下单」,避免按旧周期剩余比例算出的补点叠加到已重置的新周期。
- 抽出 frozen_membership_cycle_matches 纯函数并补单测;历史无快照订单冻结值为 None,跳过校验。
|
2026-10-03 20:18:27 +08:00 |
|
k88936
|
0fc564c4e5
|
fix(会员结算): 拒绝过期新购单覆盖更新的会员
- 冻结的新购单下单时用户无有效会员,若支付前已通过其他订单获得有效会员,结算会按 user_id 删除重插,覆盖更新 / 更长的会员。
- 在 apply_profile_membership_purchase 中当 change_kind 为 Purchase 且 active_row 存在时返回「会员状态已变化,请重新下单」,与升级分支守卫一致。
- 历史无快照的重算路径只会在 active_row 为空时产出 Purchase,不受影响。
|
2026-10-03 19:42:36 +08:00 |
|
k88936
|
5603185a7f
|
refactor(会员报价): 升级报价快照档位与周期改用枚举
- RuntimeProfileMembershipUpgradeQuoteSnapshot 的 current_plan / target_plan / cycle_kind 由 String 改为 RuntimeProfileMembershipPlan / RuntimeProfileMembershipCycleKind,把非法值挡在类型边界外。
- 模块构造点直接写入枚举;记录侧在 build_runtime_profile_membership_upgrade_quote_record 用 as_str() 转回对外 token,HTTP 契约不变。
- spacetime-client 映射改用 plan / cycle_kind 的 back 映射还原枚举;重新生成 module_bindings。
|
2026-10-03 19:39:34 +08:00 |
|
k88936
|
3db258d927
|
fix(会员账期): 非法北京本地时间改用 None 表达
- beijing_local_micros 返回 Option<i64>,不再用 0 兼作非法哨兵,合法 epoch 0 可被区分。
- advance_beijing_months_clamped 对夹取后的合法输入 expect,相关测试助手同步更新。
- 补 beijing_local_micros 区分合法 epoch 与非法输入的用例。
|
2026-10-03 19:26:36 +08:00 |
|
k88936
|
888a94ac86
|
fix(会员): 存量库首次读取补种会员档位目录
- profile.rs 在 membership_plan_row / membership_plan_records 恢复懒播种,避免增量发布不触发 init reducer 导致 profile_membership_plan 为空。
- 下单校验、升级报价、充值中心读取目录前都会先补种代码内种子目录。
|
2026-10-03 19:05:26 +08:00 |
|
k88936
|
ba451bfc0c
|
fix(会员): 退役列保留不删,发布改回追加式兼容
- domain.rs 恢复已退役的 RuntimeProfileMembershipTier 枚举,仅供存量 tier 列兼容。
- profile.rs 将 profile_membership 的 tier / cycle_period_days 还原到原始位置,新字段 plan / cycle_index / cycle_count / cycle_kind 末位追加。
- profile.rs 恢复 profile_recharge_product_config 的 tier 与 membership_* 兼容列,运行时不读不写、写入统一用固定默认值。
- 重新生成 module_bindings;schema guard 无需 allow-breaking 即通过,发布不再触发导出 / 清库 / 回灌。
- 数据契约文档同步标注退役列与六档泥点商品。
|
2026-10-03 17:59:31 +08:00 |
|
k88936
|
44bbc846ae
|
fix(后台会员): 并发上限展示与提示改用后端下发值
- ProfileMembershipPlanAdminListResponse 增加 unlimitedConcurrencyThreshold,会员档位列表接口下发 MEMBERSHIP_UNLIMITED_CONCURRENCY。
- admin-web 的档位响应补上 unlimitedConcurrency,列表“不设上限”展示改用该标志,表单提示与校验改用后端阈值,删除页面硬编码的 128。
- 本地假后台同步补 unlimitedConcurrency 与 unlimitedConcurrencyThreshold。
|
2026-10-03 17:45:30 +08:00 |
|
k88936
|
0c93256b8c
|
Revert "fix(迁移): 补齐会员重构的破坏性迁移导入兼容"
This reverts commit 21f69ef13b.
|
2026-10-03 17:44:30 +08:00 |
|
k88936
|
bc5552a5ea
|
Revert "fix(会员): 回灌后收敛充点商品目录并清理退役会员商品行"
This reverts commit af0721fb78.
|
2026-10-03 17:44:30 +08:00 |
|
k88936
|
3f9b280708
|
fix(后台接口): 会员商品业务拒绝按 400 返回
- is_runtime_profile_membership_domain_error 增加 "会员商品 product_id 无法解析: " 与 "充值商品类型无效:会员商品已迁移到会员档位目录" 前缀匹配,避免这两类可读业务拒绝落到 502。
- 新增 membership_business_rejections_map_to_bad_request 覆盖升级拒绝、商品 id 解析失败与旧会员商品类型三条路径。
|
2026-10-03 17:39:58 +08:00 |
|
k88936
|
ef99e35d28
|
refactor(会员商品): 删除已无构造点的时长错误变体
- 移除 RuntimeProfileFieldError::InvalidRechargeProductDuration 及其 Display 分支;会员商品改走 InvalidRechargeProductKind 后该变体已无构造点。
|
2026-10-03 17:37:29 +08:00 |
|
k88936
|
c9ad084f78
|
fix(后台权限): 补上 membership-plans Tab 授权
- ADMIN_TAB_PERMISSIONS 增加 membership-plans 并把数组长度改为 22,使非 owner 管理员可被授予会员档位页权限,修复该页接口对普通管理员恒 403。
- every_assignable_admin_tab_has_a_backend_route 增加断言:路由使用的每个 Tab 必须登记在 ADMIN_TAB_PERMISSIONS。
|
2026-10-03 17:36:43 +08:00 |
|
k88936
|
78a43b6a13
|
docs(会员目录): 说明档位校验不覆盖展示型权益
- validate_runtime_profile_membership_plan_row_against_catalog 文档注明 model_access 与 concurrent_job_limit 本期仅落字段供展示,不参与随 rank 的单调校验。
|
2026-10-03 17:33:50 +08:00 |
|
k88936
|
1d2574a43f
|
fix(会员计价): 升级报价拒绝到期日早于刷新日的入参
- validate_runtime_profile_membership_upgrade_quote_input 增加 expires_at >= cycle_resets_at 校验,避免回显早于下次刷新日的到期时间。
- 补充到期时刻早于本期刷新时刻的回归断言,并更新函数文档说明。
|
2026-10-03 17:33:23 +08:00 |
|
k88936
|
1811b2206f
|
fix(会员计价): 升级报价先做领域校验再做数值校验
- quote_runtime_profile_membership_upgrade 先跑账期变更 / 档位合法性校验,再跑期号与窗口数值校验,使年付转月付等高期号场景返回 CycleKindChangeUnsupported 而非 InvalidQuoteInput。
- 补充年付转月付的回归断言,覆盖目标账期 period 数小于当前期号的拒绝路径。
|
2026-10-03 17:32:00 +08:00 |
|
k88936
|
af0721fb78
|
fix(会员): 回灌后收敛充点商品目录并清理退役会员商品行
- profile.rs 新增 converge_default_profile_recharge_product_config,在存量库读取路径补齐缺失的 points_1280 / points_3280 档位。
- 同一步骤删除已退役的 membership 类型充点商品配置行,避免冲突迁移把旧 member_* 行原样带回后残留。
- 存量库充值商品目录因此幂等收敛到当前六档点卡,不再停留在旧四档 + 四行会员商品。
|
2026-10-03 17:24:00 +08:00 |
|
kdletters
|
4b529a8952
|
新增支付服务接入与订单收银台
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m59s
Project CI / Backend tests (pull_request) Failing after 4m8s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m9s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 6m20s
Project CI / Frontend tests (pull_request) Successful in 3m17s
Project CI / AI game creator shell web tests (pull_request) Successful in 2m48s
Project CI / Repository checks (pull_request) Failing after 4m15s
Project CI / Native shell tests (pull_request) Successful in 6m52s
新增支付应用、API Key 与外部产品订单接口
接入微信 Native 下单、二维码收银台与支付结果回调
新增后台支付订单与回调投递页面
补齐 SpacetimeDB 支付表、生成绑定、OpenAPI 与使用说明
|
2026-10-03 17:18:13 +08:00 |
|
k88936
|
21f69ef13b
|
fix(迁移): 补齐会员重构的破坏性迁移导入兼容
- migration.rs 为旧迁移包回填 profile_membership 的 plan / cycle_index / cycle_count / cycle_kind 默认值。
- migration.rs 为旧迁移包回填 profile_recharge_order 的 14 个 membership_* 快照默认值,避免回灌导入因缺列失败。
- 新增两条单元测试守护会员表与订单快照的旧包默认值。
- 同步后端架构文档的 profile_membership / profile_recharge_product_config / profile_recharge_order 表目录。
- 记录 SpacetimeDB 2.8.3 持久表删列需显式迁移的实测结论与既有 run_conflict_migration_publish 路径。
|
2026-10-03 17:11:04 +08:00 |
|
k88936
|
1a106eadef
|
每日免费发放额为 0 时前端隐藏该池
- 后端:module-runtime 的 daily_free_points_per_day 校验由「必须大于 0」放宽为只校验上界,错误变体改名 DailyFreePointsPerDayOverflow
- 前端共享层:mudPoints 新增 shouldShowProfileDailyFreePool,判定 remaining > 0 || reset > 0,判定收口一处
- 钱包入口:PlatformMudPointWalletEntry 在每日免费发放额为 0 且无存量时隐藏该行
- 充值弹层:PlatformProfileRechargeModal 池概览按可见池渲染(三列变两列),扣点顺序提示与泥点确认页文案随可见性切换
- Admin Web:账号配置页每日免费泥点允许填 0(校验、min 与文案同步)
- 测试:删除「每日免费必然存在」断言,新增隐藏 / 有存量仍显示 / 发放额为正三类用例,并修正钱包入口测试在 HEAD 上失效的选择器
- 文档:更新会员与泥点前端改造设计文档 §14 与 shared-memory 决策记录
|
2026-10-03 16:48:12 +08:00 |
|
k88936
|
43f0c51120
|
后台用户详情改走只读会员快照
新增只读会员快照 procedure get_profile_membership_snapshot_and_return,不刷新钱包 / 账期、不写库
module-runtime 新增 RuntimeProfileMembershipGetInput 与 RuntimeProfileMembershipSnapshotProcedureResult 及入参构造器
spacetime-client 增加 get_profile_membership_snapshot facade、From 转换与结果映射,并同步生成绑定
build_profile_membership_snapshot 拆成写库与纯读两条路径,共用 from_row 投影
admin_get_user_detail 改用只读会员快照,打开详情不再改用户钱包与会员账期
|
2026-10-03 16:42:48 +08:00 |
|
k88936
|
6f0d773dde
|
会员档位目录种子改由模块初始化播种
新增 init 生命周期 reducer,数据库首次创建时把 profile_membership_plan 整表播种
membership_plan_row 与 membership_plan_records 去掉懒播种,只读路径不再写库
ensure_default_profile_recharge_product_config 不再顺带初始化会员目录
存量数据库此前已由懒播种写入目录行,新建数据库由 init reducer 播种
|
2026-10-03 16:27:04 +08:00 |
|
k88936
|
4c6af9f190
|
会员目录响应下发推荐档位与不设并发上限标志
ProfileMembershipPlanResponse 新增 recommended 与 unlimitedConcurrency 两个派生布尔
module-runtime 新增 PROFILE_MEMBERSHIP_RECOMMENDED_PLAN 常量并导出,作为推荐档位唯一真相源
api-server 目录响应按该常量与 is_unlimited_concurrency 派生标志
前端 ProfileMembershipPlanRecord 契约补上两个字段
membershipCopy 删除硬编码的 'plus' 与 128,并发文案改读 unlimitedConcurrency
充值弹窗推荐标签改读 plan.recommended
更新充值弹窗测试夹具
|
2026-10-03 16:18:14 +08:00 |
|
k88936
|
3031f58875
|
会员升级结算前校验订单冻结的变更前状态
结算补差升级单前比对 settlement.plan_before / cycle_kind_before 与当前会员行,不一致直接拒绝「会员状态已变化,请重新下单」
避免用户先付更高档位升级单后,旧升级单落地把档位 / 周期覆盖回去,出现降档或「年付 + 一个月到期」的矛盾行
api-server 把该业务拒绝映射为 400
|
2026-10-03 16:16:07 +08:00 |
|
k88936
|
3e2ab3cf78
|
会员充值下单不再接受客户端时间参数
RuntimeProfileRechargeOrderCreateInput 删除 created_at_micros 字段,procedure 入参不再携带时间
build_runtime_profile_recharge_order_create_input 同步去掉时间参数
spacetime-module 建单时刻改用 ctx.timestamp,避免客户端把时间设到会员到期前夕压低补差金额
spacetime-client facade 与 mapper、生成绑定同步去掉该字段
api-server 不再自算 current_unix_micros 传入
更新受影响的 module-runtime 单测调用
|
2026-10-03 16:15:36 +08:00 |
|
k88936
|
f9b0cf786d
|
会员升级补差订单到期后按新购价校验结算
新增 check_expired_membership_upgrade_settlement:补差订单在支付前会员已到期时,订单金额必须达到目标周期当前目录价才允许按新购结算,否则拒绝
新增 RuntimeProfileMembershipUpgradeRejection::MembershipExpiredBeforeSettlement 及错误码字符串
module-runtime 导出该判定函数供结算侧复用
spacetime-module 结算分支调用该判定,目录缺档位时返回明确错误
api-server 把「会员已到期,请按新购价格重新下单」映射为 400 业务错误
补充过期补差订单必须覆盖整期新购价的单元用例
|
2026-10-03 16:06:06 +08:00 |
|
k88936
|
4621f76a58
|
会员升级报价拒绝已刷新账期的过期窗口
修正 upgrade.rs 报价校验:now 必须落在 [cycle_started_at, cycle_resets_at) 内,越界按 InvalidQuoteInput 拒绝,避免旧 cycle_index 配零剩余比例多收一个完整月
同步模块头注释、校验函数文档与 InvalidQuoteInput 枚举说明
把「过期窗口只收完整月」的用例改为「过期窗口被拒绝」,保留剩余比例自身的 0 断言
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 15:32:33 +08:00 |
|
k88936
|
aca58b6b25
|
fix(后台接口): 会员升级与档位目录的业务拒绝改为 400
- runtime_profile.rs:新增 is_runtime_profile_membership_domain_error,会员升级报价(非会员 / 重复购买 / 月年互换 / 档位下架 / 非法报价入参)与会员档位目录校验失败统一映射为 400,基础设施错误仍保持 502
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 14:59:37 +08:00 |
|
k88936
|
adfae5adee
|
fix(会员计价): 零时长账期窗口按非法入参拒绝
- module-runtime/membership/upgrade.rs:账期窗口校验由 < 改为 <=,cycle_resets_at 等于 cycle_started_at 时不再退化成「剩余比例为 0」
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 14:59:26 +08:00 |
|
k88936
|
73b53a9dd1
|
fix(会员计价): ceil_div 零分母改为 debug_assert 暴露
- module-runtime/membership/upgrade.rs:ceil_div 增加 debug_assert!(denominator != 0),零分母在测试里立即失败,不再被静默算成 0 元
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 14:58:21 +08:00 |
|
lhk229
|
ae2d1a3a21
|
修复 AGC 生成准备依赖全量素材库的问题 (#592)
Project CI / AI game creator shell Rust crates (push) Successful in 1m47s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 5m1s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 5m18s
Project CI / Frontend tests (push) Successful in 2m27s
Project CI / Backend tests (push) Successful in 5m49s
Project CI / Native shell tests (push) Successful in 6m21s
Project CI / Repository checks (push) Successful in 3m36s
Project CI / AI game creator shell web tests (push) Successful in 2m54s
修复已有项目和素材目录绑定时,AGC 生成准备仍读取完整账户素材库、导致无关素材读取失败阻断生成的问题。
- 新增站内与 External v1 的单目录 GET,按主键读取并校验账号归属;复用目录 DTO,不读取素材列表或创建默认目录。
- 已有 binding 和 partial 恢复改为确认目标目录;首次建绑直接沿用稳定幂等创建,不再读取全库。
- 目录缺失、越权、超时、响应身份不符或会话切换时停止,保留恢复证据,不自动重建、不换键重发生成;已有生成账本继续沿用冻结快照恢复。
- 既有素材库与目录创建、修改、删除 API 合同保持不变,持久化表结构不变。同步 OpenAPI、生成绑定及技术文档。
验证:
- AGC Rust:目录绑定 7 项、生成 94 项、资源编辑 60 项、抠图 5 项通过(目录绑定用例包含在生成组中)。
- api-server:External Editor 30 项、受保护路由矩阵 3 项通过。
- 真实隔离 SpacetimeDB:目录读取成功、空目录、缺失、越权、删除后缺失、只读不变,以及既有幂等/并发/孤儿检查通过。
- smoke 脚本测试 4 项通过;module 编译、生成绑定、87 张表 schema guard、DDD、编码、文档索引、定向 Rust 格式与 diff 检查通过。
- 已比较 OpenAPI:除新增单目录 GET 外,原有定义逐项保持一致。
验证限制:未完成独立 API `/healthz` 联调,本地隔离数据库与授权配置未就绪;启动尝试已停止并清理。未运行全量测试或真实付费生成。
发布顺序:先发布后端模块与 API,再发布新客户端;不提供全库回退。#574 的素材分页、筛选及按素材 ID 读取不在本 PR 范围内。
Closes #550
Reviewed-on: #592
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
|
2026-10-03 14:48:54 +08:00 |
|
k88936
|
14ddf09f30
|
Merge remote-tracking branch 'origin/master' into feat/pricing-plan
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m28s
Project CI / Backend tests (pull_request) Failing after 53s
Project CI / Native shell tests (pull_request) Failing after 1m33s
Project CI / Frontend tests (pull_request) Failing after 1m2s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 5m43s
Project CI / AI game creator shell web tests (pull_request) Failing after 45s
Project CI / Repository checks (pull_request) Failing after 1m3s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 5m24s
|
2026-10-03 13:36:04 +08:00 |
|
k88936
|
90e520fdba
|
refactor(会员): 升级报价改为只读,不再刷新账期与钱包
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
- profile.rs:build_profile_membership_upgrade_quote_record 不再调用 refresh_profile_wallet_expiring_points,改用只读投射 project_profile_membership_cycle_at 把账期推进到当前时刻
- profile.rs:报价接口不再写库 / 发账本,不会提前消耗用户的懒刷新,同时保持与建单、结算同口径
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 13:32:54 +08:00 |
|
k88936
|
4eb4c6ae17
|
docs(会员): 补充会员账期推进与升级报价的逻辑注释
- profile.rs:advance_profile_membership_cycle_to 补充「锚点恒定、期号可推导、落库仅作单调水位、时钟回拨不重放」说明
- profile.rs:refresh_profile_membership_cycle 补充未换期(含时钟回拨)直接返回的守卫注释
- profile.rs:membership_upgrade_quote_input 注明期号即账期水位、年付补差按剩余整月折算
- profile.rs:build_profile_membership_upgrade_quote_record 与 build_profile_membership_order_snapshot 补充账期口径说明
- upgrade.rs:注明年付补差剩余整月来自单调水位、不会因重复刷新漂移
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 13:31:25 +08:00 |
|
k88936
|
16f92f2110
|
refactor(会员): 会员档位目录移除无用的 sort_order,统一按 rank 排序
- module-runtime catalog.rs:RuntimeProfileMembershipPlanRecord 与种子目录去掉 sort_order,目录单测改为按 rank 断言
- module-runtime domain.rs/commands.rs:后台改价入参与构建函数去掉 sort_order
- spacetime-module profile.rs:profile_membership_plan 表结构去掉排序列,membership_plan_records 改按 rank 升序读取
- shared-contracts runtime.rs:ProfileMembershipPlanResponse 与 AdminUpsertProfileMembershipPlanRequest 移除 sortOrder
- spacetime-client:客户端签名、mapper 与 module_bindings 同步移除 sortOrder
- api-server runtime_profile.rs:响应构建与测试夹具去掉 sortOrder
- admin-web:AdminMembershipPlanPage 移除「排序」输入,档位列表改为按 rank 排序,契约类型同步
- packages/shared:ProfileMembershipPlanRecord 去掉 sortOrder,充值弹层改为直接沿用后端的 rank 顺序
- docs:泥点三池与会员计费后端设计同步目录字段与后台能力说明
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 13:14:04 +08:00 |
|
k88936
|
e5de57f7f8
|
feat(会员): 管理接口校验调用方身份、写入侧拦倒挂目录、会员订单冻结结算快照
- profile.rs:10 个配置管理 procedure(任务/钱包/充值商品/会员档位/升级报价)补 require_editor_generation_runtime_service_identity,只允许 api-server 服务身份调用
- catalog.rs:新增 validate_runtime_profile_membership_plan_row_against_catalog,写入侧校验 rank 与月价/年价/每期泥点严格递增并拒绝倒挂
- errors.rs:新增 RuntimeProfileFieldError::InvalidMembershipPlanOrder 及中文文案
- lib.rs:导出 validate_runtime_profile_membership_plan_row_against_catalog
- catalog.rs:新增 4 个单测覆盖种子目录、单调改价、倒挂价格/泥点与重复 rank
- profile.rs:会员订单建单时冻结档位/价格/补点快照到订单行,支付结算只认快照,历史 Pending 订单回退按目录重算
- profile.rs:新增 project_profile_membership_cycle_at 只读投射账期,建单金额不再写库刷新,与预览/结算口径一致
- profile.rs:支付结算不再因档位下架拒绝已受理订单,避免付款回调卡死
- profile.rs:新增 2 个单测覆盖订单快照写入读回与无快照回退
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 12:46:50 +08:00 |
|
k88936
|
7acae0d308
|
后台契约与接口透出会员变更快照与用户会员状态
- shared-contracts 新增 AdminMembershipOrderChangePayload 与 AdminProfileMembershipPayload
- AdminProfileWalletPayload.membership_limited_points 改名 monthly_points
- AdminRechargeOrderEntryPayload 增加 membership_change 快照字段
- AdminUserDetailResponse 增加 membership 字段
- admin_recharge 映射会员订单快照与用户会员中心投影
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 11:48:24 +08:00 |
|
k88936
|
6d04f88f41
|
让充值商品默认档迁移识别旧迁移遗留的行
resolve_default_point_product_migration 同时识别停用的「首充双倍」行(赠送为 0 或等于面额)与在售的「首充加赠」行
更新迁移单测:disabled_seed 按旧迁移后的真实状态构造,并补充「首充加赠」用例
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 11:15:37 +08:00 |
|
k88936
|
92917f57c9
|
升级报价遇到目录倒挂时改为报错
quote_runtime_profile_membership_upgrade 用 checked_sub 替换 saturating_sub,价格或每期泥点倒挂时返回 InvalidQuoteInput
新增 inverted_catalog_price_and_points_are_rejected 覆盖原本会算成 0 元升级的场景
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 11:15:34 +08:00 |
|
k88936
|
119eb7c8b3
|
收紧后台会员档位与充值商品的校验和报错文案
可购买档位新增 period_points == 0 拒绝;不可购买档位固定使用目录种子的并发上限与模型权限
InvalidRechargeProductTier 拆为 InvalidRechargeProductKind 与 InvalidRechargeProductFields,报错不再误导运营
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-03 11:15:30 +08:00 |
|
k88936
|
06eb4e668c
|
修复(计费): 升级报价总期数改由周期类型推导
- 删除 RuntimeProfileMembershipUpgradeQuoteInput.cycle_count 入参,改由 target.cycle_kind.cycle_count() 推导(月付 1 / 年付 12),杜绝入参期数与周期类型不一致导致按错误期数计费
- 报价数值自检的期号上界改为相对推导出的总期数判断
- spacetime-module 构造报价入参时不再传 cycle_count
- 同步升级报价单测:年付 12 期、当前第 3 期 → 剩余完整月数 9,金额与测试夹具一并修正
- 同步设计文档 §3 入参与自检说明、§5.3 年付示例(remainingFullMonths 9 / amountCents 158334)
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-02 20:26:48 +08:00 |
|
k88936
|
bc3d8dc7da
|
注释(计费): 记录会员目录重建暂不缓存的原因
runtime_profile_membership_plan_catalog 加 TODO,说明每次重建只有 5 行、开销可忽略
按作者意见标记 wont fix,暂不改 LazyLock / &'static 缓存
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-02 20:06:07 +08:00 |
|
k88936
|
047e6d72e4
|
重构(计费): 会员档位 rank 解析改为可失败返回
runtime_profile_membership_plan_rank 返回 Option<u8>,目录缺行时返回 None
去掉 unwrap_or(0),不再把目录缺失伪装成 Normal 而误报 NotUpgrade
plan_rank_follows_catalog_order 测试断言同步改为 Some(..)
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-02 20:05:51 +08:00 |
|
k88936
|
83dbd0cc77
|
修复(计费): 升级报价拒绝越界数值入参
- 新增 RuntimeProfileMembershipUpgradeRejection::InvalidQuoteInput 及 wire token
- 报价前校验期号范围与账期窗口,避免 saturating_sub 静默夹取
- 新增 invalid_numeric_input_is_rejected 回归测试
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-02 19:57:04 +08:00 |
|
k88936
|
f09701f6d4
|
重构(计费): module-runtime 去掉通配 re-export 改为策展导出
- lib.rs 移除 pub use civil_calendar::*,公历基元只保留 civil_calendar:: 命名空间
- lib.rs 移除 pub use membership::*,改为只重导出对外的会员契约符号
- 未改动 spacetime-module / spacetime-client / api-server,现有引用保持可用
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-02 19:56:54 +08:00 |
|
k88936
|
8e1471d7af
|
测试(计费): 固化会员目录价格与泥点随 rank 递增的不变量
在 catalog 文档写明升级补差依赖的单调性不变量,并新增回归测试断言 rank 越高月价、年价、每期泥点严格递增
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-02 19:23:36 +08:00 |
|
k88936
|
58a79a2e4e
|
修复(计费): 北京本地时间换算校验当日时刻范围
beijing_local_micros 增加 time_of_day_micros 越界即返回 0 的校验,避免越界时刻被解释成另一天
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-02 19:22:36 +08:00 |
|
k88936
|
5ab6f161d0
|
文档(计费): 修正北京本地时间换算的返回值说明
beijing_local_micros 文档由「本地日期不存在返回原值」改为「返回 0」,与实际实现一致
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-02 19:13:31 +08:00 |
|
k88936
|
f810064657
|
文档(计费): 澄清档位排序以目录 rank 为准
RuntimeProfileMembershipPlan 文档改为说明排序由目录 rank 决定、枚举不实现 Ord,避免误以为变体顺序是排序契约
Co-authored-by: Junie <junie@jetbrains.com>
|
2026-10-02 19:13:10 +08:00 |
|