fix: route WhatsApp group activation through session accessor#96530
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 24, 2026, 4:09 PM ET / 20:09 UTC. Summary PR surface: Source +14, Tests +1, Other +1. Total +16 across 3 files. Reproducibility: yes. for the source-level migration target: current main and Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow accessor migration after a maintainer accepts the scoped non-transport proof, while keeping the broader SQLite backend work tracked in #88838. Do we have a high-confidence way to reproduce the issue? Yes for the source-level migration target: current main and Is this the best way to solve the issue? Yes, this is the narrow maintainable fix shape for this slice: it uses the existing session accessor API and ratchet without adding SDK surface, config, or a SQLite backend flip. The remaining question is maintainer acceptance of the proof scope, not a better code location. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 10e03f797efd. Label changesLabel justifications:
Evidence reviewedPR surface: Source +14, Tests +1, Other +1. Total +16 across 3 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
aa6aedd to
c94fdd0
Compare
c94fdd0 to
9d72efc
Compare
9d72efc to
1d94cf4
Compare
What Problem This Solves
WhatsApp group activation still used the legacy whole-session-store helpers to read and backfill group activation metadata. That kept this Path 3.1b slice tied to file-store mutation instead of the session accessor boundary tracked by #88838.
Why This Change Was Made
The SQLite migration needs WhatsApp group activation writes to go through per-entry accessor operations so the future backend can preserve transaction boundaries. This change keeps the existing legacy/scoped resolution behavior while removing direct
loadSessionStore/updateSessionStoreusage from the migrated runtime path.User Impact
Users should see no behavior change. Named-account WhatsApp groups still inherit legacy activation settings, sparse activation-only backfills stay sparse, existing scoped session metadata is preserved, and default-account handling in multi-account configs remains mention-required when appropriate.
Evidence
Rebased head:
1d94cf49aa16c750129019c32ed8c0dbf72af9a2on currentupstream/mainafter the latest Path 3 sibling ratchet changes landed. GitHub reportsmergeStateStatus=CLEAN; CI completed with 61 successful checks, 25 skipped checks, CodeQL neutral, and no failures.node scripts/run-vitest.mjs extensions/whatsapp/src/auto-reply/monitor/group-activation.test.tspassed 4 tests on1d94cf49aa1.node scripts/run-vitest.mjs test/scripts/check-session-accessor-boundary.test.tspassed 31 tests on1d94cf49aa1.node scripts/check-session-accessor-boundary.mjspassed on1d94cf49aa1.node_modules/.bin/oxfmt --check --threads=1 extensions/whatsapp/src/auto-reply/monitor/group-activation.ts scripts/check-session-accessor-boundary.mjs test/scripts/check-session-accessor-boundary.test.tspassed on1d94cf49aa1.node scripts/run-tsgo.mjs -p tsconfig.extensions.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/extensions.tsbuildinfopassed on1d94cf49aa1.autoreview --mode branch --base upstream/mainreported no accepted/actionable findings on1d94cf49aa1.pnpm buildpassed in the live local checkout at pre-rebase proof headaa6aedd08669.pnpm openclaw gateway restart,pnpm openclaw --version,pnpm openclaw gateway status,/healthz, and/readyzpassed in the live local checkout at pre-rebase proof headaa6aedd08669.Real behavior proof
Behavior addressed: WhatsApp group activation reads legacy/scoped metadata and backfills the scoped group key through the session accessor path without whole-store mutation.
Real environment tested: local live Gateway/runtime proof on Josh's machine, rebuilt from pre-rebase proof head
aa6aedd08669(OpenClaw 2026.6.10 (aa6aedd)) with Gateway restarted and healthy on port 18789. Later rebases only reconciled the ratchet list with merged Path 3 sibling work; they did not require another live proof run.Exact steps or command run after this patch:
Evidence after fix: Gateway reported
OpenClaw 2026.6.10 (aa6aedd), connectivityok,/healthzreturned{"ok":true,"status":"live"}, and/readyzreturned{"ready":true,"failing":[]...}. The runtime probe returned:{ "sha": "aa6aedd08669", "proof": "whatsapp group activation accessor downgraded runtime proof", "externalTransport": false, "sparseBackfill": { "activation": "always", "scopedGroupActivation": "always", "scopedSessionId": null, "scopedUpdatedAt": null }, "defaultAccountInMultiAccountConfig": { "activation": "mention" }, "existingScopedEntry": { "activation": "always", "scopedGroupActivation": "always", "scopedSessionId": "scoped-session", "scopedUpdatedAt": 12345 } }Observed result after fix: legacy named-account activation resolves to
always, scoped activation is backfilled, sparse activation-only writes do not synthesizesessionIdorupdatedAt, existing scoped metadata is preserved, and the default account remainsmentionin the multi-account activation-only case.What was not tested: external WhatsApp transport, Baileys authentication, real group receipt, and the future SQLite backend flip. This machine has no configured external WhatsApp/Baileys group transport; the downgraded proof scope was approved by Josh/coordinator.
Restore note
After the live proof, the local live checkout was restored to the original pre-proof SHA
f8b29f82e2a, rebuilt, restarted, and checked healthy. Git could not reattach the original branch name because another worktree currently owns it, so the live checkout was restored to that exact SHA in detached mode.