Skip to content

A Behavior name in the wrong case is thrown away, so local models never act #231

Closed

Description

@omesser

Found while measuring #175; not fixed there because that issue scopes the fix to #144, and this is a one-word change that deserves its own decision.

What happens

ModelDirector::knows compares a proposed Behavior name to the declared ones with ==:

fn knows(&self, name: &str) -> bool {
    self.behaviors.iter().any(|declared| declared == name)
}

Manifests declare prowl, inspect, nap. Every local model measured in #175 answers Prowl, Inspect, Nap. The name is refused, as_speech catches the whole reply, and it reaches the user as dialogue with the Behavior name stuck on the front of the spoken line. The buddy talks and never acts.

How big it is

Measured over 40 wakes per model, by the harness on #230:

Model Accepted today Would be accepted, ignoring case
gemma4:latest 8B 0% 95%
llama3.2:1b 2% 78%
gemma-4-e2b-it-4bit (oMLX) 0% 100%

The oMLX run kept the contract on 40 of 40 wakes and had every one discarded.

What it should do

Compare case-insensitively. eq_ignore_ascii_case matches how the codebase already treats the say: prefix in the same function's neighbourhood, so this is consistency rather than a new rule.

Worth deciding while there: whether to also trim a trailing . or : from the name, which the measurement saw occasionally, and whether an unknown-but-close name should be logged under AI_BUDDY_TRACE_DIRECTOR rather than silently becoming speech.

Acceptance

Activity

  1. omesser commented on Sep 2, 2026

    @omesser
    OwnerAuthor

    #242 merged the two leftovers this issue floated besides the case match:

    • trailing . / : is trimmed off the Behavior name before the identifier check (Prowl. / prowl: play declared prowl)
    • empty say is Wake::Failed (Static), so the buddy no longer speaks the word "say"

    Still not done: log an unknown-but-close name under AI_BUDDY_TRACE_DIRECTOR. That is observability, not this bug. Follow-up next.

  2. added this to the V1 milestone on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions