Files

4.6 KiB

Native mortar first shot and cancellation fixture

ERR_NativeMortarFiringProbe is opt-in WORKBENCH code for --project chat --smoke mortar-fire --rounds 1. It observes one real HQ-authorized shot, then explicitly stops support and watches for duplicate orders/shots or replacement ammunition. This is not a full eight-shot salvo, hit-accuracy, real enemy perception, remote-client or FPS test. The 083352 native run passes this first-shot and cancellation case with 48 assertions and zero captured errors.

The probe waits for the existing authored gun/four-person crew, native expansion, operational state and physical manpack route. It snapshots exactly 27 unique inventory shells. A bounded eight-point terrain survey checks no characters/vehicles in a 400m square and applies the production settlement/friendly safety checks to the target and all prospective salvo offsets. An inert fixture-owned vanilla intel folder supplies target identity. The observation describing that identity as a stationary contact is explicitly synthetic; it is queued on the existing battery RTO's actual uplink. There is no direct contact-list insertion or battery Order call. Normal HQ acceptance, mortar scheduling, real downlink, native artillery activity, aim, final shell transfer and native OnWeaponFired remain unchanged. No report is refreshed or retimestamped to make firing pass.

The independent native-event hook records only a non-null projectile from this gun. It rejects duplicate entity callbacks and requires this report/order, an open committed shot and fresh aim with positive flight time. Later polling requires matching battery projectile counts and exactly one original inventory shell consumed. It stops support only on that later tick, never inside the firing callback, and verifies unchanged order/projectile/ammunition counts for another twelve seconds. Already-fired projectiles remain engine-owned; cleanup does not delete or move them. Inventory loss and actual projectile origin are recorded, but impact/flight accuracy is not measured.

Cleanup removes only the test report and orders referring to its target, cancels its battery order if still present, deletes the inert target and detaches the static observer. It leaves mission guns/crew, inventory and physics alone. Success intentionally stops the support service, so the parent fixture must end/reset this disposable mission. On failure, stop the probe and end the fixture; do not continue ordinary gameplay with the test report. Existing contacts or an already-tasked battery cause a diagnostic refusal rather than erasing unrelated reports. Begin this case immediately after the real initial player is admitted. If actual perception has already produced competing reports, diagnose and choose a disclosed fixture arrangement; do not suppress production observation or relax report freshness.

The startup wait is bounded to 180 seconds, report-to-first-shot to 90 seconds, and stopped observation to 12 seconds. Battery status/failure/route/activity/aim diagnostics are emitted every 5 seconds. A native failure is useful evidence; successful node or inventory-request returns never substitute for a projectile.

Running the integrated probe

Use tools/headless_workbench.py --project chat --smoke mortar-fire --rounds 1 --timeout 400 with the documented private prefix/profile. The Chat fixture owns polling and cleanup and emits completion only after the probe succeeds and the disposable mission resets. The Core-only configuration rejects this companion mechanism test.

The separate mortar-expiry case keeps the actual HQ service running after the first shot. It supplies no fresh observation, waits beyond the original 60-second report lifetime and verifies natural activity closure, bounded actual projectile consumption and no second order for the unchanged message. After an additional twelve-second unchanged observation period, it explicitly stops and resets. That case is newly implemented and awaits its native run; it does not promise an eight-shot salvo can finish before a report becomes stale.

Further required cases

After a real first-shot pass, qualify the complete eight-shot salvo under unchanged 60-second contact freshness, finite donor-to-gunner transfer, receiver-radio loss before delivery, stale report during supply/aim, crew/gun loss, depletion, and Stop during an accepted but unfinished shell transfer. The fixture's first shot may not require resupply because the native gunner already owns shells; do not claim transfer-race coverage from this result. Real visual perception→radio→HQ→fire and multiplayer need separate evidence.