-
-
Notifications
You must be signed in to change notification settings - Fork 733
Labels
area: coreCore framework (.aios-core/core/)Core framework (.aios-core/core/)status: needs-triageAwaiting initial triageAwaiting initial triage
Description
Descrição
Em ideation-engine.js:16, o módulo tenta importar GotchasMemory com:
GotchasMemory = require('../memory/gotchas-memory');Porém, gotchas-memory.js exporta um named export:
module.exports = { GotchasMemory, GotchaCategory, Severity, Events, CONFIG };Isso significa que GotchasMemory recebe o objeto module inteiro, não a classe. Na linha 30:
this.gotchasMemory = config.gotchasMemory || (GotchasMemory ? new GotchasMemory() : null);new GotchasMemory() lança TypeError: GotchasMemory is not a constructor porque é um objeto { GotchasMemory: [Function], ... }, não uma classe.
Reprodução
const GotchasMemory = require('.aios-core/core/memory/gotchas-memory');
new GotchasMemory(); // TypeError: GotchasMemory is not a constructorImpacto
O IdeationEngine nunca consegue usar o gotchas memory automaticamente. O try/catch na linha 15-18 silencia o erro em runtime, mas qualquer instância sem config.gotchasMemory explícito terá gotchasMemory: null, perdendo a funcionalidade de filtragem de gotchas conhecidos.
Correção sugerida
let GotchasMemory;
try {
- GotchasMemory = require('../memory/gotchas-memory');
+ ({ GotchasMemory } = require('../memory/gotchas-memory'));
} catch {
GotchasMemory = null;
}Classificação
- Severidade: Média (funcionalidade degradada silenciosamente)
- Tipo: Import bug (named vs default export)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: coreCore framework (.aios-core/core/)Core framework (.aios-core/core/)status: needs-triageAwaiting initial triageAwaiting initial triage