diff --git a/desktop/src/workspace/local-workspace-auto-runner-natural-decisions.cjs b/desktop/src/workspace/local-workspace-auto-runner-natural-decisions.cjs index fe57466..6c436bc 100644 --- a/desktop/src/workspace/local-workspace-auto-runner-natural-decisions.cjs +++ b/desktop/src/workspace/local-workspace-auto-runner-natural-decisions.cjs @@ -6,8 +6,8 @@ function explicitReviewRejection(text) { const line = rawLine.trim() if (/^(?:```|~~~)/.test(line)) { inCodeBlock = !inCodeBlock; return false } if (inCodeBlock || line.startsWith('>')) return false - return /(?:^|[.!?;;。!?])\s*(?:do not|don't)\s+approve\b/i.test(line) - || /(?:^|[.!?;;。!?])\s*(?:不要|不能|不应|不予)批准/u.test(line) + return /(?:^|[.!?;;。!?])\s*(?:(?:i|we)\s+)?(?:do not|don't|cannot|can't)\s+approve\b/i.test(line) + || /(?:^|[.!?;;。!?])\s*(?:我|我们)?(?:不|不要|不能|不应|不予|无法)批准/u.test(line) }) } diff --git a/desktop/test/workspace/local-workspace-auto.test.cjs b/desktop/test/workspace/local-workspace-auto.test.cjs index 77ddfff..fc473f0 100644 --- a/desktop/test/workspace/local-workspace-auto.test.cjs +++ b/desktop/test/workspace/local-workspace-auto.test.cjs @@ -24,6 +24,10 @@ test('task graph rejects an explicit reviewer objection despite a completed run' const result = { message: { content: 'The required tests fail; do not approve.', trace: { status: 'completed' } } } const refs = { artifactIds: [], evidenceIds: [] } assert.equal(taskGraphMethods.taskGraphResultAccepted(node, result, {}, refs), false) + result.message.content = 'I cannot approve this result.' + assert.equal(taskGraphMethods.taskGraphResultAccepted(node, result, {}, refs), false) + result.message.content = '我们不批准这份结果。' + assert.equal(taskGraphMethods.taskGraphResultAccepted(node, result, {}, refs), false) result.message.content = '> Do not approve.\nThat old instruction is superseded; the result is acceptable.' assert.equal(taskGraphMethods.taskGraphResultAccepted(node, result, {}, refs), true) }) diff --git a/desktop/test/workspace/local-workspace-v4-natural-discussion.test.cjs b/desktop/test/workspace/local-workspace-v4-natural-discussion.test.cjs index d663cd6..becf026 100644 --- a/desktop/test/workspace/local-workspace-v4-natural-discussion.test.cjs +++ b/desktop/test/workspace/local-workspace-v4-natural-discussion.test.cjs @@ -269,6 +269,10 @@ test('an explicit reviewer rejection cannot approve the candidate through a cont assert.equal(runner.v4NaturalConsensus(group, { runId: 'run' }, 'task'), null) messages[1].content = '测试未通过;不予批准。' assert.equal(runner.v4NaturalConsensus(group, { runId: 'run' }, 'task'), null) + messages[1].content = 'I cannot approve this candidate.' + assert.equal(runner.v4NaturalConsensus(group, { runId: 'run' }, 'task'), null) + messages[1].content = '我们不批准这份结果。' + assert.equal(runner.v4NaturalConsensus(group, { runId: 'run' }, 'task'), null) messages[1].content = '> Do not approve.\nThe quoted instruction is outdated; I approve the candidate.' assert.equal(runner.v4NaturalConsensus(group, { runId: 'run' }, 'task').approvedKinds.size, 2) messages[1].content = '```\nDo not approve.\n```\nThe example is outdated; I approve the candidate.'