Files
agessaman 85fca4fa4c fix(placeholders): unify the keyword formatter's hop count
format_keyword_response_with_placeholders kept the third copy of the hop-count
logic, and it was the weakest: it consulted message.hops and then went straight
to parsing the path display string, never looking at routing_info. So a keyword
reply and a command reply could describe the same packet differently.

Three cases disagreed, all now resolved:

    case                     keyword   command
    routing path_length          ?  ->  2
    routing path_nodes           ?  ->  3
    routing beats path text      1  ->  2

The last is the one that was actually wrong rather than merely unhelpful: with
both present it took the display string over the packet's own path_length.
routing_info is the decoded packet, so it wins, which is what BaseCommand
already did.

All three formatters now call utils.message_hop_count. Behaviour is unchanged
wherever routing_info is absent, so a message carrying only a path string still
parses the same way and "?" still means the count cannot be determined at all.
2026-08-25 10:12:26 -07:00
..
2026-08-09 18:13:57 +00:00