feat: 任务书 05,runner 与 tasks 两个模块

runner 用 Docker 跑一条命令并交回结局和资源用量;tasks 读 task.json、准备运行目录、给出正式运行/校验器/轻量检查的运行定义,并从原始产物独立判分。任务目录从参考项目搬到 tasks/circle_packing/,新增 task.json;vocab 的 VERDICTS 删掉"判不了",ProcessResult 的 cancelled 改为"容器从外面被杀了"。

全新上下文审阅后的两处修复:计量 shell 以容器内 root 运行,命令经 setpriv 降权,结果写在容器自己的文件层、结束后 docker cp 取出,并加 no-new-privileges,候选无法伪造计量结果把超时记成正常退出;harness 开跑前删掉旧的 solution.json、metrics.json,旧产物不会被当成本次的值。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 13:55:47 -04:00
parent 6005fb8ec2
commit cf6bc4c844
25 changed files with 3205 additions and 6 deletions
+4 -3
View File
@@ -128,7 +128,8 @@ const RESOURCE_USAGE = {
/**
* 以什么方式结束。有没有启动由它决定:只有 notStarted 是没启动,
* 其余三种都启动过、要扣次数(方法.md 第七部分)。
* 启动前就取消的记 notStarted;启动后取消的记 cancelled。
* 启动前就取消的记 notStarted;cancelled 是容器从外面被杀了(关机、手动 docker kill、
* 计量的 shell 自己被杀),没有留下计量结果,三项资源都记测不到。
* 退出码只有正常退出才有,资源用量只有启动过才有,所以分成四种形状。
*/
export const ProcessResult = Type.Union([
@@ -168,8 +169,8 @@ export type ProcessResult = Static<typeof ProcessResult>;
// 运行结果第二层:tasks 从原始产物独立判分
// ---------------------------------------------------------------------------
/** 判定三选一:算数、不算数、判不了(判定所需的证据没拿到)。 */
export const VERDICTS = ["valid", "invalid", "undecidable"] as const;
/** 判定二选一:算数、不算数。 */
export const VERDICTS = ["valid", "invalid"] as const;
export type Verdict = (typeof VERDICTS)[number];
/**