26 Commits

Author SHA1 Message Date
f37ad5823b docs: 标签管理点击查看对应题目的实现计划
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 05:55:26 -06:00
a8399ad201 docs: 标签管理点击查看对应题目的设计文档
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 05:51:04 -06:00
e698ef8bfa docs: 约束 ruff format 只作用于任务改动文件
ruff format . 会重排 50+ 个历史遗留格式的无关文件。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 04:09:21 -06:00
6ab336ee8f docs: 计划改为纯代码实现,跳过需要数据库和浏览器的验证步骤
dev_settings 指向的是远程库,本次不跑迁移,运行时验证由用户择机进行。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 04:06:36 -06:00
bffda7aa95 docs: 修正计划中 Task2/Task3 的 import 顺序,避免 ruff F401
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 01:23:01 -06:00
196e8a4532 docs: 题目标签重构实施计划
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 00:42:56 -06:00
9e0fb40f6c docs: 题目标签重构设计文档
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-05 00:24:16 -06:00
72fec2ca61 fix(plan): 重算必须重建增量辅助键
原计划断言四个依赖辅助键的指标都受 max 语义保护、重算后不会回退,
实测只有 max_ac_streak_days 的最大值成立。另外三个的 on_submission
完全从辅助结构推导,辅助键一丢下次提交就打回 1,上线当天即触发。
新增 BaseMetric.recompute_state 钩子由指标各自重建。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 01:36:41 -06:00
054d4d5c32 fix(plan): 修正补发触发条件与 backfilled 标记
三处缺陷:rescan 从未传 backfilled=True(字段形同虚设);
loosened 谓词漏掉改 metric 和从下架转上架两种情况。
改为只要 metric/operator/threshold/visible 有变化就补发——
补发幂等,多跑一次只花一次扫描,漏跑是学生该得没得。
另补 rarity 的取值校验。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 01:27:09 -06:00
562cf4f0b4 fix(plan): 隐藏成就的条件字段也必须遮码
只遮名称和描述、却明文下发 metric/operator/threshold,
学生打开 DevTools 就能看到达成条件,隐藏成就失去意义。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 01:14:07 -06:00
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