feat: enable explicitly authorized human-reviewed clinical adoption
This commit is contained in:
@@ -58,7 +58,15 @@ if (($argv[1] ?? '') === '--request') {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
$f = followupAudioTestDatabase(['preview_only' => false]);
|
||||
$manualMode = in_array('--manual-review', $argv, true);
|
||||
$f = followupAudioTestDatabase(['preview_only' => false, 'manual_review_enabled' => $manualMode,
|
||||
'audio_verified' => !$manualMode, 'verified_profiles' => $manualMode ? [] : ['qwen']]);
|
||||
if ($manualMode) {
|
||||
$providers = config('followup_audio.providers');
|
||||
$providers['qwen']['preview_verified_fingerprint'] = Provider::resolve('qwen')['fingerprint'];
|
||||
$providers['qwen']['verified_fingerprint'] = '';
|
||||
$f['config']->set(['providers' => $providers], 'followup_audio');
|
||||
}
|
||||
$checks = 0;
|
||||
$expect = static function (bool $ok, string $why) use (&$checks): void {
|
||||
if (!$ok) { throw new RuntimeException($why); } $checks++;
|
||||
@@ -169,6 +177,7 @@ try {
|
||||
} else {
|
||||
$cap = $success(followupControllerRequest('capabilities', ['diagnosis_id' => 1], 1, 'GET'), 'normal capabilities');
|
||||
$expect($cap['enabled'] && !$cap['preview_only'] && $cap['can_apply'], 'normal mode enabled only inside isolated fixture');
|
||||
if ($manualMode) { $expect(!$cap['audio_verified'] && $cap['manual_review_enabled'] && $cap['manual_review_ready'], 'manual business does not fake model accuracy verification'); }
|
||||
$detail = $make([['diagnosis', ['symptoms' => '合成症状']], ['blood', ['fasting_blood_sugar' => 6.1]]]);
|
||||
$reject(followupControllerRequest('apply', $body($resolve($detail))), 'FOLLOWUP_AUDIO_CHANNEL_ROLES_REQUIRED');
|
||||
$initialVersion = $detail['version'];
|
||||
|
||||
Reference in New Issue
Block a user