<?php
declare(strict_types=1);require __DIR__.'/native.php';$cases=[];$initial=json_decode(file_get_contents($runtime.'/cases.json'),true);foreach($initial as $c)if(in_array($c['label'],['R3_RANK_CURRENT','R4_RANK_BY_DATE'],true)){$c['label'].='_RETEST';$cases[]=$c;}ck(count($cases)===2,'Exactly two already reviewed failed readers');saveOnce('retest-cases.json',$cases);$pins=[];foreach(glob(__DIR__.'/*.php') as $f)$pins[basename($f)]=hash_file('sha256',$f);ksort($pins);saveOnce('retest-plan.json',['authorization'=>'Root exact extra R3/R4 once each/side; original failures immutable, same resolved day and params, 0newAuth/prepare/DMLDDL/outside','cases'=>$cases,'helpers'=>$pins,'source'=>sourceProof(),'expected_DTO_sha256'=>hash_file('sha256',$runtime.'/expected-DTO.json'),'SQL'=>count(file($runtime.'/sql-budget.jsonl')),'HTTP'=>0]);echo json_encode(['lane'=>$lane,'cases'=>count($cases),'SQL'=>count(file($runtime.'/sql-budget.jsonl')),'new_Auth'=>0]),"\n";
