Skip to content

refactor(install): remove obsolete Baileys media hotfix - #129751

Merged
steipete merged 1 commit into
mainfrom
codex/cleanup20k-postinstall-retired-baileys-hotfix-20260825
Aug 26, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/cleanup20k-postinstall-retired-baileys-hotfix-20260825

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

Remove the obsolete bundled-plugin postinstall workaround for Baileys media stream completion and upload dispatcher selection. Direct inspection of the pristine pinned upstream sources confirms both the shipped stable release and the current dependency already implement both fixes, so the 285-line installer mutation is permanently inactive.

Preserve package ownership, source-checkout and packaged install paths, early disable controls, symlink and path-containment checks, traversal limits, legacy dependency cleanup, and bundled-plugin migration.

Validation

Four complete owner and sibling suites pass all 181 tests across the postinstall lifecycle, preinstall warning, plugin manifest contracts, and Docker package layout. Both pristine stable and current upstream dependency sources were independently inspected and share the same verified fixed implementation. Formatting, direct lint, two independent source audits, and fresh structured review are clean.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Aug 26, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 9:49 PM ET / August 26, 2026, 01:49 UTC.

ClawSweeper review

What this changes

The PR removes the Baileys media-stream and fetch-dispatcher mutation from bundled-plugin postinstall and deletes tests for that retired mutation.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open for maintainer validation: the deletion is structurally focused, but the unchanged lock still pins Baileys 7.0.0-rc14 and this checkout could not independently inspect that artifact to confirm both removed fixes remain upstream.

Priority: P3
Reviewed head: 215f22888a78cbb458283dc952d2437227f34bf7

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused deletion is coherent, but independent confirmation of the exact pinned dependency contract is still missing.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored installer cleanup is exempt from the external-contributor real-behavior-proof gate; the PR’s test claims remain supplemental evidence.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored installer cleanup is exempt from the external-contributor real-behavior-proof gate; the PR’s test claims remain supplemental evidence.
Evidence reviewed 4 items Changed lifecycle: The PR removes the Baileys mutation and leaves source-checkout pruning plus packaged-install cleanup as the postinstall lifecycle.
Dependency contract signal: The WhatsApp plugin and lockfile continue to pin Baileys 7.0.0-rc14, so correctness depends on that exact external package artifact.
Hotfix provenance: The repository history identifies the rc10 postinstall compatibility work and the earlier media-stream and dispatcher fixes, establishing why the deleted code was safety-sensitive.
Findings None None.
Security None None.

Live Verification

Command: pnpm test test/scripts/postinstall-bundled-plugins.test.ts

Result: PASS (completed)

$ node --import tsx scripts/test-projects.mts test/scripts/postinstall-bundled-plugins.test.ts
[test] starting test/vitest/vitest.tooling.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129751-cQdp0O/target

 ✓  tooling  test/scripts/postinstall-bundled-plugins.test.ts (34 tests) 770ms

 Test Files  1 passed (1)
      Tests  34 passed (34)
   Start at  01:49:57
   Duration  1.53s (transform 309ms, setup 59ms, import 326ms, tests 770ms, environment 0ms)

[test] passed 1 Vitest shard in 7.93s
$ node --import tsx scripts/test-projects.mts test/scripts/postinstall-bundled-plugins.test.ts
[test] starting test/vitest/vitest.tooling.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-129751-cQdp0O/target

 ✓  tooling  test/scripts/postinstall-bundled-plugins.test.ts (34 tests) 764ms

 Test Files  1 passed (1)
      Tests  34 passed (34)
   Start at  01:50:06
   Duration  1.28s (transform 84ms, setup 28ms, import 258ms, tests 764ms, environment 0ms)

[test] passed 1 Vitest shard in 7.54s

Assertions:

  • PASS expect_output: Test Files

How this fits together

OpenClaw’s postinstall script prepares bundled plugin packages after installation while preserving safe package ownership and cleanup rules. This change removes a historical mutation of the installed Baileys dependency from that lifecycle.

flowchart LR
  A[Package installation] --> B[Bundled plugin postinstall]
  B --> C[Installed Baileys package]
  C --> D[Historical runtime mutation]
  D --> E[Plugin package layout]
  E --> F[OpenClaw runtime]
Loading

