oportunidades 7
tests / ci (push) Waiting to run

This commit is contained in:
2026-10-13 11:40:29 +02:00
parent 20971d523f
commit 287e991486
2902 changed files with 1085456 additions and 25957 deletions
+9 -1
View File
@@ -39,8 +39,13 @@ foreach ($prior['scenarios'] as $name => $entry) {
$stepProof[$step->step_code] = ['state' => $detail['state'], 'recorded_at' => $detail['recorded_at'] ?? null, 'scope' => $detail['scope'] ?? null];
}
$timeline = [];
$requestPrefill = [];
foreach (DB::table('desk_events')->where('case_id', $case->id)->orderBy('event_order')->get() as $event) {
$data = $desk->decode($event->payload);
if ($event->request_id === $request->id && in_array($event->action, ['request_prefill_prepared', 'request_prefill_reused'], true)) {
$requestPrefill[] = ['action' => $event->action, 'order' => $event->event_order, 'created_at' => $event->created_at,
'draft_id' => $data['draft_id'] ?? null, 'draft_version' => $data['draft_version'] ?? null, 'fields' => $data['fields'] ?? []];
}
if (($event->action === 'path_stage_recorded' && in_array($data['code'] ?? '', ['S02', 'S10'], true))
|| (in_array($event->action, ['path_task_accepted', 'guidance_task_updated'], true) && ($data['task_id'] ?? '') === $task->id)) {
$timeline[] = ['order' => $event->event_order, 'action' => $event->action, 'actor_id' => $event->actor_id,
@@ -64,10 +69,13 @@ foreach ($prior['scenarios'] as $name => $entry) {
'request_country' => $requestPayload['country'] ?? null, 'request_origin' => $requestPayload['declared_origin_country_code'] ?? null,
'task_id' => $task->id, 'task_status' => $task->status, 'task_guidance_key' => $task->guidance_key,
'task_version' => $task->version_no, 'timeline' => $timeline];
$proof['scenarios'][$name]['request_prefill_provenance'] = $requestPrefill;
}
DB::rollBack();
$proof['result'] = 'passed_read_only_existing_path';
$file = $dir.'/investor-ab-remaining-persistence-qa.json';
if (is_file($file)) copy($file, $dir.'/investor-ab-remaining-persistence-qa-'.gmdate('Ymd_His').'.json');
if (is_file($file)) {
copy($file, $dir.'/investor-ab-remaining-persistence-qa-'.gmdate('Ymd_His').'.json');
}
file_put_contents($file, json_encode($proof, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR));
echo json_encode(['result' => $proof['result'], 'target' => $target, 'read_only' => true, 'scenarios' => array_keys($proof['scenarios'])]).PHP_EOL;