Skip to content

[codex] unify shop account flow and billing safety#24

Merged
cnYui merged 17 commits into
mainfrom
codex/shop-flow-security-billing-repair
Jun 11, 2026
Merged

[codex] unify shop account flow and billing safety#24
cnYui merged 17 commits into
mainfrom
codex/shop-flow-security-billing-repair

Conversation

@cnYui

@cnYui cnYui commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • 拆分并统一 Shop 登录、注册、重置密码页面,复用已确认的左侧贴底人物背景。
  • 将前台兑换改为登录态邀请码兑换,清理旧购买/支付/结果页面里的固定价格、31 天和手机号表单语义。
  • 调整 Account 信息层级:余额和 API key 前置,说明与流水默认收起,API key reveal 不再返回误导性的 60 秒过期字段。
  • 完成 usage 自动导入状态、历史 usage 补账 CLI,以及 API key 静态加密 helper / runtime / 迁移 CLI。

Verification

  • npm run build:css
  • npm test:125 pass / 0 fail
  • git diff --check
  • SHOP_API_KEY_ENCRYPTION_SECRET=0123456789abcdef0123456789abcdef node scripts/shop-encrypt-api-keys.js --dry-run --db data/shop.sqlite

Notes

  • API key 加密启用后需要配置 SHOP_API_KEY_ENCRYPTION_SECRET,长度至少 32 个字符。
  • 旧明文 API key 迁移脚本默认 dry-run,--apply 前会创建数据库备份;本 PR 未对真实库执行 --apply

@cnYui cnYui left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

客观 review 结论:当前没有阻塞合并的问题。重点检查了旧购买/支付/31 天文案、登录态兑换归属、API key 密文存储/迁移、内部 status hash 查询和补账脚本路径。发现首页仍残留“手机号和邀请码”旧兑换语义,已在 20216d1 修复并补充测试断言。剩余注意点:生产启用 API key 静态加密前必须配置至少 32 字符的 SHOP_API_KEY_ENCRYPTION_SECRET;旧明文迁移脚本应先 dry-run,确认后再 apply。

@cnYui cnYui merged commit 7bcb9c9 into main Jun 11, 2026
2 checks passed
@cnYui cnYui deleted the codex/shop-flow-security-billing-repair branch June 11, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant