diff --git a/docs/RELIABILITY-1.25.2.md b/docs/RELIABILITY-1.25.2.md index cc450500..919521d6 100644 --- a/docs/RELIABILITY-1.25.2.md +++ b/docs/RELIABILITY-1.25.2.md @@ -37,3 +37,7 @@ W六请求71044 tokens、0提案0交付是事实;末轮新增468字符、还 目录枚举时对每个普通文件补treeFile,重新检查实际路径、常规类型及nlink,避免全清单扫描后新增硬链接漏验;目录仍走祖先检查。独立反例加入不属于最终宿主身份集合的可选文件,full-manifest已完成后在inventory开始新增外部别名,准确拒绝;移除别名后原身份/字节保持。安装12/12通过。 只读对同一10971文件不可变发行做ABBA对照,旧校验8450/8150ms,新校验11083/9961ms,四次宿主身份exact。新增文件复核有约2–3秒成本,保持单次realpath算法,不回到逐文件重复祖先遍历。该数值是整个validateInstalledVersion的本轮观察,不能冒充新的正式升级耗时。原记录在.qa/reliability-1.25.2/install.tap及install-benchmark.json。 + +### 明确禁止检查的识别 + +新HTTP读取用例首轮已发出第3请求,但终态因verification_incomplete暂停,暴露taskContract把“不运行工程检查”匹配为正向要求。原reading.tap的32/33和reading-mixed-debug.tap保留;不是混合读取修复失败,也不能通过改终态断言掩盖。已补“不运行/不执行工程检查”、带“任何”的测试禁止及对应英文的明确否定识别;正向运行检查仍required。task-control 10项包含于联合43/43通过。 diff --git a/progress.md b/progress.md index 028ed6d3..0d217c64 100644 --- a/progress.md +++ b/progress.md @@ -8,6 +8,7 @@ - 预留阶段:v3原消费前缀+原账本顺序,v1/v2保持历史算法;输入异常不丢输出最大值。专项13/13、上下文/预算/引擎24/24通过,原R保持72571及原暂停。已补阶段回顾,按范围本地提交。一次读取不存在src/core/state路径的rg失败,改读真实src/server/store.mjs。 - 安装关联首轮13项11通过2失败,确认升级兼容列表漏1.25.1;补历史版本并动态包含当前APP_VERSION,守卫及独立真实宿主升级3/3通过,首失败保留,先单独提交该修复。没有正式操作。 - 安装文件变化复核12/12通过;10971文件只读ABBA全校验8.15–8.45s→9.96–11.08s、四次身份exact,记录新增检查的真实成本。已补阶段回顾并独立本地提交。 +- 新读取HTTP用例首33项32通过1失败;有第3请求但被误设required的检查阻断。debug证实verification_incomplete;补明确“不运行工程检查”等否定及正向对照后,读取/无进展/shadow/task-control联合43/43通过。原首失败保留,task-control先独立提交。 ## 1.25接续 diff --git a/src/shared/contracts/task-control.mjs b/src/shared/contracts/task-control.mjs index cf19d23c..b65410d2 100644 --- a/src/shared/contracts/task-control.mjs +++ b/src/shared/contracts/task-control.mjs @@ -19,7 +19,7 @@ export function taskContract(task, lookup = () => null) { original = previous; } const goal = original.contract?.goal ?? original.goal; - const skip = /无需(?:任何)?测试|不(?:需要|用|要)(?:进行|做|运行)?测试|\b(?:no tests?(?: needed|required)?|without (?:running )?tests?)\b/i.test(goal); + const skip = /无需(?:任何)?(?:测试|工程检查)|不(?:需要|用|要)?(?:进行|做|运行|执行)?(?:任何)?(?:测试|工程检查)|\b(?:no (?:tests?|checks?)(?: needed|required)?|without (?:running )?(?:tests?|checks?)|(?:do not|don't|never) (?:run|execute) (?:tests?|checks?))\b/i.test(goal); const required = !skip && /(?:运行|执行|通过|修复|补充|添加).{0,12}(?:测试|工程检查)|\b(?:run|pass|fix|add)\b.{0,24}\b(?:tests?|checks?)\b/i.test(goal); const file = hasFileDeliveryRequest(goal); return { schemaVersion: 1, goal, kind: file ? 'file' : 'general', checks: skip ? 'skip' : required ? 'required' : 'unspecified', diff --git a/tests/task-control.test.mjs b/tests/task-control.test.mjs index df74eff8..79cd2c51 100644 --- a/tests/task-control.test.mjs +++ b/tests/task-control.test.mjs @@ -15,6 +15,14 @@ test('operational questions are diagnostic while explicit repair requests remain for (const text of ['先修复系统', '为什么失败,请帮我修复', '这个错误怎么回事,然后修一下', 'fix this error', '继续完成']) assert.equal(isDiagnosticQuestion(text), false, text); }); +test('an explicit prohibition on running engineering checks is not interpreted as a requirement to run them', () => { + for (const goal of ['只读核对指定文件范围,不修改文件,不运行工程检查。', '不执行工程检查,只解释原结果', + '不需要做任何测试', '无需工程检查', 'Read the evidence; do not run checks.', "Don't run tests; explain the original failure."]) { + assert.equal(taskContract({goal}).checks, 'skip', goal); + } + for (const goal of ['修复并运行工程检查', '运行并通过原测试', 'Fix the source and run checks.']) assert.equal(taskContract({goal}).checks, 'required', goal); +}); + test('file delivery requires a positive instruction, not saved evidence or a prohibited write', () => { for (const goal of ['读取保存的原工件,分段取得真实依据,不执行命令或修改文件。', '读取保存过的 HTML 文件并解释内容', '不要创建文件,只分析结果', '读取工件,不执行命令或创建文件',