Skip to content

fix: backlog — addKeyword empty, QR validation, sharp engines, meta webhook notice, endFlow tests, venom CI matrix - #1259

Open
ipproyectosysoluciones wants to merge 14 commits into
codigoencasa:builderbotfrom
ipproyectosysoluciones:contrib/todo-backlog
Open

ipproyectosysoluciones wants to merge 14 commits into
codigoencasa:builderbotfrom
ipproyectosysoluciones:contrib/todo-backlog

Conversation

@ipproyectosysoluciones

Copy link
Copy Markdown

Summary

Six focused fixes from the backlog, each in a conventional commit.

Changes

  • fix(bot): reject empty addKeyword([]) / addKeyword('') (keyword.length === 0 guard)
  • fix(provider-venom): validate QR image exists before serving (existsSync → 404 JSON instead of unhandled ENOENT)
  • chore: require Node >=20.12.1 for sharp@0.33.x (root + 6 packages engines)
  • feat(provider-meta): emit WEBHOOK REQUIRED notice after ready (reminder to configure callback URL + subscribe to messages)
  • test(bot): unskip endFlow suite (flow already fixed) → 6/6
  • ci: add venom Node version matrix (18.19/20.10/21.7.2 × ubuntu/win)

Verification

  • @builderbot/bot methods: 13/13 · e2e endFlow: 6/6
  • @builderbot/provider-venom: 29/29
  • @builderbot/provider-meta: 68/68

Notes

  • CONTRIBUTING.md and TS target bump were left out of this PR (they depend on builderbot's current state) — can be split into a separate PR if desired.
  • venom CI matrix requires a real GitHub Actions run to validate.

addKeyword([]) and addKeyword('') now throw 'Keyword cannot be empty'
via a single keyword.length === 0 guard. Prevents empty-keyword flows.

test: RED -> GREEN (13/13) in methods.test.ts
indexHome now checks existsSync(qrPath) and returns 404 JSON when the
QR has not been generated, instead of streaming an unhandled ENOENT.

test: 29/29 (new 404 case)
sharp@0.33.x breaks on Node < 20.12.1. Bump root engines.node to
>=20.12.1 <23.0.0 and add engines { node: >=20.12.1 } to the 6
packages that depend on sharp.
afterHttpServerInit now emits a WEBHOOK REQUIRED notice after ready,
reminding to configure the callback URL and subscribe to messages.

test: 68/68
The endFlow + capture:true flow was already fixed; 5 tests were left
skipped. Unskip them -> 6/6 pass.
Matrix Node 18.19/20.10/21.7.2 x ubuntu/windows for provider-venom,
triggered on provider-venom changes or manual dispatch.
actions/checkout tried to init a malformed 'wa-calls-ref' submodule
(no url in .gitmodules) and failed. Disable submodules like crm-ci.yml.
Replace obsolete Node 18.19/20.10 with 20.12.1/21.7.2/22.20.0.
pnpm/action-setup conflicted between version:9 and packageManager
pnpm@9.0.6. Align to the exact packageManager version.
Node 20.12.1/21.7.2 are non-LTS and sharp has no prebuilt binaries for
them, so builds time out (20m). Node 22 LTS passes in ~5m.

This branch has not been deployed

No deployments
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