Skip to content

feat(judge,oj): 现场赛首错即停/TLE优化与外站同步重试及提示改进 - #1238

Closed
yjwyyds1 wants to merge 100 commits into
hydro-dev:masterfrom
HGNU:zkx/dev
Closed

yjwyyds1 wants to merge 100 commits into
hydro-dev:masterfrom
HGNU:zkx/dev

Conversation

@yjwyyds1

Copy link
Copy Markdown

修改内容

1. 现场赛评测优化(icpc_domjudge)

  • 首错即停:在 RecordModel.judge 中识别 tdoc?.rule === 'icpc_domjudge' 时写入 meta.stopOnFirstFail = true。
  • packages/hydrojudge/src/flow.ts 在开启 stopOnFirstFail 时改为串行测点(concurrency = 1)、关闭 TLE 自动重跑(rerun = 0),并在任意测试点出现非 AC(WA/RE/MLE/TLE 等)后立即将后续未测点与后续子任务标记为 STATUS_CANCELED。
  • 超时保护收紧:packages/hydrojudge/src/sandbox.ts 将 clockLimit 从 3 * cpuLimit 调整为 Math.floor(cpuLimit * 1.5 + 500 * 1000 * 1000),减少阻塞/休眠型超时程序的空等时间。

2. 外站同步与排行榜 * 提示改进

  • 同轮自动补抓:packages/hydrooj/src/model/externalOj.ts 在定时同步遇到临时失败或限流时,若本轮尚未重试过,会在 15–30 分钟后同一轮内自动重试一次(每轮最多 1 次,且不超过次日 00:00),减少偶发抖动导致全天挂 *。
  • 悬停提示细化:packages/hydrooj/src/model/ranking.ts 与 packages/ui-default/templates/ranking.html 补充 pendingPlatforms,在「昨日做题」列 * 悬停提示中直接列出具体待同步/缺基线的平台名称。

涉及文件

  • packages/common/types.ts
  • packages/hydrooj/src/model/record.ts
  • packages/hydrojudge/src/flow.ts
  • packages/hydrojudge/src/sandbox.ts
  • packages/hydrooj/src/model/externalOj.ts
  • packages/hydrooj/src/model/ranking.ts
  • packages/ui-default/templates/ranking.html

ZTL123Z and others added 30 commits August 1, 2024 11:38
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
Co-Authored-By: guke1024 <46668943+guke1024@users.noreply.github.com>
ZTL123Z and others added 27 commits November 19, 2026 15:15
feat(ci) 改为手动确认发布,镜像 tag 用 UTC 时间戳
- 新增 install/docker-hgnu 目录:backend/judge/mongodb 三个镜像的
  Dockerfile、compose 编排、部署文档,与上游 install/docker 完全分离
- install/docker 恢复为上游原版(本地 build),避免跟随上游更新时冲突
- CI(image.yml) 从单 backend 扩展为 backend/judge/mongodb 三镜像统一
  构建,手动 publish=true 时打同一时间戳 tag 并推送到 Docker Hub
- 新增 scripts/push-image.sh 打 tag + 推送;compose 默认拉 CI 镜像
- .dockerignore/.gitignore 同步 docker-hgnu 的运行时数据与本地配置

Co-Authored-By: Claude Code <noreply@anthropic.com>
refactor(docker): 把 HGNU 定制编排拆到 install/docker-hgnu,三镜像统一构建发布
fix: 修复排行榜兼容性并合并每日做题统计
feat(wiki): 调整导航位置并完善卡片总览、实时预览模板、别名检索与文章删除
feat(oj): 外站账号手动刷新与昨日做题排行,支持绑定后同步和手动刷新。外站凌晨 00:00 同步,由定时任务写入日快照。昨日做题按北京时间统计,本站按首次 AC 的评测时间归日。
fix(judge): serialize sandbox errors safely 沙箱返回带循环引用的 HTTP 错误时,评测消息无法写入 MongoDB,导致提交停在 Running
保留近期 master 更新,新增现场赛、统一参赛管理、分钟计分和 ICPC Tools Resolver 导出。CI、CodeQL、构建和现场赛回归通过。
合入现场赛评测详情及通用 Java 检测修复。CI、CodeQL、测试服权限与真实评测、Windows 启动检查均已通过。
完善现场赛实时展示、PDF题面与气球发放
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your submission. We really appreciate it! Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


0 out of 3 committers have signed the CLA.
❌ @ZTL123Z
❌ @guke1024
❌ @yjwyyds1
ZTL123Z seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@yjwyyds1 yjwyyds1 closed this Nov 28, 2026
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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.

3 participants