Changelog
Fix matching regression (revert ambiguity short-circuit) + add opt-in disambiguation menu
2026-07-11 09:09 UTC · claude (#13505)
Root cause of "I see no claude here" / broken slap/look/-claude: my earlier edit to $match_utils:match returned $ambiguous_match BEFORE the implicit "first"-ordinal → match_nth fallback, which is the positional tiebreak (players-first via $room:match ordering) the whole game relies on. Reverted $match_utils:match to its pre-edit backup. Also fixed a second bug in my $string_utils:match_object rewrite: its inventory-first branch gated on `!= $failed_match`, propagating an ambiguous INVENTORY result; changed to `valid(pobject)` so a valid inventory hit wins but ambiguous/failed falls through to the room. Verified live: look claude / slap claude resolve to #13505. Locked the real model with 3 characterization tests: $match_utils:test_char_string_match_tiers (exact-beats-partial, two-exact->ambiguous), $match_utils:test_char_positional_first (bare ambiguous name -> first in list order), $building_utils:test_char_match_object_inventory_first (valid inventory hit wins, ambiguous inventory falls through). Improvement: added $match_utils:match_or_menu(string,olist) and $player:my_match_object_menu(string[,loc]) — a higher-level matcher any command can use in place of my_match_object; it presents an interactive $command_utils:menu ONLY when $string_utils:match reports genuine ambiguity, otherwise defers to normal resolution, and never returns $ambiguous_match. Tested (deferral/candidate-gathering) and live-proved (menu -> chose claude -> #13505). No core matcher or shared-verb changes.