feat: 诊断(任务书 18 第一块):诊断数学、四种提交、一次运行跑多个实验、账本与材料、flow 诊断各步
消融默认关,关掉时解释阶段一并跳过;选诊断实验用信息价值减成本。 eval/diagnosis/research.json 为第三块配置。vocab 字段说明的出口文字随提示词一起改,见下一次提交的 prompts/ 与同文件改动(本次含在内)。 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { checkHunk, checkProtocol, type CodeHunk } from "../jev/index.ts";
|
||||
import { checkExperiment, checkHunk, checkProtocol, type CodeHunk } from "../jev/index.ts";
|
||||
import type { JevJudgment } from "../vocab/index.ts";
|
||||
import { programProblems } from "./checks.ts";
|
||||
import { protocolBody } from "./protocol.ts";
|
||||
@@ -27,7 +27,8 @@ export async function receive(inc: Incoming): Promise<Verdict> {
|
||||
}
|
||||
|
||||
/**
|
||||
* 问 Jev(方法.md 4.3 ⑥⑨):回应、统一对拼好的协议问冻结条款三问;实现、修复每个差异块问代码改动五问,顺序发。
|
||||
* 问 Jev(方法.md 4.3 ⑥⑨、诊 4):回应、统一对拼好的协议问冻结条款三问;实现、修复(含诊断程序)每个差异块问代码改动五问,顺序发。
|
||||
* 诊断解释与实验(诊 1)对每个实验问冻结条款三问(改动了评测、自相矛盾、太含糊,用诊断的变体问法),顺序发。
|
||||
* 没有差异块的改动(二进制、只改可执行位、空文件增删)Jev 看不到内容,不问;一块都没有就等于没问,交回 null。
|
||||
* 消融实现不问:冻结协议里没有登记"关掉以后"的随机性和停止条件,五问没有对照(照参考项目)。
|
||||
* flagged 是退回原因里每一处的文字:只列判"是"的几问,问题名用 jev 的英文名(用户 2026-10-03 定);判"是"只看 jev 交回的 yes。
|
||||
@@ -37,7 +38,19 @@ async function askJev(inc: Incoming, protocol: ProtocolBody | null): Promise<{ j
|
||||
const c = await checkProtocol(inc.jevModel, protocol!);
|
||||
return { judgments: c.judgments, flagged: c.flagged ? [`- 冻结协议:${flaggedText(c.judgments)}`] : [] };
|
||||
}
|
||||
if (inc.kind !== "implementation" && inc.kind !== "repair") return null;
|
||||
if (inc.kind === "diagnosisProposal") {
|
||||
const judgments: JevJudgment[] = [];
|
||||
const flagged: string[] = [];
|
||||
for (const [i, experiment] of inc.content.experiments.entries()) {
|
||||
const c = await checkExperiment(inc.jevModel, experiment);
|
||||
judgments.push(...c.judgments);
|
||||
if (c.flagged) flagged.push(`- 第 ${i + 1} 个诊断实验(${experiment.name}):${flaggedText(c.judgments)}`);
|
||||
}
|
||||
return { judgments, flagged };
|
||||
}
|
||||
if (inc.kind !== "implementation" && inc.kind !== "repair" && inc.kind !== "diagnosisImplementation" && inc.kind !== "diagnosisRepair") {
|
||||
return null;
|
||||
}
|
||||
// 走到这里程序检查已过,代码一定存成了版本。
|
||||
const code = inc.known.code as Extract<typeof inc.known.code, { saved: true }>;
|
||||
if (code.hunks.length === 0) return null;
|
||||
|
||||
Reference in New Issue
Block a user