18865e17ca
实现游戏化金币发放服务
2026-05-13 13:01:00 +08:00
1ad26d0fe8
补齐 XP 与连续学习测试覆盖
2026-05-13 10:55:17 +08:00
c08d3f75b9
实现每日首次进入红心补给
2026-05-13 10:53:27 +08:00
d71c45b2f1
实现连续学习里程碑奖励
2026-05-13 10:51:01 +08:00
447cef3dea
按挑战组完成更新连续学习
2026-05-13 10:47:46 +08:00
b5b3aaf3a7
实现游戏化 XP 来源与连对奖励
2026-05-13 10:26:21 +08:00
b590e60bce
feat: implement non-linear 50-level XP curve (G2-1)
...
Replace flat 400 XP/level formula with the segmented curve from
LEVEL_RULES: Lv.1-5 steep ramp, Lv.6-10 moderate, Lv.11-20 linear +80,
Lv.21-35 +120, Lv.36-50 +180. Level 50 is hard-capped with xpToNextLevel=0.
Uses binary search over pre-computed cumulative thresholds for O(log n)
level lookup.
2026-05-12 11:04:23 +08:00
665efa4370
test: add comprehensive challenge group tests (G1-7)
...
Add 11 new test cases covering challenge session creation, correct/wrong
answers, idempotent duplicate submission, completion settlement, resource
exhaustion, Plus user bypass, and invalid input validation.
Refactor test helpers to use queue-based mockImplementation pattern for
more reliable db.select mocking across complex async flows.
2026-05-12 10:38:17 +08:00
8801ca1db2
docs: mark G1-6 challenge API DTO update as completed
2026-05-12 00:12:50 +08:00
c8a5d0bf25
feat: add high-reward quota fields to challenge answer DTO
...
Include highRewardSessionsLeft/Max in AnswerResultDto.progress
so clients can update UI after each answer without extra API calls.
2026-05-12 00:12:24 +08:00
e2fdce2268
docs: mark G1-5 daily high-reward session limits as completed
2026-05-12 00:01:57 +08:00
05b9faa0ea
feat: enforce daily high-reward session limits with tier-based quotas
...
Free users get 3 high-reward sessions/day, Plus users get 8. Sessions
after quota are still playable but with degraded XP rewards.
2026-05-12 00:01:31 +08:00
708165e121
docs: mark G1-4 heart deduction boundaries as completed
2026-05-11 23:45:07 +08:00
6ea5ed9de0
feat: add heart deduction boundaries with new user protection
...
Add 3-day new user heart protection (minimum 1 heart) and block
answering when hearts are exhausted for free-tier users.
2026-05-11 23:44:45 +08:00
9e0f97d162
Settle completed challenge sessions
2026-05-11 21:40:41 +08:00
5bb6ba29a2
Record idempotent challenge answers
2026-05-11 21:34:27 +08:00
1d84de8d15
Create challenge sessions with five questions
2026-05-11 18:32:40 +08:00
fd4c2b6361
Generate game economy migrations
2026-05-11 18:23:29 +08:00
6a655d0ce2
Add weekly XP schema
2026-05-11 18:18:33 +08:00
7a617ce1f9
Add daily progress schema
2026-05-11 18:06:19 +08:00
51395bf5ec
Add reward ledger schema
2026-05-11 17:59:03 +08:00
a23f1abc12
Add wallet and inventory schema
2026-05-11 17:41:26 +08:00
5570973f74
Add challenge session schema
2026-05-11 17:39:06 +08:00
8382183ee5
Add gamification rule constants
2026-05-11 17:33:53 +08:00
0dd6633fd4
Add gamification design and server plan
2026-05-11 17:06:42 +08:00
94b807ad16
docs: annotate database schema fields
2026-05-11 12:45:00 +08:00
2649b24277
Add ad recovery API contract
2026-05-05 16:12:04 +08:00
b46b6c8ae0
Add AGENTS.md and ignore coverage
CI/CD Pipeline / Code Quality (push) Successful in 18s
CI/CD Pipeline / Unit Tests (push) Successful in 14s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Successful in 1m20s
2026-05-04 22:02:01 +08:00
3ea44189e8
Add Flutter app-facing API routes
2026-05-04 01:24:23 +08:00
c70748dde2
fix: 修复 admin change-password 接口 401 和 CORS 问题
...
CI/CD Pipeline / Code Quality (push) Successful in 18s
CI/CD Pipeline / Unit Tests (push) Successful in 45s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Successful in 12m21s
- CORS 配置显式放行 PUT/PATCH/DELETE 方法(默认只有 GET/POST/HEAD)
- admin-auth 白名单路径修正 /v1/admin/auth/login → /v1/admin/login
- JWT verify 后手动赋值 request.user,修复 decoded payload 丢失
2026-04-23 22:27:23 +08:00
2c97412c82
fix: 修复 admin-auth 测试的 TypeScript 类型错误
...
CI/CD Pipeline / Code Quality (push) Successful in 18s
CI/CD Pipeline / Unit Tests (push) Failing after 14s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Has been skipped
将 mockDb 的类型从 Record<string, Mock> 改为显式的映射类型,
消除 CI 中 "possibly undefined" 的类型检查报错。
2026-04-23 12:55:01 +08:00
5b1f0848ac
feat: 添加管理员修改自己密码的接口
...
CI/CD Pipeline / Code Quality (push) Failing after 17s
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Has been skipped
新增 PUT /v1/admin/change-password 端点,允许已登录管理员
(admin / super_admin)修改自己的密码。需验证旧密码,
且新旧密码不能相同。错误由全局 errorHandler 统一处理。
2026-04-23 12:32:31 +08:00
b75a7ada75
docs: 更新 CI 部署文档至 v5.3.0
...
同步实际部署配置变更:
- Docker Compose 使用 network_mode: host 避免 VPC 冲突
- Act Runner config 补充 options + valid_volumes 挂载配置
- 移除 systemd 不必要的 BindPaths
- CI health check 改用 bun fetch
- 新增 Docker bridge/VPC 冲突和 health check 故障排查
2026-04-18 04:23:16 +08:00
9d1f52d95b
fix: health 路由路径修正为 /health
...
CI/CD Pipeline / Code Quality (push) Successful in 15s
CI/CD Pipeline / Unit Tests (push) Successful in 8s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Successful in 1m15s
healthRoutes 注册时无 /v1 前缀,实际路径是 /health 而非 /v1/health。
将 auth 中间件白名单从 /v1/health 改为 /health,并同步修正所有
HEALTHCHECK 和 CI health check 路径。
2026-04-18 04:13:59 +08:00
28636447fa
fix: health check 添加调试输出定位失败原因
CI/CD Pipeline / Code Quality (push) Successful in 15s
CI/CD Pipeline / Unit Tests (push) Successful in 8s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 22s
2026-04-18 04:10:21 +08:00
686f5ea912
fix: 修正 CI deploy 流程
...
CI/CD Pipeline / Code Quality (push) Successful in 14s
CI/CD Pipeline / Unit Tests (push) Successful in 8s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 58s
- 备份镜像提前到 build 前执行,确保回滚的是旧版本
- health check 改用 top-level await 避免 bun 异步退出时序问题
- 移除不必要的 --force-recreate(compose 已自动检测镜像变化)
2026-04-18 03:43:44 +08:00
af55992627
fix: health check 路径补充 /v1 前缀
...
CI/CD Pipeline / Code Quality (push) Successful in 14s
CI/CD Pipeline / Unit Tests (push) Successful in 8s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 57s
API 路由挂载在 /v1 下,/health 路径被 auth 中间件拦截返回 401,
统一改为 /v1/health。
2026-04-18 03:27:44 +08:00
e076c3be19
fix: CI health check 使用 bun fetch 替代 curl
...
CI/CD Pipeline / Code Quality (push) Successful in 15s
CI/CD Pipeline / Unit Tests (push) Successful in 9s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 48s
runner 镜像 duoqi-runner:bun-git 未安装 curl,
改用 bun 内置 fetch API 做 HTTP 健康检查。
2026-04-18 03:11:35 +08:00
23f8c16c54
fix: 使用 host 网络模式避免 Docker bridge 子网与 VPC 内网冲突
...
CI/CD Pipeline / Code Quality (push) Successful in 16s
CI/CD Pipeline / Unit Tests (push) Successful in 9s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 50s
Docker Compose 默认创建的 bridge 网络 (172.23.0.0/16) 与阿里云
RDS 内网 IP 段冲突,导致宿主机到 RDS 的流量被截走,Gitea 无法
连接数据库。改用 network_mode: host 彻底解决。
2026-04-18 02:50:10 +08:00
2141d9a539
fix: 改用 docker compose 命令(V2 插件)
...
CI/CD Pipeline / Code Quality (push) Failing after 30s
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Has been skipped
- Runner 镜像安装 docker-compose 包(Debian 上为 V2 插件)
- workflow 使用更现代的 docker compose 命令
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 19:07:08 +08:00
1f51d3fe8d
fix: 使用 docker-compose 命令替代 docker compose
...
CI/CD Pipeline / Code Quality (push) Successful in 15s
CI/CD Pipeline / Unit Tests (push) Successful in 10s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 6s
- Runner 镜像内使用旧版 docker-compose(带连字符)
- 修改所有 docker compose 为 docker-compose
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 18:57:21 +08:00
4b3eb060da
fix: 使用绝对路径指定 docker-compose 文件
...
CI/CD Pipeline / Code Quality (push) Successful in 14s
CI/CD Pipeline / Unit Tests (push) Successful in 8s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 7s
- 移除 working-directory(依赖 BindPaths 挂载)
- 所有 docker compose 命令使用 -f /opt/duoqi-api/docker-compose.yml
- 绕过容器内目录不存在的依赖问题
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 18:53:40 +08:00
5219269951
fix: 移除 artifact 传递兼容 Gitea Actions
...
CI/CD Pipeline / Code Quality (push) Successful in 14s
CI/CD Pipeline / Unit Tests (push) Successful in 10s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 7s
- 合并 build-test + deploy-test → build-and-deploy-test
- 合并 build-prod + deploy-prod → build-and-deploy-prod
- 移除 upload/download-artifact@v4(Gitea 不兼容)
- 使用 working-directory 替代 cd 命令
- 单服务器架构无需 artifact 中转
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 18:48:46 +08:00
d8f30e8362
fix: 移除 artifact 传递,合并 build+deploy jobs 兼容 Gitea Actions
CI/CD Pipeline / Code Quality (push) Successful in 16s
CI/CD Pipeline / Unit Tests (push) Successful in 11s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 8s
2026-04-17 18:13:21 +08:00
567613aa6b
docs: 更新 CI 部署文档 v5.1.0 → v5.2.0
...
主要更新:
- Runner 镜像:添加 Docker CLI,固定 Bun 版本为 1.3
- systemd 服务:添加 Docker socket 挂载配置
- CI 流程:移除覆盖率相关描述(只运行单元测试)
- 关键设计说明:更新 Runner 镜像和 Docker socket 挂载说明
2026-04-17 16:33:35 +08:00
6b65e1bcfa
fix: 构建阶段安装全部依赖
...
CI/CD Pipeline / Code Quality (push) Successful in 16s
CI/CD Pipeline / Unit Tests (push) Successful in 10s
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Failing after 14m21s
CI/CD Pipeline / Deploy to Production (push) Has been skipped
移除 --production 标志,确保 devDependencies(如 typescript)可用
后续可优化 release 阶段只包含生产依赖
2026-04-17 16:22:12 +08:00
525c433937
fix: 移除重复用户创建,使用镜像预置的 bun 用户
...
CI/CD Pipeline / Code Quality (push) Successful in 22s
CI/CD Pipeline / Unit Tests (push) Successful in 15s
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Failing after 10s
CI/CD Pipeline / Deploy to Production (push) Has been skipped
- oven/bun:1.3 已包含 bun 用户,无需重复创建
- chown 使用 bun:bun 而非 bun:nodejs
2026-04-17 16:20:12 +08:00
f390e23ba7
fix: Dockerfile 兼容 Debian 基础镜像
...
CI/CD Pipeline / Code Quality (push) Successful in 15s
CI/CD Pipeline / Unit Tests (push) Successful in 10s
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Failing after 10s
CI/CD Pipeline / Deploy to Production (push) Has been skipped
- addgroup/adduser → groupadd/useradd (Alpine → Debian)
- 安装 curl 用于健康检查
2026-04-17 16:17:44 +08:00
2d8b07845f
fix: 更新 Dockerfile Bun 版本 1.1 → 1.3 以匹配本地版本
...
CI/CD Pipeline / Code Quality (push) Successful in 16s
CI/CD Pipeline / Unit Tests (push) Successful in 10s
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Failing after 9s
CI/CD Pipeline / Deploy to Production (push) Has been skipped
本地使用 Bun 1.3.11 生成的 lockfile 与 Bun 1.1.45 不兼容
2026-04-17 16:11:03 +08:00
81ecf3999d
fix: 修正 Dockerfile 中 lockfile 文件名
...
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Code Quality (push) Has been cancelled
CI/CD Pipeline / Build Test Image (push) Has been cancelled
CI/CD Pipeline / Build Production Image (push) Has been cancelled
CI/CD Pipeline / Deploy to Test (push) Has been cancelled
CI/CD Pipeline / Deploy to Production (push) Has been cancelled
bun.lockb → bun.lock(适配 Bun 1.1+ 文本格式)
2026-04-17 16:04:34 +08:00