Skip to content

datastores: loadPhraseMap warms an empty map on a zero-row read — status/priority names can silently blank again #195

@SyniRon

Description

@SyniRon

This was generated by AI — surfaced during the #194 swarm review (follow-up to #189).

Observation

datastores.(*Mysql).loadPhraseMap returns (emptyMap, nil) whenever the xf_phrase query succeeds but matches zero rows — no Warn, no error. The reference cache then warms a fully-empty status/priority map and every statusName/priorityName resolves to "" on 200s, with nothing surfaced anywhere.

This is the exact failure mode #189 just fixed (a wrong title prefix matched zero rows → empty map → blank names), still latent one layer down: the prefix is now correct, but any future drift that makes the query return zero rows reproduces it silently.

Why it matters

The status and priority phrase families are never legitimately empty in production. A zero-row read for those families therefore means something has drifted — e.g. another NF Tickets add-on phrase rename, a collation/charset change, or a language_id regression — and the symptom would again be blank statusName/priorityName on otherwise-healthy 200s, invisible to logs, metrics, and the golden corpus (which records over the fake datastore and never touches phrase tables).

Same silent-degradation class as the open cluster #145 / #154 / #155 (datastore reads degrading to empty/blank on fault without surfacing).

Possible directions (for triage to rule — deliberately not deciding here)

Surfaced by the silent-failure review on PR #194. No fix attempted yet — needs-triage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready-for-agentFully specified, ready for an AFK agent to implement

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions