From ef7f823d9afeb1cb9dfd43f6c711762b226ae7d9 Mon Sep 17 00:00:00 2001 From: grom Date: Fri, 23 Oct 2026 15:05:50 -0600 Subject: [PATCH] ui: teach the producer gates the reach-reporting fire MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `every_event_a_chain_file_registers_has_a_producer` finds producers by scanning our own `.rs` for `fire_event(`, `fire_event_into(` and `pending_events.push((` followed by a string literal. `49b4f7b5` moved `area.rs`'s minimap fire to `fire_event_reach(`, which matches none of them, so the gate began reporting that `Minimap.xml` listens for `MINIMAP_ZONE_CHANGED` and nothing fires it. Both scanners here now match that spelling too. The break rode green through a full gate run and a commit because this test and its sibling need `WOW_DATA`, which `scripts/gates.sh` does not set — on a machine without the client data 1609 tests skip silently. Found by running `WOW_DATA= cargo test -p benilla-app --lib` and diffing the failures against a baseline at HEAD: 3 before, 2 after, and the two that remain fail at HEAD as well. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn --- .../benilla-app/src/ui_script/reference_ui.rs | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/crates/benilla-app/src/ui_script/reference_ui.rs b/crates/benilla-app/src/ui_script/reference_ui.rs index a9f8be3d..1f6317a4 100644 --- a/crates/benilla-app/src/ui_script/reference_ui.rs +++ b/crates/benilla-app/src/ui_script/reference_ui.rs @@ -1973,8 +1973,12 @@ mod tests { // with the whitespace before each `.` removed. let text = glue_chains(&text); // The engine's deferred lane, `pending_events.push((name, args))`, fires too. - const CALLS: [&str; 3] = [ + const CALLS: [&str; 4] = [ concat!("fire_event", "("), + // The reach-reporting sibling fires exactly as `fire_event` does; left out + // of this list it silently stops counting as a producer, which is how + // `MINIMAP_ZONE_CHANGED` came to read as unfired after `49b4f7b5`. + concat!("fire_event_reach", "("), concat!("fire_event_into", "("), concat!("pending_events.push", "(("), ]; @@ -2121,18 +2125,22 @@ mod tests { continue; } let text = std::fs::read_to_string(&p).unwrap_or_default(); - // Split so this file cannot match its own walker. - const CALL: &str = concat!("fire_event", "("); - let mut from = 0; - while let Some(i) = text[from..].find(CALL) { - let at = from + i + CALL.len(); - from = at; - let rest = text[at..].trim_start(); - if let Some(body) = rest.strip_prefix('"') { - if let Some(end) = body.find('"') { - fired - .entry(body[..end].to_string()) - .or_insert_with(|| p.display().to_string()); + // Split so this file cannot match its own walker. Both spellings of the fire, + // for the reason the producer gate above gives. + const CALLS: [&str; 2] = + [concat!("fire_event", "("), concat!("fire_event_reach", "(")]; + for call in CALLS { + let mut from = 0; + while let Some(i) = text[from..].find(call) { + let at = from + i + call.len(); + from = at; + let rest = text[at..].trim_start(); + if let Some(body) = rest.strip_prefix('"') { + if let Some(end) = body.find('"') { + fired + .entry(body[..end].to_string()) + .or_insert_with(|| p.display().to_string()); + } } } }