Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(docs): name the Baileys build the tree actually installs

Yudhi Armyndharisa1b4d27c58c1
diff --git a/docs/29-engine-capability-matrix.md b/docs/29-engine-capability-matrix.md
index add36c3ba..e9aed6da5 100644
--- a/docs/29-engine-capability-matrix.md
+++ b/docs/29-engine-capability-matrix.md
@@ -1,7 +1,7 @@
# 29 - Engine Capability Matrix
Three-way comparison of every capability: the **Baileys library** (`@whiskeysockets/baileys`
-7.0.0-rc13), the **whatsapp-web.js library** (1.34.7), and what **OpenWA actually exposes** through
+7.0.0-rc14), the **whatsapp-web.js library** (1.34.7), and what **OpenWA actually exposes** through
its adapter layer and REST API — including which "supported" cells only work because OpenWA patches
the installed library. Coverage is total: all 112 `IWhatsAppEngine` methods (29.4), **all 152
Baileys + 81 whatsapp-web.js library methods** (29.5), all 34 + 31 library events (29.5.4), and all
@@ -50,7 +50,7 @@ flowchart LR
SVC --> STORE["OpenWA-side stores"]
end
WA --> WLIB["whatsapp-web.js 1.34.7<br/>+ 7 OpenWA patches"]
- BA --> BLIB["@whiskeysockets/baileys 7.0.0-rc13<br/>+ 2 OpenWA patches"]
+ BA --> BLIB["@whiskeysockets/baileys 7.0.0-rc14<br/>+ 2 OpenWA patches"]
WLIB --> WEB["WhatsApp Web<br/>headless Chromium"]
BLIB --> WAS["WhatsApp servers<br/>browser-free socket"]
WA -.->|"not-available"| E["EngineNotSupportedError<br/>HTTP 501"]
diff --git a/src/engine/docs-29-counts.spec.ts b/src/engine/docs-29-counts.spec.ts
index 8f148c5b8..a28d32bfc 100644
--- a/src/engine/docs-29-counts.spec.ts
+++ b/src/engine/docs-29-counts.spec.ts
@@ -11,6 +11,44 @@ import { engineCapabilityMatrix } from './engine-capability-matrix';
* nothing noticed: the parity gates compare the matrix to the interface, and no check reads the
* prose. This binds every count-shaped claim in the file to the source it restates.
*/
+/**
+ * The same document also names the two engine LIBRARY versions, in the intro and again in the
+ * architecture mermaid node. Those are hand-written too, and nothing read them: the Baileys pin
+ * moved to 7.0.0-rc14 while both places still said rc13, so the file that exists to be the
+ * authority on engine capability was describing a build the tree does not install.
+ */
+describe('docs/29 names the engine library versions the tree pins', () => {
+ const repoRoot = join(__dirname, '..', '..');
+ const doc = readFileSync(join(repoRoot, 'docs', '29-engine-capability-matrix.md'), 'utf8');
+ const pkg = JSON.parse(readFileSync(join(repoRoot, 'package.json'), 'utf8')) as {
+ dependencies: Record<string, string>;
+ };
+
+ it.each([
+ ['whatsapp-web.js', 'whatsapp-web.js'],
+ ['@whiskeysockets/baileys', '@whiskeysockets/baileys'],
+ ])('states the installed %s version', (_label, dependency) => {
+ const pinned = pkg.dependencies[dependency];
+ expect(pinned).toBeTruthy();
+
+ // Exact pins, not ranges: a caret here would make "the version docs/29 must name" ambiguous.
+ expect(pinned).toMatch(/^\d/);
+ expect(doc).toContain(pinned);
+ });
+
+ it('names no other exact version of either library', () => {
+ // Non-vacuity, and the actual failure mode: the stale rc13 sat beside a correct figure
+ // elsewhere in the file, so a containment check alone would have passed.
+ //
+ // Only COMPLETE versions count. `1.34.x` names a release line rather than a build and is
+ // ordinary prose, so a major.minor.x form is not a claim this gate can adjudicate.
+ const mentioned = [...doc.matchAll(/(?:baileys|whatsapp-web\.js)\s+(\d+\.\d+\.\d[\w.-]*)/gi)].map(m => m[1]);
+ const allowed = new Set([pkg.dependencies['whatsapp-web.js'], pkg.dependencies['@whiskeysockets/baileys']]);
+ expect(mentioned.length).toBeGreaterThan(0);
+ expect(mentioned.filter(v => !allowed.has(v))).toEqual([]);
+ });
+});
+
describe('docs/29 counts match the capability matrix', () => {
const read = (...parts: string[]): string => readFileSync(join(__dirname, '..', '..', ...parts), 'utf8');