feat(v2): wire Slack send branch + Schedule Trigger into the template, generalize transitive-dep test
n8n/workflow.template.json: - Added the 10 new nodes for the real Slack send branch (Data Table - Buscar Envios Recentes, Code - Guard de Envio Slack, IF - Deve Enviar Slack?, Slack - Enviar Mensagem, Code - Pular Envio Slack, Code - Registrar Envio Sucesso/Falha, the two Data Table - Registrar Envio Digest nodes, Code - Lancar Erro Envio Slack) and wired every connection -- Code - Montar Digest Coordenacao now fans out to both the existing shadow-diff branch (unchanged, always runs) and the new send branch in parallel, so a Slack failure never loses the shadow audit trail. - Renamed "Schedule Trigger - Dias uteis 08h (desligado em DEV)" -> "Schedule Trigger - Dias uteis 08h": it was already wired to Config and already had the correct cron (0 8 * * 1-5) from earlier in the project -- this cycle didn't need to build it, just stop calling it "desligado" now that it's genuinely production-track (activation is controlled by the workflow's own active flag, not the node's name). - Added settings.timezone: "America/Sao_Paulo" explicitly (previously implicit/unset) -- matches the timezone already hardcoded into buildTopMessage's dateStr computation elsewhere in this codebase, not a new assumption. - Config node: AI_MAX_CANDIDATES 30->60, added ENVIRONMENT/SEND_ENABLED. tools/build-workflow.test.js: 10 new tests (connections integrity after a node rename -- would have caught a real bug this cycle where renaming the Schedule Trigger orphaned its connection key; Schedule Trigger wired + correct cron/timezone; Manual Trigger still present; real Slack node exists with the right credential/onError; guard runs before Slack; per-ticket envio registration only fires after the success Data Table write; Slack failure always registers before throwing; AI_MAX_CANDIDATES == CANDIDATE_POOL_SIZE; SEND_ENABLED/ENVIRONMENT present; GLPI SQL/query scan for INSERT/UPDATE/DELETE/ALTER/DROP/CREATE/TRUNCATE; dataTable node operation values are valid enum members -- caught a real bug, "getRows" [the MCP tool's action name] isn't a valid node parameter value, it's "get"). Replaced the narrow normalize.js-specific transitive-dependency test with a general one that scans every logic/*.js top-level function and asserts any node calling it also has it inlined -- this caught a second real instance of the same bug class (slack.js's use of hash.js's djb2Hash, missing from 3 new node headers) before it reached a live run. n8n/deployed/coordenador-glpi-v2.n8n.json regenerated (43 nodes). 156/156 tests passing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
abc690ddb7
commit
d64b1132b9
+974
-132
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user