<?php
declare(strict_types=1);

// Design sentinel only. No worker pair or concurrent HTTP executor is installed.
// This file must never be treated as a runnable acceptance test at this SHA.
$lane = (string)getenv('CDX_EM_RACE_LANE');
if (!in_array($lane, ['A', 'B', 'C'], true)
    || count($argv) !== 2 || ($argv[1] ?? '') !== '--execute'
    || (string)getenv('CDX_EM_RACE_RUN') !== 'ROOT_APPROVED_TWO_PRIVATE_WORKERS_V1'
    || !hash_equals((string)hash_file('sha256', __FILE__),
        (string)getenv('CDX_EM_RACE_RUN_SHA'))) {
    echo json_encode(['status' => 'default-deny', 'db_connected' => false,
        'workers_started' => false, 'business_http_sent' => false,
        'dml_sent' => false]), PHP_EOL;
    exit(78);
}
const PRIVATE_WORKER_PAIR_REVIEWED = false;
if (!PRIVATE_WORKER_PAIR_REVIEWED) {
    echo json_encode(['status' => 'private-worker-pair-not-reviewed',
        'db_connected' => false, 'workers_started' => false,
        'business_http_sent' => false, 'dml_sent' => false]), PHP_EOL;
    exit(78);
}

// Before a future, separately approved implementation can proceed, it must:
// 1. Re-run preflight_bind_race.php with a newly frozen SHA and exact A/B/C DB.
// 2. Start TWO new 0700, one-worker PHP roots with same source SHA/DB target.
// 3. Prove distinct PIDs own distinct loopback ports and both have stubs,
//    isolated Redis and real_queue=false. Never alter 18097/18081/18080.
// 4. Create only one CDXEMRACE menu plus a collision-free 6-digit code row;
//    choose two random virtual device IDs with zero existing rows.
// 5. Rendezvous both HTTP requests in the private routers BEFORE application
//    dispatch; a missing second arrival aborts both without business DML.
// 6. Require one HTTP code=0, one expected business code=1, one claimed code
//    row, exactly one winning device, no losing device, no external calls.
// 7. On unknown HTTP result, wait for fixed PID/socket/single-worker barriers
//    before touching any fixture; otherwise retain 0700 recovery journal.
// 8. Delete ONLY exact owned rows transactionally, then independent fresh-PDO
//    zero/full-fingerprint audit; stop only those two new PIDs and remove only
//    validated private roots. Never retry a timed-out activation blindly.
throw new RuntimeException('Concurrent activation executor intentionally absent');
