Files
Investidor-V2/outputs/investmoz-negocios-classificacao-QA-20261016/compatibility-recover.php
T
nala 6a76aac80f
tests / ci (push) Canceled after 0s
versao compilada 1
2026-10-16 09:17:28 +02:00

10 lines
1.9 KiB
PHP

<?php
require __DIR__.'/boot-QA.php';
$private='C:/Users/macbook/.config/investmoz/negocios-classificacao-QA-20261016';$f=json_decode(file_get_contents($private.'/compatibility-before.json'),true);$old=json_decode(file_get_contents($private.'/compatibility-old-save.json'),true);
$b=App\Models\ExistingBusiness::findOrFail($f['id']);$state=app(App\Services\ExistingBusinessClassification::class)->context($b);
if($state!==$f['state']||App\Services\OpportunityCanonicalValue::hash($state)!==$f['state_sha256']||$b->version_no!==$old['version'])throw new RuntimeException('Classification lost after prior-code edit');
$main=App\Models\ExistingBusiness::findOrFail('172aa874-98fc-4bf6-b78f-d2e9a386d345');
if($main->status!=='published')throw new RuntimeException('Primary published case changed');
$proof=['target'=>$target,'existing_secondary_draft'=>$b->id,'classification_written_before_reversal'=>true,'actual_previous_code_edit_after_reversal'=>$old,'classification_fully_recovered_after_old_edit'=>true,'state_hash_before_and_after'=>$f['state_sha256'],'same_existing_UUID'=>true,'no_database_restore_or_version_reset'=>true,'primary_case_stayed_published'=>true,'new_businesses'=>0,'workflow_transitions'=>0,'active_changes'=>0,'reason_for_secondary_case'=>'Primary published case correctly rejects general editing; existing draft permits a real older-code edit without reopening it','fixture_limitation'=>['legacy_draft_not_decryptable_with_isolated_QA_key'=>true,'synthetic_payload_prepared_via_existing_authorized_save'=>$f['synthetic_payload_prepared_via_existing_save'],'original_ciphertext_preserved_privately'=>$f['legacy_ciphertext_preserved_privately'],'active_keys_imported'=>false]];
file_put_contents(__DIR__.'/REVERSAO-APOS-EDICAO-ANTERIOR.json',json_encode($proof,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE).PHP_EOL);echo json_encode(['prior_code_edit'=>true,'classification_recovered'=>true,'main_still_published'=>true]).PHP_EOL;