#!/usr/bin/env bash # weapons_sweep.sh -- ONE comprehensive 2-node bench proving every weapons fix # on the final (2026-08-13) tree: #171 AC trigger-time hitscan, missile # contact through the 4.0u fuze at drag-governed speeds (b94636b), energy # emitters, the #174 cascade guard, and the lane-12 bystander sweep's # no-false-positive property in a 2-mech fight. # # RIG (modeled on cascade_bench.sh / kd_bench.sh -- the rigs that demonstrably # engage). KNOWN TRAP dodged: avatar-vs-avatar forms ZERO locks (three runs, # 0 dmghits even from lasers -- see HITSCAN_STATE.md / ac_bench.sh) while the # madcat family fights fine, so BOTH nodes fly madcat-family chassis: # node A (-net 1501 -> pilot 127.0.0.1:1502) : mad2 "Zanin Neko" (Madcat V2) # -- AFC50 autocannon + ERPPC + LRM15 + SRM6 x2 + ERMLaser x2: # every family from one shooter (AC carrier per L4GAUGE.CFG :3008). # node B (-net 1601 -> pilot 127.0.0.1:1602) : madcat # -- AFC100 + LRM15 x2 + ERLLaser + ERSLaser x2 (kd_bench's proven # engager), sparser trigger. # Engagement = the kd_bench pattern: BT_GOTO=enemy drives them onto each other # and the production aim ray designates the enemy (mech+0x388 lock). NOT # BT_FIRE_AT_ICON (that designates buildings -- fine for the cascade rig's # splash chaos, useless for typed mech-vs-mech receipts). AF periods 4/7: # throttled (unthrottled autofire trips the FailureHeat brick) and staggered. # # Assertions + PASS table: scratchpad/night16/weapons_check.py. The checker's # --selftest (run FIRST, gate on it) proves the detector flags the pre-#171 # and pre-#174 log shapes, bystander false positives (self-strike / phantom / # fuze-race / print-cap), and a quiet rig -- the week's hard rule: prove the # bench CAN detect failure before trusting PASS. # # RESULT 2026-08-13 (evidence: scratchpad/night16/ws_a.log ws_b.log): PASS. # ENERGY 184 FIRED / 72 laser + 7 PPC hits; AC 42 FIRED / 17 type=1 hits all # burst=1 / 84 ballistic pushes all dmg=0; MISSILE 151 FIRED / 57 damage # IMPACTs (50 salvo bursts) / 593 type=2 hits; 11 deaths; cascades 8, none # re-descended. CALIBRATION FINDING: BYSTANDER receipts DO fire in a 2-mech # fight (11x) and all were TRUE positives -- the production aim ray locks # scenery, and the other mech crossing the round's path detonates it (the # binary world-sweep behavior). The checker asserts the real false-positive # conditions instead of a zero count; see weapons_check.py header. set -x python /c/git/bt411/scratchpad/night16/weapons_check.py --selftest || { echo "DETECTOR SELF-TEST FAILED -- fix the checker before benching"; exit 1; } . /c/git/bt411/scratchpad/night6/bench_common.sh bt_assert_player_env cd /c/git/bt411/content || exit 1 taskkill //F //IM btl4.exe >/dev/null 2>&1; sleep 3 rm -f ws_a.log ws_b.log ws_r.log bt_expert_egg MP.EGG WS.EGG # map/time sed is MANDATORY (test-harness: MP.EGG authors cavern/night -- # un-sedded copies park the mechs against cavern rock). Vehicle seds are # EXACT-LINE (the ^vehicle=.* form would blindly stamp both pilots the same). sed -i "s/^map=.*/map=grass/; s/^time=.*/time=day/; s/^vehicle=bhk1$/vehicle=mad2/; s/^vehicle=ava1$/vehicle=madcat/" WS.EGG grep -q "^vehicle=mad2$" WS.EGG && grep -q "^vehicle=madcat$" WS.EGG || { echo "FAIL: WS.EGG vehicle sed did not land (check MP.EGG pilot pages)"; exit 1; } grep -q "advancedDamage=1" WS.EGG || { echo "FAIL: egg lacks advancedDamage=1"; exit 1; } # node B FIRST (back window): madcat, sparser trigger, still all families. ( export BT_GOTO=enemy BT_GOTO_STOP=80 BT_AUTOFIRE=1 BT_AF_MISSILE=1 BT_AF_PERIOD=7 export BT_DMG_LOG=1 BT_PROJ_LOG=1 BT_DEATH_LOG=1 BT_AMMO_LOG=1 bt_launch ws_b.log WS.EGG 0x0C -net 1601 ) sleep 2 # node A: mad2 (Zanin Neko), the dense shooter -- AC + missiles + energy. ( export BT_GOTO=enemy BT_GOTO_STOP=100 BT_AUTOFIRE=1 BT_AF_MISSILE=1 BT_AF_PERIOD=4 export BT_DMG_LOG=1 BT_PROJ_LOG=1 BT_DEATH_LOG=1 BT_AMMO_LOG=1 bt_launch ws_a.log WS.EGG 0x03 -net 1501 ) sleep 5 python ../tools/btconsole.py WS.EGG 127.0.0.1:1501 127.0.0.1:1601 > ws_r.log 2>&1 & R=$! sleep 300 kill $R 2>/dev/null bt_kill_ours; sleep 2; taskkill //F //IM btl4.exe >/dev/null 2>&1 python /c/git/bt411/scratchpad/night16/weapons_check.py ws_a.log ws_b.log