Skip to content

Feat/warm up groups#2508

Closed
rafaelwithoeft wants to merge 6 commits intoWhiskeySockets:masterfrom
wayapiteam:feat/warm-up-groups
Closed

Feat/warm up groups#2508
rafaelwithoeft wants to merge 6 commits intoWhiskeySockets:masterfrom
wayapiteam:feat/warm-up-groups

Conversation

@rafaelwithoeft
Copy link
Copy Markdown

@rafaelwithoeft rafaelwithoeft commented Apr 29, 2026

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR reorganizes CI/CD workflows, migrates package ownership to @wayapiteam/baileys, introduces comprehensive send-path instrumentation with timing metrics, adds group warm-up utilities for preemptive session loading, and refactors message sending to support instrumentation hooks and cache optimization.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows Removed
.github/workflows/build.yml, lint.yml, manual-release.yml, pr-comment.yml, publish-release.yml, stale.yml, test.yml, update-proto.yml, update-version.yml
Deleted 9 workflows previously responsible for CI (build, test, lint), release automation, PR commenting, stale issue management, and version/proto updates.
GitHub Actions Workflows Added
.github/workflows/publish-github-packages.yml
New workflow publishes package to GitHub Packages on master branch pushes with npm registry credentials and NODE_AUTH_TOKEN.
Package Metadata & Versioning
package.json, src/Defaults/baileys-version.json, src/Defaults/index.ts, src/Utils/generics.ts
Renamed package to @wayapiteam/baileys, bumped version to 7.0.1, added GitHub Packages publishConfig, updated repository URLs to wayapiteam/Baileys, changed libsignal dependency format, and updated fallback version constants.
Instrumentation Framework
src/Types/Instrumentation.ts, src/Utils/instrumentation.ts
Added new instrumentation types (SendInstrumentationEvent, SendInstrumentationStatus, SendInstrumentationCounts, warm-up summaries) and utilities (emitSendInstrumentation, measureSendInstrumentation) for capturing send-path metrics and timings.
Type Extensions
src/Types/Signal.ts, src/Types/Message.ts, src/Types/Socket.ts
Updated encryptGroupMessage options/return to support optional createDistributionMessage flag; extended MediaGenerationOptions and SocketConfig with sendInstrumentation hook and peerSessionsCache.
Signal Encryption
src/Signal/libsignal.ts
Made encryptGroupMessage conditionally create sender-key distribution messages based on createDistributionMessage flag; distribution message now optional in return type.
Group Metadata & Send Instrumentation
src/Socket/groups.ts, src/Socket/messages-send.ts
Added timing and instrumentation to groupMetadata queries; introduced group warm-up utilities (warmUpGroupSend, warmUpGroupParticipants), peer-session cache, fanout optimization, and pervasive send-path instrumentation around device fetching, session assertion, encryption, and node transmission.
Media Handling & Message Preparation
src/Utils/messages-media.ts, src/Utils/messages.ts
Instrumented per-host media uploads with timing; refactored prepareWAMessageMedia with end-to-end instrumentation wrapping, cache hit/miss tracking, stage-specific events, and mediaKeyTimestamp addition.
Test Coverage
src/__tests__/Socket/warmup-group.test.ts
Added test suite validating group warm-up behavior, cache handling, and summary population.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~90 minutes

Possibly related PRs

Suggested reviewers

  • purpshell

Poem

🐰 From baileys to @wayapiteam we hop,
Workflows trimmed, instrumentation drops,
Warm-up groups and timings all around,
Messages bloom where metrics are found! 📊✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feat/warm up groups' directly aligns with the main objective: adding group warm-up functionality and send instrumentation to the Baileys library.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Warning

⚠️ This pull request might be slop. It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@whiskeysockets-bot
Copy link
Copy Markdown
Contributor

Thanks for opening this pull request and contributing to the project!

The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch.

In the meantime, anyone in the community is encouraged to test this pull request and provide feedback.

✅ How to confirm it works

If you’ve tested this PR, please comment below with:

Tested and working ✅

This helps us speed up the review and merge process.

📦 To test this PR locally:

# NPM
npm install @whiskeysockets/baileys@wayapiteam/Baileys#feat/warm-up-groups

# Yarn (v2+)
yarn add @whiskeysockets/baileys@wayapiteam/Baileys#feat/warm-up-groups

# PNPM
pnpm add @whiskeysockets/baileys@wayapiteam/Baileys#feat/warm-up-groups

If you encounter any issues or have feedback, feel free to comment as well.

@SheIITear SheIITear closed this Apr 29, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Baileys Review Cycle Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants