Commit Graph
11 Commits
Author SHA1 Message Date
GustavoandClaude Sonnet 5.5 ce7af94d55 docs: update coordinator project state
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-01 14:23:46 -03:00
GustavoandClaude Sonnet 5 2724b90cb4 docs: correção final report (Validar e executar fix, determinism bug, #62/#75 audit)
Compact final report per mission format: root cause + fix for the
"Validar e executar" label bug, the critical Top10 non-determinism bug
(real duplicate-send root cause, proven fixed with identical message
hash across two consecutive real executions), #62/#75 real-data audit
(both legitimate, no ID-based filter warranted), Slack formatting
confirmation, schedule confirmation, production state confirmation.
Verdict: PRONTO PARA USO.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 06:22:15 -03:00
GustavoandClaude Sonnet 5 71796390e3 docs: production-readiness final report
Classifier before/after (real execution 14404), critical-case table for
the 7 reincident tickets (technician-vs-vendor and contact-vs-waiting
fixes confirmed on real data), Top10 critical inspection, Slack
mechanism confirmation (real test send attempted with explicit user
authorization -- pipeline confirmed working end-to-end up to Slack's own
API, which rejected $vars.SLACK_CHANNEL_TECNICO as invalid), Schedule
Trigger confirmation, test/validation summary, production state
confirmation. Verdict: PRONTO PARA ATIVAÇÃO — BLOQUEADO APENAS POR
ACESSO (Slack channel configuration only, not code or n8n access).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 21:03:28 -03:00
GustavoandClaude Sonnet 5 4534099b50 docs: add corrective-cycle final report (Run A/Run B, real execution data)
Live DEV sync completed (all 11 changed nodes pushed, including the
transitive-dependency fix), then two real executions against production
GLPI in shadow mode:

- Run A (execution 14259): 45 candidates, 30 real AI calls (0 errors),
  15 correctly routed to AI_FALLBACK instead of fake ACTIONABLE_NOW,
  3 critical overrides. ACTIONABLE_NOW/UNASSIGNED_ACTIONABLE still 0 --
  reported honestly, not forced.
- Run B (execution 14263, ~1 min later, no data changes): 0 AI calls,
  45/45 cache hits, cached AI_FALLBACK items correctly stayed fallback
  (proves the cache is_fallback bug fix), Top10 correctly shrank
  10->5 as WAITING_VENDOR/WAITING_REQUESTER items hit cooldown.

Full reincident-ticket table (7 tickets) with real evidence, real
before/after HTML-normalization examples (tickets #37389, #36530),
shadow diff vs legacy, webhook-debug-removed confirmation, production-
untouched confirmation. Verdict: CONTINUAR SHADOW MODE.

Workflow y6JFEnp7Z2IJEUe2 ends this cycle at active:false, 33 nodes,
temp webhook removed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 20:09:52 -03:00
GustavoandClaude Sonnet 5 6bbdaa5fe8 docs: add final mission report (real execution data, no fabricated numbers)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 16:33:04 -03:00
GustavoandClaude Sonnet 5 2881fb52de docs: update schema introspection note with confirmed findings from real run
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 16:31:22 -03:00
GustavoandClaude Sonnet 5 af48ea69d8 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>
2026-08-24 15:47:48 -03:00
GustavoandClaude Sonnet 5 a99a25cb1a feat(v2): complete n8n workflow template (36 nodes) covering full V2 pipeline + shadow branch
- 14 new Code node drivers implementing the pipeline stages: normalize
  candidates, build context SQL, merge context + hash, decide AI need,
  prepare AI prompt, validate AI response, AI-disabled fallback, reuse
  cached classification, compute score, select top 10, prepare memory/
  envio records, build message/digest, compare legacy x V2, debug panel.
- Consolidated the two context queries (followups/tasks) into a single
  UNION ALL query tagged by tipo, and added a "Merge - Unir Shadow"
  synchronization node before comparing legacy x V2: n8n does not
  guarantee relative execution order between sibling branches that only
  share an early common ancestor, so cross-branch data was only safe to
  read by name once a real Merge node forced both to complete first.
- Reordered score calculation before the memory upsert (score is needed
  in the persisted row) and turned both Data Table writes into
  side-effect branches that fan out from the main path instead of
  gating it, so the Data Table node's own output shape never needs to
  carry the full pipeline state forward.
- Fixed a duplicate-identifier bug in the build script: score.js's
  require('./cooldown') survived inlining and collided with
  cooldown.js's own computeCooldown function in the same Code node
  scope. build-workflow.js now strips inter-module requires when
  inlining, and a new test syntax-checks every generated jsCode string
  plus asserts no leftover require() calls.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 15:31:44 -03:00
GustavoandClaude Sonnet 5 00bb89f4f4 feat(v2): candidate pool SQL (admin exclusion preserved, no hard LIMIT 10) + verbatim legacy SQL for shadow mode
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 15:19:39 -03:00
GustavoandClaude Sonnet 5 49f487d636 docs: add V2 implementation plan (17 tasks, TDD for deterministic logic)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 15:12:08 -03:00
GustavoandClaude Sonnet 5 de147107d5 docs: add V2 design spec (approved)
docs/superpowers/specs/2026-08-24-coordenador-glpi-v2-design.md
Covers Etapa 0 recovery findings, architecture, data model, AI schema,
scoring, message format, shadow mode. Approved by user in chat.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-24 15:00:34 -03:00