Commit Graph

16 Commits

Author SHA1 Message Date
73789bda0c fix(plan): 修正元指标回写的丢失更新缺陷
第二轮 stat.save() 在锁外整体写回解锁前的快照,
并发判题时会覆盖掉另一条链路刚提交的指标增量。
改为重新取锁、重读、只合并元指标的 key。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 01:07:21 -06:00
9e0bc1fa8c fix(plan): 修正 unlock() 的并发重复计数缺陷
bulk_create(ignore_conflicts=True) 无法区分新建与已存在,
并发判题时会重复累加 unlock_count 并重复推送通知。
改为逐条 get_or_create,以 was_created 为唯一判据。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 00:59:49 -06:00
c1081e6193 fix(achievement): 指标的 AC 口径改用 is_accepted,与全项目一致
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 00:56:32 -06:00
d4d700782b docs: 成就系统实施计划
13 个任务、75 个步骤,覆盖后端 app、指标注册表、判定任务、
用户与管理 API、重算命令、题单奖章接入,以及前端奖杯馆、
全局弹窗、炫耀入口和管理配置页。

按项目规定不含测试步骤,每个任务以可执行的验证命令替代。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 00:03:02 -06:00
8d9dc7b521 docs: 修订成就系统设计,修复对现有代码的错误假设
- 解锁通知改推拉结合:WebSocket 非常驻连接,纯推会丢消息,
  以 UserAchievement.notified + pending 端点为主通道
- 记录 push_to_user 复用 submission_update handler 的冲突,
  useSubmissionMonitor 需按 type 过滤
- 定义 achievement_unlocked_count 元指标及两轮判定上限,解决自引用
- 明确比赛提交不计入成就(contest_joined 除外)
- 判定任务投递点精确到 judge_task 末尾,避免漏掉比赛分支
- 移除无用例的 eq operator

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 23:51:08 -06:00
c51e9332d1 docs: 成就系统设计方案
日式游戏风格的全站成就系统设计:代码注册指标、后台配置条件、
判题后异步判定、前端奖杯馆。与现有题单奖章分层共存。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-03 23:46:55 -06:00
5af9d67fe2 fix: 终审修复——test_case_id 格式校验、modify 空变更报错、异常兜底与文档补充
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 06:26:00 -06:00
caec69c809 docs: SQL 题数据化展示实施计划
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 00:56:10 -06:00
e244030e7a docs: SQL 题数据化展示设计文档
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 00:49:03 -06:00
dab6734d03 switch docker image 2026-06-14 09:13:05 -06:00
fa6736b855 docs: design Debian slim backend image 2026-06-14 09:08:36 -06:00
69eb15ac27 Add implementation plan for pre-submit code auto-formatting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 07:43:51 -06:00
1bbc149e55 Add design spec for pre-submit code auto-formatting
Plan: ruff for Python3, clang-format (LLVM/4-space/Attach) for C/C++,
called via new /api/format_code endpoint before submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-14 07:41:03 -06:00
57c0572fd9 async 2026-05-26 21:25:26 -06:00
ae783c3a89 docs: add problem yearly AC rate implementation plan 2026-05-11 00:17:02 -06:00
1e7a3051c0 docs: add problem yearly AC rate feature design spec 2026-05-11 00:13:31 -06:00