Before merge

  • Resolve merge risk (P1) - Removing the mutation could reintroduce media-upload failures for supported installs if the locked Baileys 7.0.0-rc14 artifact does not contain both equivalent fixes.
  • Complete next step (P2) - No repair lane is appropriate: the remaining need is verification of an external dependency contract, not a concrete patch defect.
Agent review details

Security

None.

PR surface

Tests -127, Other -285. Total -412 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 0 127 -127
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 285 -285
Total 2 0 412 -412

Review metrics

Metric Value Why it matters
Production versus test LOC production -285, tests -127 The deletion materially reduces installer-side mutation code, contingent on the pinned dependency already owning both behaviors.

Stored data model

Persistent data-model change detected: serialized state: test/scripts/postinstall-bundled-plugins.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Verify the locked Baileys artifact (recommended)
    Confirm that the installed 7.0.0-rc14 package contains both stream-finish waiting and safe dispatcher selection before merging this deletion.
  2. Pause the cleanup
    Keep the historical mutation until the exact dependency contract can be independently rechecked.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Verify the npm artifact for [email protected] contains the stream-finish and dispatcher fixes in the installed package path before merge.

Technical review

Best possible solution:

Make the exact locked Baileys artifact independently inspectable or attach reproducible packaged-install evidence for both upstream fixes, then retain only the generic postinstall lifecycle.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is cleanup of a historical workaround, and the decisive check is inspection of the exact supported dependency artifact rather than a reported user failure.

Is this the best way to solve the issue?

Unclear. Deleting an inactive mutation is the cleanest outcome only if the locked Baileys artifact supplies both protections; that contract could not be independently read in this environment.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5af41d881e07.

Labels

Label changes:

  • add P3: This is focused cleanup work rather than a reported active user-facing failure.
  • add merge-risk: 🚨 compatibility: The unchanged pinned dependency is the sole owner of behavior previously enforced during existing users’ installs.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored installer cleanup is exempt from the external-contributor real-behavior-proof gate; the PR’s test claims remain supplemental evidence.

Label justifications:

  • P3: This is focused cleanup work rather than a reported active user-facing failure.
  • merge-risk: 🚨 compatibility: The unchanged pinned dependency is the sole owner of behavior previously enforced during existing users’ installs.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored installer cleanup is exempt from the external-contributor real-behavior-proof gate; the PR’s test claims remain supplemental evidence.

Evidence

What I checked:

  • Changed lifecycle: The PR removes the Baileys mutation and leaves source-checkout pruning plus packaged-install cleanup as the postinstall lifecycle. (scripts/postinstall-bundled-plugins.mjs:646, 215f22888a78)
  • Dependency contract signal: The WhatsApp plugin and lockfile continue to pin Baileys 7.0.0-rc14, so correctness depends on that exact external package artifact. (extensions/whatsapp/package.json:12, 215f22888a78)
  • Hotfix provenance: The repository history identifies the rc10 postinstall compatibility work and the earlier media-stream and dispatcher fixes, establishing why the deleted code was safety-sensitive. (scripts/postinstall-bundled-plugins.mjs:646, 6d1a7169daa7)
  • Independent-artifact limitation: The worktree has no node_modules; the partial clone attempted to fetch missing historical/dependency objects but DNS could not resolve GitHub, so the claimed upstream source inspection could not be repeated here.

Likely related people:

  • steipete: Peter Steinberger authored the rc10 compatibility commit and has the strongest recent history on the postinstall script. (role: recent installer and dependency maintainer; confidence: high; commits: 6d1a7169daa7, a18c31437727; files: scripts/postinstall-bundled-plugins.mjs, test/scripts/postinstall-bundled-plugins.test.ts)
  • frankekn: Frank Yang authored the historical stream-finish fix and the follow-up upload-dispatcher hardening. (role: original media-hotfix contributor; confidence: high; commits: 4ecc8c0d0e1c, d86527d8c6d5; files: scripts/postinstall-bundled-plugins.mjs)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide inspectable evidence from the Baileys 7.0.0-rc14 package showing both removed protections are upstream.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete force-pushed the codex/cleanup20k-postinstall-retired-baileys-hotfix-20260825 branch from 215f228 to 19d8a5e Compare August 26, 2026 02:34
@steipete
steipete merged commit b5fcae3 into main Aug 26, 2026
115 checks passed
@steipete
steipete deleted the codex/cleanup20k-postinstall-retired-baileys-hotfix-20260825 branch August 26, 2026 03:00
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant