fix(mcp): non dirottare le domande concettuali "differenza tra X e Y" su un war report killboard#5
Merged
WilliamFalci merged 1 commit intoJun 5, 2026
Conversation
…illboard war + bump 0.1.54
A definitional question ("what is the difference between Omega and Alpha",
"differenza tra account Alpha e Omega", module comparisons) was caught by the
generic head-to-head matcher and answered with a meaningless 0-vs-0 war_report
card, suppressing the RAG answer (entities coincidentally resolve to a real
alliance/character; ok() only length-checks the name).
Two non-invasive guards in the WAR/HEAD-TO-HEAD intent, no change to intent
ordering or existing patterns:
- Guard A (pre-network): skip the intent for conceptual framing
(differenza/difference/cosa cambia/quale è meglio/which is better) → falls
through to RAG. Genuine war framing (guerra/war, "X vs Y", confronta) is
unaffected since it never uses those words.
- Guard B (post-network): if war_report returns no combat in either direction
(total_kills and total_isk both 0), return EMPTY instead of a 0-vs-0 card →
RAG. Covers the "vs"-phrased account-type question and module comparisons
that resolve to zero-activity entities by name collision.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
Una domanda definitoria — "what is the difference between Omega and Alpha", "differenza tra account Alpha e Omega", o una comparazione tra moduli — veniva catturata dal matcher generico head-to-head in
mcp-intel.mjse risolta con una cardwar_report0-vs-0 senza senso, sopprimendo del tutto la risposta RAG.Causa: i nomi "Omega"/"Alpha" combaciano per caso con un'alleanza e un personaggio reali su eve-kill, e
ok()controlla solo la lunghezza del nome, non l'esistenza dell'entità. Quandomcp.textè valorizzato, l'engine salta il RAG (engine.mjs:762), quindi la risposta enciclopedica corretta non viene mai generata.![screenshot del bug: card OMEGA vs Alpha con 0 kills / 0 ISK]
Soluzione — due guard non invasivi
Nessuna modifica all'ordine degli intent né ai pattern esistenti: solo una condizione attorno al blocco WAR / HEAD-TO-HEAD.
differenza/difference/cosa cambia/quale è meglio/which is better) → la domanda cade sul RAG. Il framing di guerra reale (guerra/war,"X vs Y",confronta) non usa mai quelle parole, quindi è inalterato.war_reporttorna senza combattimenti in entrambe le direzioni (total_killsetotal_iskentrambi 0) si ritornaEMPTYinvece della card 0-vs-0 → RAG. Copre il caso scritto con"vs"e le comparazioni di moduli che risolvono a entità a zero attività per collisione di nomi.Perché è sicuro
Test
node --checksul modulo: OK.Include il bump di versione 0.1.54 (
package.json+package-lock.json).🤖 Generated with Claude Code