fix: preserve confirmed followup snapshots and expand flow checks

This commit is contained in:
2026-10-09 17:46:25 +08:00
parent 9185c6db04
commit e762a367da
7 changed files with 334 additions and 7 deletions
@@ -50,6 +50,16 @@ namespace {
return [$code, $output->fetch()];
};
try {
$expected = $manifest['fixtures'][0]['expected'];
$expected['canaries'] = ['紫色海豚金色河流绿色蜻蜓', '银色树叶紫色海豚红色石榴'];
$result = ['summary' => 'synthetic', 'transcript' => '紫色海豚、金色河流,绿色蜻蜓。银色树叶,紫色海豚,红色石榴。', 'items' => $expected['facts']];
$expect(!in_array(false, Probe::verifyExtraction($result, $expected), true), 'ASR punctuation does not change audio-only canary words');
$changed = $result; $changed['transcript'] = str_replace('石榴', '石流', $changed['transcript']);
$expect(!Probe::verifyExtraction($changed, $expected)['audio_only_canaries'], 'wrong spoken-word recognition still fails');
$changed = $result; $changed['items'][0]['record_date'] = '2026-09-27';
$expect(!Probe::verifyExtraction($changed, $expected)['historical_temporal_facts'], 'wrong relative date still fails');
$changed = $result; array_pop($changed['items']);
$expect(!Probe::verifyExtraction($changed, $expected)['unique_tail_fact'], 'missing last audio fact still fails');
[$code, $stdout] = $run('qwen', false);
$expect($code === 1 && Dify::$calls === 0 && str_contains($stdout, 'SYNTHETIC_ACK_REQUIRED'), 'explicit synthetic acknowledgement required');
[$code, $stdout] = $run('qwen');