feat(运维): 新增 oj2-api rediagnose,旧提交的运行时错误说明也能用上新规则
诊断是判题时写进库的,规则改了旧提交不跟着变。这个子命令把库里的诊断按现在的规则重做: Python 只重做已经有诊断的(重跑第一个失败测试点拿回溯,所以要在线上 oj-api 容器里跑), C / C++ 用 info 里存着的信号和退出码直接补上(原来一条都没有)。比赛提交不诊断, 重跑不出来的保留原样,只写 runtime_error 这一个键。默认只读预演,--apply 才写。 本机验过:dev 与编译两种形态都跑通,--apply 之后再跑是 0 条变化。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fa0e1ab66c
commit
79ca8ac3bd
4 files changed
+113
-2
No files matched your search
@@ -371,7 +371,7 @@ export async function failAbandonedSubmission(submissionId: string, error: unkno
|
||||
*
|
||||
* 诊断失败(读不到测试点、判题机没回回溯)就不写这个字段,学生看到的和原来一样。
|
||||
*/
|
||||
async function diagnoseRuntimeError(
|
||||
export async function diagnoseRuntimeError(
|
||||
row: {
|
||||
submission: typeof schema.submission.$inferSelect
|
||||
problem: typeof schema.problem.$inferSelect
|
||||
|
||||
Reference in new issue
Block a user