Commit Graph

63 Commits

Author SHA1 Message Date
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
All checks were successful
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 问题
All checks were successful
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 类型错误
Some checks failed
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: 添加管理员修改自己密码的接口
Some checks failed
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
All checks were successful
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 添加调试输出定位失败原因
Some checks failed
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 流程
Some checks failed
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 前缀
Some checks failed
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
Some checks failed
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 内网冲突
Some checks failed
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 插件)
Some checks failed
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
Some checks failed
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 文件
Some checks failed
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
Some checks failed
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
Some checks failed
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: 构建阶段安装全部依赖
Some checks failed
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 用户
Some checks failed
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 基础镜像
Some checks failed
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 以匹配本地版本
Some checks failed
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 文件名
Some checks failed
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
f6ce7ce431 fix: 修复 CI 测试阶段依赖缺失问题
Some checks failed
CI/CD Pipeline / Code Quality (push) Successful in 17s
CI/CD Pipeline / Unit Tests (push) Successful in 13s
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 29s
CI/CD Pipeline / Deploy to Production (push) Has been skipped
- 安装 @vitest/coverage-v8@4.1.4 作为 devDependency
- 更新 vitest 从 4.1.3 到 4.1.4 以匹配版本
- CI workflow 改用 test 而非 test:coverage,移除覆盖率上传
2026-04-17 15:07:08 +08:00
7856d53635 docs: 更新 CI 部署文档,补充国内网络适配配置
- 新增 Docker 镜像加速配置(服务器初始化)
- 重写 Act Runner 安装章节:自定义镜像构建、config.yaml 关键配置、systemd --config 参数
- 补充三个国内网络问题的解决方案:Docker Hub 加速、github_mirror、--network host
- 更新故障排查:新增 Action 拉取失败、checkout 失败两个排查项
- 更新目录结构:新增 act-runner/ 和 runner-image/
- 版本更新至 v5.1.0
2026-04-17 14:01:25 +08:00
02a50617e7 ci: 移除 Install git 步骤
Some checks failed
CI/CD Pipeline / Code Quality (push) Successful in 15s
CI/CD Pipeline / Unit Tests (push) Failing after 4m53s
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
改用自定义镜像 duoqi-runner:bun-git(预装 git),无需每次 CI 安装。
2026-04-17 13:49:13 +08:00
4e05105edf ci: 临时跳过 ESLint 检查
Some checks failed
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
项目尚未配置 eslint.config.js(ESLint 9 要求的新格式),
先跳过 lint 步骤,优先跑通整条 CI pipeline。
2026-04-17 13:30:00 +08:00
bcb6725065 fix: 移除 CI 中多余的 setup-bun 步骤
Some checks failed
CI/CD Pipeline / Code Quality (push) Failing after 31m20s
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
oven/bun:latest 基础镜像已自带 bun,无需通过 action 安装。
同时 oven-sh/setup-bun 在 gitea.com 镜像上不存在。
2026-04-17 12:52:12 +08:00
ac2843a3f8 fix: 使用 apt-get 安装 git(oven/bun 基于 Debian)
Some checks failed
CI/CD Pipeline / Code Quality (push) Failing after 6m40s
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
2026-04-17 11:54:34 +08:00
a93b67185c fix: CI checkout 失败,在 checkout 前安装 git 避免不兼容的 REST API 回退
Some checks failed
CI/CD Pipeline / Code Quality (push) Failing after 3s
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
2026-04-17 11:51:39 +08:00
95bb1e0cd4 chore: 从版本控制中移除 .claude 目录
Some checks failed
CI/CD Pipeline / Code Quality (push) Failing after 38s
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
.claude/settings.json 属于个人配置,不应提交到仓库
已在 .gitignore 中配置忽略 .claude/ 目录
2026-04-17 09:32:11 +08:00
2a02c19dcb refactor: 统一使用 Docker Compose V2 命令语法
Some checks failed
CI/CD Pipeline / Code Quality (push) Failing after 15s
CI/CD Pipeline / Unit Tests (push) Has been skipped
CI/CD Pipeline / Build Test Image (push) Has been skipped
CI/CD Pipeline / Build Production Image (push) Has been skipped
CI/CD Pipeline / Deploy to Test (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
将所有 docker-compose(V1)替换为 docker compose(V2):
- CI/CD 流水线、部署脚本、文档中的命令调用
- 安装包名 docker-compose → docker-compose-plugin
2026-04-17 00:31:49 +08:00
3623ad04b6 docs: 添加 JWT_SECRET 和 ADMIN_TOKEN 生成方式说明
在环境变量模板和部署文档中添加了密钥生成的安全实践说明,
包括 openssl 和 Node.js 两种生成方式,以及相关的安全提示。
2026-04-16 16:02:01 +08:00