Skip to content

feat(waha): implement session name alignment to fit WAHA's 54 charact… - #739

Open
IanCouto wants to merge 2 commits into
melgarafael:mainfrom
IanCouto:fix/criar-canal-qr-code
Open

feat(waha): implement session name alignment to fit WAHA's 54 charact…#739
IanCouto wants to merge 2 commits into
melgarafael:mainfrom
IanCouto:fix/criar-canal-qr-code

Conversation

@IanCouto

Copy link
Copy Markdown
Contributor

…er limit

This update introduces a new function, alinharNomeAoTetoWaha, to ensure that session names conform to WAHA's maximum length requirement. The function generates a new session name if the current one exceeds the limit, preventing HTTP 400 errors during session creation. Additionally, tests have been added to validate the new naming constraints and ensure proper functionality across the application.

O que este PR faz


📌 Contribuindo de um fork? Você está no lugar certo.

Duas coisas vão parecer erro seu e não são — e nenhuma é motivo para fechar o PR:

  • Vercel vermelho (Authorization required to deploy): esperado em PR de fork, porque a main faz deploy de produção. Não entra no gate de merge.
  • Workflows parados esperando aprovação: política do GitHub no primeiro PR de quem nunca contribuiu. Um mantenedor libera.
E estas quatro são trabalho NOSSO — não se preocupe com elas
Fragmento em .changes/ É o aviso que aparece na tela de quem opera uma VPS. Se faltar, nós escrevemos, com o seu nome. Não é cobrança.
Numeração de migration Se colidir com um PR aberto que você não tinha como ver, quem renumera somos nós.
Conflito com a main Resolvemos do nosso lado, preservando os seus commits. Você não refaz nada.
Prova pela tela (test:e2e) Exige Docker, banco semeado e WAHA local. Fica com o mantenedor — exigir prova sem entregar a ferramenta de produzi-la seria pedágio, não rigor.

Checklist (Definition of Done)

  • pnpm typecheck zerado
  • pnpm lint zerado
  • Testes relevantes existem e passam (pnpm test:unit)
  • RLS testada, se toca tabela tenant-aware
  • Audit log emitido, se há mutação relevante
  • Zod valida todo input externo novo
  • Sem console.log esquecido
  • Mudança de schema saiu como migration versionada + apêndice no baseline.sql + linha no MANIFEST
  • Doc atualizada se mudou contrato (PRD/spec)

Convenções completas em CLAUDE.md · fluxo em CONTRIBUTING.md.

Seu trabalho aparece no seu perfil do GitHub? Se você commitou de um servidor, pode estar assinado como root, e o GitHub não associa isso à sua conta. git config --global user.email "<e-mail da sua conta>" resolve dali em diante — e se pedir, a gente corrige o histórico.

…er limit

This update introduces a new function, alinharNomeAoTetoWaha, to ensure that session names conform to WAHA's maximum length requirement. The function generates a new session name if the current one exceeds the limit, preventing HTTP 400 errors during session creation. Additionally, tests have been added to validate the new naming constraints and ensure proper functionality across the application.
@ecc-tools

ecc-tools Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Security Evidence

Commit: 49e9bf720718d59405f5e0f6555f8cfa4187d27b

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 10 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

@IanCouto is attempting to deploy a commit to the rafael-maudibrasil's projects Team on Vercel.

A member of the Team first needs to authorize it.

@ecc-tools

ecc-tools Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / PR Risk Taxonomy

Commit: 49e9bf720718d59405f5e0f6555f8cfa4187d27b

PR taxonomy review recommended (neutral)

Detected 1 PR taxonomy bucket(s): CI/CD Recommendation.

Scanned 10 changed file(s).

Roadmap taxonomy buckets:

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • API contract changes may ship without integration coverage
  • API implementation changes may ship without contract artifact updates
  • 4 CI or workflow path(s) changed

Paths:

  • lib/channels/connect-waha.test.ts
  • lib/waha/nome-da-sessao.test.ts
  • tests/invariants/pre-go-live-reservation.test.ts
  • tests/unit/pre-go-live-novos-canais.test.ts
  • app/api/v1/channel-sessions/[id]/reconnect/route.ts
  • lib/channels/connect-waha.ts
  • lib/waha/nome-da-sessao.ts

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Reference Set Readiness

Commit: 49e9bf720718d59405f5e0f6555f8cfa4187d27b

Reference set readiness gaps detected (neutral)

Reference evidence present for 0/7 areas (0%) across 10 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Missing Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs.
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Hosted Promotion Readiness

Commit: 49e9bf720718d59405f5e0f6555f8cfa4187d27b

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 10 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@github-actions

Copy link
Copy Markdown

Recebido, @IanCouto — obrigado por isto.

Duas coisas que vão parecer erro seu e não são:

  • O check Vercel vermelho ("Authorization required to deploy") é esperado em PR de fork. A
    main faz deploy de produção e a Vercel se recusa a construir código de fora, o que está
    certo. Ele não entra no gate de merge.
  • No primeiro PR de quem nunca contribuiu aqui, os workflows ficam parados esperando
    liberação
    — política do GitHub, não sua. Enquanto isso o PR parece não ter check nenhum
    (nem o gh pr checks mostra os que estão nesse estado). Quem tria libera; você não precisa
    fazer nada.

Um mantenedor vai revisar de verdade — rodando os gates e reproduzindo o comportamento, não só
lendo o diff — e responde aqui em até um dia útil, com a medição junto, nunca com um "acho
que".

Esta mensagem é automática e não diz nada sobre o seu PR: ela é sobre o processo. O que vem
depois é pessoa.

A main ja encurtava o nome da sessao WAHA no banco (0232, org_<8>_<32>).
Mantem esse SQL e o encurtamento no app, sem duplicar a migration.
@ecc-tools

ecc-tools Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Security Evidence

Commit: 51f2b4f734e93fa0e1298d27ebf61cafc1ec3b8a

Security evidence gate passed (success)

No security-sensitive scanner-evidence gap detected.

Mode: enforce

Scanned 8 changed file(s). No missing scanner-evidence signal was detected.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / PR Risk Taxonomy

Commit: 51f2b4f734e93fa0e1298d27ebf61cafc1ec3b8a

PR taxonomy review recommended (neutral)

Detected 1 PR taxonomy bucket(s): CI/CD Recommendation.

Scanned 8 changed file(s).

Roadmap taxonomy buckets:

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • API contract changes may ship without integration coverage
  • API implementation changes may ship without contract artifact updates
  • 4 CI or workflow path(s) changed

Paths:

  • lib/channels/connect-waha.test.ts
  • lib/waha/nome-da-sessao.test.ts
  • tests/invariants/pre-go-live-reservation.test.ts
  • tests/unit/pre-go-live-novos-canais.test.ts
  • app/api/v1/channel-sessions/[id]/reconnect/route.ts
  • lib/channels/connect-waha.ts
  • lib/waha/nome-da-sessao.ts

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Reference Set Readiness

Commit: 51f2b4f734e93fa0e1298d27ebf61cafc1ec3b8a

Reference set readiness gaps detected (neutral)

Reference evidence present for 0/7 areas (0%) across 8 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Missing Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs.
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Hosted Promotion Readiness

Commit: 51f2b4f734e93fa0e1298d27ebf61cafc1ec3b8a

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 8 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant