Skip to content

ci(provider-baileys): add a weekly Baileys update check - #1297

Merged
leifermendez merged 1 commit into
fix/baileys-wa-version-resolutionfrom
ci/baileys-weekly-update-check
Nov 18, 2026
Merged

leifermendez merged 1 commit into
fix/baileys-wa-version-resolutionfrom
ci/baileys-weekly-update-check

Conversation

@leifermendez

Copy link
Copy Markdown
Member

What

A weekly workflow (.github/workflows/baileys-update-check.yml) that checks whether a newer baileys release exists and verifies that it installs and works without conflicts.

Stacked on #1296 (it syncs BUNDLED_WA_VERSION in waVersion.ts, added there). Merge #1296 first; this PR retargets to builderbot automatically.

How it works

Runs every Monday at 07:00 UTC, or manually from Actions → Baileys update check with an optional version input.

  1. Compares the pinned version in packages/provider-baileys/package.json with npm latest (scheduled runs only upgrade when the target was published later). Also reports how many unreleased commits Baileys master has. Skips if a PR for that version is already open.
  2. Upgrades with pnpm add baileys@<target> --save-exact.
  3. Conflict check: frozen reinstall from the new lockfile, resolved version must equal the target, fails on unmet peer dependencies involving baileys, records engines.node.
  4. Syncs BUNDLED_WA_VERSION with the new DEFAULT_CONNECTION_CONFIG.version.
  5. Builds the provider (and its dependencies) and runs its Jest suite.
  6. Live handshake (scripts/ci/baileys-handshake.mjs): opens a socket with a fresh auth state and checks WhatsApp issues a QR instead of 405 Connection Failure. Informational only (continue-on-error), since it depends on GitHub runner network/IP.
  7. All green → opens a PR chore(provider-baileys): bump baileys from X to Y with a results table. Any failure → opens (or comments on) an issue with the outcome of each step.

Setup needed

  • Settings → Actions → General → "Allow GitHub Actions to create and approve pull requests" must be enabled, otherwise the PR step fails and an issue is opened instead.
  • PRs created with GITHUB_TOKEN don't trigger other workflows: close and reopen the bot PR to run the regular checks.

Verified locally

  • Version comparison, resolved-version/engines checks, sed sync round-trip and peer-conflict detection (positive and clean cases).
  • Handshake script against WhatsApp: version=2.3000.1043857760, result=QR issued (handshake accepted), exit 0.
  • Every run: block passes bash -n after YAML parsing.

Current status: 7.0.0-rc14 is npm latest, so today's run would report "up to date".

Every Monday (or on demand with an optional target version) the workflow
compares the pinned baileys version with npm `latest`, and when a newer
release exists it upgrades the provider, verifies a conflict-free frozen
install (resolved version, peer dependencies, engines), syncs
BUNDLED_WA_VERSION, builds, runs the provider tests and performs a live
WhatsApp handshake. On success it opens a PR; on failure it opens or
updates an issue with the outcome of each step.

Co-authored-by: Cursor <cursoragent@cursor.com>
@leifermendez
leifermendez merged commit 2fa6914 into fix/baileys-wa-version-resolution Nov 18, 2026
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