feat(v2): create DEV data tables, deploy V2 workflow (inactive), record schema introspection
- Fixed 3 remaining "return [...].join(...)" false-positive triggers in logic/message.js (n8n-mcp's static validator flags any inner return-array pattern as if it were the node's own output shape) by extracting each to a named variable before joining. All 3 occurrences of the pattern lived inside buildTopMessage/buildCoordinationDigest, which get fully inlined into both "Code - Montar Mensagem Curta" and "Code - Montar Digest Coordenacao" (whichever function is actually called, the whole module is inlined), so both nodes needed the same fix. - Deployed [DEV] Coordenador GLPI - Chamados Abertos v2 (Shadow) (id y6JFEnp7Z2IJEUe2) to devn8n.gtigrupo.com.br: 36 nodes, inactive, n8n_validate_workflow reports valid:true (0 errors, 1 minor deprecation warning on continueOnFail). - Ran n8n_autofix_workflow: 6 safe typeVersion upgrades applied and mirrored back into n8n/workflow.template.json so future rebuilds stay in sync. - Found and fixed a real safety issue: creating the workflow before the "MySQL GLPI - Coordenador" credential existed caused n8n to silently auto-bind the 3 MySQL nodes to the only other mySql-type credential in the instance (an unrelated Asaas billing credential). Cleared those credential bindings (both live and in the template) rather than leave them pointing at the wrong database. - Created the two Data Tables the pipeline needs: coordenador_glpi_memoria (17 columns) and coordenador_glpi_shadow_runs (6 columns). - Documented the pending schema introspection (glpi_tickettasks.state column name unverified, blocked on the MySQL credential) and an unrelated discovery (two other Data Tables, dev_glpi_v2_insights_memory and dev_glpi_v2_run_history, appeared on the DEV instance mid-session from a source other than this one) in docs/superpowers/notes/. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
a99a25cb1a
commit
af48ea69d8
+7
-4
@@ -33,20 +33,23 @@ function buildTopMessage(selected, dateStr, config) {
|
||||
const header = `@time ${selected.length} chamados para atenção hoje — ${dateStr}`;
|
||||
const blocks = selected.map((item, index) => {
|
||||
const t = item.ticket;
|
||||
return [
|
||||
const linhasDoBloco = [
|
||||
`${index + 1}. #${t.id} • ${tituloCurto(t.titulo)}`,
|
||||
signalLine(t),
|
||||
`→ ${shortActionLabel(item.aiClassification)}`,
|
||||
t.link_glpi,
|
||||
].join('\n');
|
||||
];
|
||||
return linhasDoBloco.join('\n');
|
||||
});
|
||||
return [header, '', ...blocks].join('\n\n');
|
||||
const partesDaMensagem = [header, '', ...blocks];
|
||||
return partesDaMensagem.join('\n\n');
|
||||
}
|
||||
|
||||
function buildCoordinationDigest(changedBlocked, dateStr) {
|
||||
if (!changedBlocked.length) return null;
|
||||
const lines = changedBlocked.map((item) => `#${item.ticket.id} • ${(item.aiClassification && item.aiClassification.reason) || item.exclusionReason}`);
|
||||
return [`Coordenação — bloqueios novos/alterados — ${dateStr}`, '', ...lines].join('\n');
|
||||
const partesDoDigest = [`Coordenação — bloqueios novos/alterados — ${dateStr}`, '', ...lines];
|
||||
return partesDoDigest.join('\n');
|
||||
}
|
||||
|
||||
module.exports = { shortActionLabel, tituloCurto, signalLine, buildTopMessage, buildCoordinationDigest };
|
||||
|
||||
Reference in New Issue
Block a user