#!/usr/bin/env bash # ========================================================================= # PANIC EJECT -> does the respawn replicate? (#108, night 13) # # Fourth attempt at the trigger. The first three drove the panic button # through BT_BTNTEST (EmitButton -> RIO queue). It never reached the # mapper: no [eject], no PUNCH-OUT, not even a lamp change -- and the same # seam failed to toggle the searchlight (0x14), so it was the SEAM, not the # button address. BT_EJECT_AT is the purpose-built hook (mech4.cpp:3310): # it synthesizes the identical press inside the input path -- "one message, # one dispatch", the same Mech::EjectPilotMessageID the key sends -- and # repeats every 300 frames, so one run yields many punch-outs. # # PASS : for every punch-out on A, B logs # "[respawn] replicant un-wrecked + warp (mode 9->1)" # FAIL : punch-outs on A with no matching un-wreck <- the ghost # # Control already banked (ejectghost.sh): 9 force-kill deaths -> 8 peer # un-wrecks, 0 ghost lines. NORMAL death replication is good on this build, # so an eject-only shortfall here is the defect, not a broken rig. # ========================================================================= set -x . /c/git/bt411/scratchpad/night6/bench_common.sh cd /c/git/bt411/content || exit 1 taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 2 rm -f ea_a.log ea_b.log ea_relay.log bt_expert_egg MP.EGG EA.EGG sed -i "s/^map=.*/map=grass/; s/^time=.*/time=day/; s/^vehicle=.*/vehicle=madcat/" EA.EGG ( export BT_DEATH_LOG=1 BT_MP_LOG=1 BT_MATCHLOG=1 BT_FOG_LOG=1 bt_launch ea_b.log EA.EGG 0x0C -net 1601 ) sleep 2 ( export BT_AUTODRIVE=0.6 BT_EJECT_AT=1800 export BT_DEATH_LOG=1 BT_MP_LOG=1 BT_MATCHLOG=1 bt_launch ea_a.log EA.EGG 0x03 -net 1501 ) sleep 5 python ../tools/btconsole.py EA.EGG 127.0.0.1:1501 127.0.0.1:1601 > ea_relay.log 2>&1 & RELAY=$! sleep 300 kill $RELAY 2>/dev/null sleep 3 bt_kill_ours sleep 2 taskkill //F //IM btl4.exe > /dev/null 2>&1 sleep 3 AID=$(grep -aoE "MY mech entityID=[0-9]+:[0-9]+" ea_a.log | head -1 | cut -d= -f2) echo "=================== PANIC-EJECT REPLICATION ===================" echo "A entity: ${AID:-UNKNOWN}" echo echo "--- 1. did punch-outs actually happen? (if 0 the run is VOID) ---" echo -n "DeathWithoutHonor notices : "; grep -ac "DeathWithoutHonor" ea_a.log echo -n "PUNCH-OUT lines : "; grep -ac "PUNCH-OUT" ea_a.log grep -a "PUNCH-OUT" ea_a.log | head -6 echo echo "--- 2. A's own death/respawn cycles ---" echo -n "death cycle STARTs : "; grep -ac "death cycle START" ea_a.log echo -n "Mech::Reset : "; grep -ac "Mech::Reset ${AID:-@@@}" ea_a.log echo echo "--- 3. B: the peer's un-wrecks for A (THE NUMBER THAT MATTERS) ---" echo -n "un-wrecks seen : "; grep -a "respawn\] replicant" ea_b.log | grep -ac "${AID:-@@@}" grep -a "respawn\] replicant" ea_b.log | grep -a "${AID:-@@@}" | head -8 echo echo "--- 4. B: ghost detector + searchlight cones ---" echo -n "ghost lines : "; grep -ac "\[ghost\]" ea_b.log grep -a "\[ghost\]" ea_b.log | head -4 echo -n "cone SHOWN/HIDDEN : "; grep -ac "\[spot\] cone" ea_b.log echo echo "--- 5. VERDICT INPUTS ---" echo "punch-outs=$(grep -ac 'PUNCH-OUT' ea_a.log) A-respawns=$(grep -ac 'death cycle START' ea_a.log) B-unwrecks=$(grep -a 'respawn\] replicant' ea_b.log | grep -ac "${AID:-@@@}")"