@@ -43,12 +43,12 @@ function landedQaReceiptsVerified(array $command, string $output): bool
|
||||
&& (! in_array($mode, ['race-estimate', 'race-estimate-reconcile'], true) || $contains(fn ($row) => ($row['old_estimate_runtime_rejected'] ?? false) === true
|
||||
&& ($row['runtime_landed_version'] ?? null) === 'COMMON-BUDGET-LANDED-COST-QA-v2' && ($row['status'] ?? null) === 503));
|
||||
}
|
||||
if (in_array($mode, ['race-dossier', 'race-party'], true)) {
|
||||
if (in_array($mode, ['race-dossier', 'race-party', 'race-bank', 'race-legal', 'race-legal-amount', 'race-capital'], true)) {
|
||||
foreach (['same_operation', 'same_version'] as $scenario) {
|
||||
$matches = array_values(array_filter($records, fn ($row) => ($row['scenario'] ?? null) === $scenario));
|
||||
if (count($matches) !== 1 || ($matches[0]['blocked_writers_observed'] ?? 0) < 2
|
||||
|| ($matches[0]['documents_created'] ?? 0) !== 1 || ($matches[0]['audits'] ?? 0) !== 1
|
||||
|| ($matches[0]['files_created'] ?? -1) !== ($mode === 'race-party' ? 0 : 1) || ($matches[0]['all_originals_verified'] ?? false) !== true
|
||||
|| ($matches[0]['files_created'] ?? -1) !== (in_array($mode, ['race-party', 'race-bank', 'race-legal-amount', 'race-capital'], true) ? 0 : 1) || ($matches[0]['all_originals_verified'] ?? false) !== true
|
||||
|| ($matches[0]['statuses'] ?? null) !== ($scenario === 'same_operation' ? [200, 200] : [200, 409])) {
|
||||
return false;
|
||||
}
|
||||
@@ -56,17 +56,41 @@ function landedQaReceiptsVerified(array $command, string $output): bool
|
||||
|
||||
return true;
|
||||
}
|
||||
if (in_array($mode, ['landed-costs', 'import-estimates'], true)) {
|
||||
return ($mode !== 'import-estimates' || $contains(fn ($row) => ($row['estimate_source_remainder_restored'] ?? null) === 1000 && ($row['estimate_original_replay_without_effects'] ?? false) === true))
|
||||
if (in_array($mode, ['landed-costs', 'import-estimates', 'import-bank-support', 'import-legal', 'import-legal-amount'], true)) {
|
||||
return ($mode === 'landed-costs' || $contains(fn ($row) => ($row['estimate_source_remainder_restored'] ?? null) === 1000 && ($row['estimate_original_replay_without_effects'] ?? false) === true))
|
||||
&& ($mode !== 'import-legal-amount' || $contains(fn ($row) => ($row['legal_amount_minor_restored'] ?? null) === 750 && ($row['legal_amount_replay_without_effects'] ?? false) === true
|
||||
&& ($row['native_legal_plan_total_minor'] ?? null) === 10750 && ($row['native_legal_plan_source_restored'] ?? false) === true && ($row['native_legal_plan_replay_without_effects'] ?? false) === true))
|
||||
&& (! in_array($mode, ['import-legal', 'import-legal-amount'], true) || $contains(fn ($row) => ($row['legal_source_restored'] ?? false) === true && ($row['legal_published_version_restored'] ?? false) === true
|
||||
&& ($row['legal_buyer_context_restored'] ?? false) === true && ($row['legal_replay_without_effects'] ?? false) === true))
|
||||
&& (! in_array($mode, ['import-bank-support', 'import-legal', 'import-legal-amount'], true) || $contains(fn ($row) => ($row['bank_support_versions_restored'] ?? null) === 2
|
||||
&& ($row['bank_support_relationships_restored'] ?? false) === true && ($row['bank_support_replay_without_effects'] ?? false) === true))
|
||||
&& $contains(fn ($row) => ($row['post_extension_restore_all_tables_equal'] ?? false) === true
|
||||
&& ($row['recovered_operation_replay_no_effects'] ?? false) === true && ($row['pre_extension_schema_data_balance_restored'] ?? false) === true)
|
||||
&& $contains(fn ($row) => ($row['private_original_versions_restored'] ?? 0) === 6 && ($row['typed_dossier_versions_restored'] ?? 0) === 4
|
||||
&& $contains(fn ($row) => ($row['private_original_versions_restored'] ?? 0) === (in_array($mode, ['import-legal', 'import-legal-amount'], true) ? 11 : ($mode === 'import-bank-support' ? 10 : 6)) && ($row['typed_dossier_versions_restored'] ?? 0) === (in_array($mode, ['import-bank-support', 'import-legal', 'import-legal-amount'], true) ? 8 : 4)
|
||||
&& ($row['selected_party_versions_restored'] ?? 0) === 2
|
||||
&& ($row['source_loss_detected'] ?? false) === true
|
||||
&& ($row['separate_private_root_restored'] ?? false) === true && ($row['native_authorized_evidence_resolved'] ?? false) === true)
|
||||
&& $contains(fn ($row) => ($row['isolated_restore_removed'] ?? false) === true);
|
||||
}
|
||||
|
||||
if (in_array($mode, ['legal-http', 'legal-review'], true)) {
|
||||
return $contains(fn ($row) => ($row['native_legal_http_login'] ?? false) === true && ($row['csrf_required'] ?? false) === true
|
||||
&& ($row['large_multipart_upload_bytes'] ?? 0) > 2097152 && ($row['original_unchanged'] ?? false) === true
|
||||
&& ($row['exact_native_download'] ?? false) === true && ($row['one_source_one_audit_after_replay'] ?? false) === true
|
||||
&& ($row['guest_status'] ?? null) === 401 && ($row['revoked_status'] ?? null) === 403 && ($row['rules_published'] ?? null) === 0
|
||||
&& ($row['financial_stock_unchanged'] ?? false) === true && ($row['global_php_config_unchanged'] ?? false) === true
|
||||
&& ($row['private_http_server_stopped'] ?? false) === true && ($row['private_http_root_removed'] ?? false) === true);
|
||||
}
|
||||
if ($mode === 'corpus') {
|
||||
return $contains(fn ($row) => ($row['shared_corpus_files_inventoried'] ?? 0) > 0 && count($row['real_official_sources_prepared'] ?? []) === 4
|
||||
&& is_string($row['inventory_metadata_sha256'] ?? null) && preg_match('/^[a-f0-9]{64}$/D', $row['inventory_metadata_sha256']) === 1
|
||||
&& count(array_filter($row['real_official_sources_prepared'], fn ($source) => is_string($source['sha256'] ?? null)
|
||||
&& preg_match('/^[a-f0-9]{64}$/D', $source['sha256']) === 1 && ($source['bytes'] ?? 0) > 0
|
||||
&& ($source['native_authorized_download_verified'] ?? false) === true)) === 4
|
||||
&& ($row['rules_published'] ?? null) === 0 && ($row['originals_unchanged'] ?? false) === true
|
||||
&& ($row['financial_and_stock_unchanged'] ?? false) === true && ($row['synthetic_qa_organization_only'] ?? false) === true);
|
||||
}
|
||||
|
||||
return $mode === 'pest' && $contains(fn ($row) => ($row['tool'] ?? null) === 'pest' && ($row['result'] ?? null) === 'passed'
|
||||
&& ($row['tests'] ?? 0) > 0 && ($row['passed'] ?? 0) === $row['tests']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user