Skip to content

refactor(channels)!: remove the zalouser channel plugin - #112079

Closed
ken-kuro wants to merge 1 commit into
openclaw:mainfrom
ken-kuro:refactor/remove-zalouser
Closed

ken-kuro wants to merge 1 commit into
openclaw:mainfrom
ken-kuro:refactor/remove-zalouser

Conversation

@ken-kuro

@ken-kuro ken-kuro commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Removes the bundled zalouser channel plugin — the unofficial zca-js Zalo personal-account (web-spoof) integration. Zalo automation via zca-js carries account-ban risk and has no official vendor backing; the official, vendor-backed path is the external @zalo-platforms/openclaw-zaloclawbot channel plugin, so the unofficial in-tree channel is retired.

This mirrors the recent bundled-plugin removal recipe (refactor(plugins)!: remove experimental workspaces plugin, #110416) and the channel-removal precedent (bluebubbles): delete the extension tree, purge every registry/doc/test reference, regenerate generated artifacts, and add an openclaw doctor --fix migration so existing configs keep loading.

Breaking change: operators who configured channels.zalouser will need to migrate (handled gracefully — see below).

What changed

  • Deleted extensions/zalouser/** (the whole plugin) and its docs (docs/channels/zalouser.md, docs/plugins/zalouser.md, docs/plugins/reference/zalouser.md).
  • Purged hand-maintained registries: optional-bundled-clusters, official-external-channel-catalog, policy tool-posture, logging subsystem prefixes, channel-setup blurbs, plugin-art slugs, channel-agnostic-boundary list, labeler, CodeQL boundary configs, the zalouser Opengrep GHSA rule, wizard i18n (en/zh), and the package.json files-exclude.
  • Regenerated generated artifacts: bundled-channel config metadata, docs map, plugin inventory, max-lines baseline, and the lockfile.
  • Config migration (required): an orphaned channels.zalouser block would otherwise fail config load fatally once the channel is unknown. Added REMOVED_BUNDLED_CHANNEL_IDS (src/channels/ids.ts); config validation now downgrades it to a non-fatal warning pointing at openclaw doctor --fix, and the stale-plugin-config doctor sweep strips channels.zalouser plus dependent modelByChannel/heartbeat references.
  • State cleanup: new core/doctor/removed-zalouser-state check removes leftover state/credentials/zalouser/ credential files on openclaw doctor --fix (modeled on the retired-workspaces state check).
  • Tests: removed zalouser from bundled-channel contract/guardrail suites; swapped example fixtures to surviving channels; added coverage for the validator warning, the doctor config strip, and the state cleanup.

Note: the plugin-sdk/zalouser compat facade in src/plugins/compat/registry.ts is intentionally left in place — it is an external Plugin-SDK re-export (kept for published third-party Lark/Zalo plugins) with its own deprecation window, independent of this bundled channel.

Verification

  • pnpm build — pass
  • pnpm tsgo:core + pnpm tsgo:core:test — pass
  • oxfmt --check + oxlint on changed files — clean
  • Targeted vitest (config validation, stale-plugin-config, doctor state check + wiring, channel-capabilities, doctor-config-flow, setup-helpers, and all touched bundled-channel contract/guardrail suites) — pass

Real behavior proof

  • Behavior addressed: Removing the bundled zalouser channel + ensuring existing channels.zalouser configs keep loading (downgraded to a warning) and are cleaned up by openclaw doctor --fix.
  • Real environment tested: local macOS source checkout, Node 24.18.0 / pnpm 11.2.2, pnpm build + Vitest.
  • Exact steps or command run after this patch: pnpm install; regenerate (config:channels:gen, config:docs:gen, plugins:inventory:gen, docs:map:gen, max-lines --prune); pnpm build; pnpm tsgo:core + pnpm tsgo:core:test; oxfmt --check + oxlint on changed files; targeted Vitest for the migration/doctor/contract suites.
  • Evidence after fix: build succeeds; typecheck/lint/format clean; new tests pass — config.plugin-validation (orphaned channels.zalouser → warning, not fatal), stale-plugin-config (doctor --fix strips the key + dependent refs), doctor-removed-zalouser-state-check (credential-dir cleanup), plus the updated bundled-channel contract/guardrail suites.
  • Observed result after fix: channels.zalouser no longer fails config load; openclaw doctor --fix removes the stale channel key, dependent modelByChannel/heartbeat refs, and leftover state/credentials/zalouser/ files. No remaining references to the plugin except intentional frozen CHANGELOG history and the deliberately-retained external plugin-sdk/zalouser compat facade.
  • What was not tested: a full live gateway run against real Zalo accounts (the channel is being removed); the full 88-shard suite (delegated to CI); migration of the newer plugin-SQLite credential KV (orphaned rows are inert — noted as a possible follow-up).

Copilot AI review requested due to automatic review settings July 21, 2026 05:05
@ken-kuro
ken-kuro requested a review from a team as a code owner July 21, 2026 05:05
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: zalouser Channel integration: zalouser app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes security Security documentation scripts Repository scripts commands Command implementations extensions: policy size: XL labels Jul 21, 2026
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jul 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/zalouser/npm-shrinkwrap.json
  • extensions/zalouser/package.json
  • pnpm-lock.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jul 21, 2026
@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph changes are blocked

OpenClaw does not accept dependency graph changes through PRs unless a repository admin or security explicitly authorizes the current head SHA. Dependency updates are generated internally by maintainers so external PRs cannot change the resolved graph.

Detected dependency graph changes:

  • extensions/zalouser/npm-shrinkwrap.json changed.
  • pnpm-lock.yaml changed.
  • extensions/zalouser/package.json changed dependencies, devDependencies, peerDependencies, peerDependenciesMeta, name, version.

Auto-scrub was not attempted because this PR changes package manifest dependency graph fields:

  • extensions/zalouser/package.json changed dependencies, devDependencies, peerDependencies, peerDependenciesMeta, name, version.

Dependency graph changes must be reviewed by security or handled by maintainers internally. Please remove lockfile changes manually if they are not needed.

To remove lockfile changes, restore them from the target branch:

git fetch origin
git checkout 'origin/main' -- 'extensions/zalouser/npm-shrinkwrap.json' 'pnpm-lock.yaml'
git commit -m 'chore: remove dependency lockfile change'
git push

If this PR intentionally needs a dependency graph change, ask a repository admin or member of @openclaw/openclaw-secops to comment:

/allow-dependencies-change

The action will approve the current head SHA (e01e523bdf16791dd4848a0e6e9f93e91cd8a459) when it reruns. A later push requires a fresh approval.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the bundled zalouser channel plugin and scrubs its references across core registries, tests, docs, and CI/gates. Adds config-validation + openclaw doctor --fix support so existing channels.zalouser configs don’t hard-fail after the channel id disappears, plus a doctor health check to clean up leftover credential state.

Changes:

  • Delete extensions/zalouser/** and remove all remaining references from tests, registries, docs, and CI boundary tooling.
  • Add REMOVED_BUNDLED_CHANNEL_IDS + isRemovedBundledChannelId and update config validation + doctor stale-config repair to warn/strip channels.zalouser and dependent references.
  • Add a doctor health check to detect/remove legacy state/credentials/zalouser/ remnants, and wire it into doctor health contributions.

Best-fix verdict: Acceptable and likely best (clean removal + migration + state cleanup, consistent with prior bundled-plugin retirement patterns).
Alternatives considered: (1) Keep the plugin but mark “unsupported” (would still ship risky code + dependency); (2) move it to external-only while keeping in-tree compatibility (still retains maintenance burden in core).
Code read: src/flows/doctor-removed-zalouser-state-check.ts, src/flows/doctor-removed-workspaces-state-check.ts, src/config/validation.ts, src/channels/ids.ts, src/commands/doctor/shared/stale-plugin-config.ts, src/plugin-sdk/core.ts, src/infra/outbound/outbound-session.test.ts, docs/cli/directory.md.
Remaining uncertainty: I did not re-audit every generator/regenerated artifact end-to-end (beyond the diff) to confirm there are zero lingering zalouser mentions outside the listed changes.

Reviewed changes

Copilot reviewed 148 out of 152 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ui/src/pages/plugins/presentation.ts Remove zalouser from plugin art slug allowlist.
test/vitest/vitest.extension-zalo-paths.mjs Drop extensions/zalouser from scoped Zalo extension test roots.
test/vitest-scoped-config.test.ts Update scoped vitest config expectations to exclude zalouser.
test/scripts/test-extension.test.ts Remove zalouser from extension test planning and Zalo lane coverage.
src/wizard/i18n/locales/zh-TW.ts Remove zalouser wizard locale strings and primer blurb.
src/wizard/i18n/locales/zh-CN.ts Remove zalouser wizard locale strings and primer blurb.
src/wizard/i18n/locales/en.ts Remove zalouser wizard locale strings and primer blurb.
src/security/audit-channel-readonly-resolution.test.ts Switch test fixture channel id from zalouser to zalo.
src/routing/resolve-route.test.ts Replace zalouser routing test case with zalo.
src/plugins/manifest-registry.test.ts Replace zalouser duplicate-manifest test fixtures with zalo.
src/plugins/contracts/plugin-sdk-runtime-api-guardrails.test.ts Remove zalouser from unguarded runtime API ids list.
src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.ts Remove zalouser from owner-name scan regex.
src/plugins/contracts/package-manifest.contract.test.ts Remove zalouser from manifest contract test matrix.
src/plugin-sdk/status-helpers.test.ts Replace zalouser fixture with zalo.
src/plugin-sdk/command-auth.test.ts Replace zalouser fixture with zalo in auth resolution tests.
src/logging/subsystem.ts Remove zalouser from channel subsystem prefixes.
src/infra/outbound/outbound-session.test.ts Replace outbound session route fixture from zalouser to telegram.
src/infra/outbound/outbound-session.test-helpers.ts Replace test-only outbound route resolver from zalouser to telegram.
src/gateway/test-helpers.channels.ts Remove stub gateway test channel entry for zalouser.
src/flows/doctor-removed-zalouser-state-check.ts Add doctor health check to detect/remove legacy credentials/zalouser state.
src/flows/doctor-removed-zalouser-state-check.test.ts Add coverage for new doctor health check detect/repair behavior.
src/flows/doctor-health-contributions.ts Wire new check into doctor legacy-state health contribution.
src/flows/doctor-core-checks.ts Register new doctor health check in core check registry.
src/flows/channel-setup.status.ts Remove zalouser channel setup primer mapping.
src/config/validation.ts Downgrade removed bundled channel ids (e.g. zalouser) to warnings instead of fatal config errors.
src/config/config.plugin-validation.test.ts Add test asserting removed bundled channel id warns instead of failing config load.
src/commands/doctor/shared/stale-plugin-config.ts Seed removed bundled channel ids so doctor can strip stale channels.<id> blocks without plugin evidence.
src/commands/doctor/shared/stale-plugin-config.test.ts Add test for stripping channels.zalouser plus dependent modelByChannel / heartbeat refs.
src/commands/doctor/shared/empty-allowlist-policy.test.ts Replace zalouser test fixture with zalo.
src/commands/doctor/channel-capabilities.test.ts Remove doctor channel capabilities test case for zalouser.
src/commands/doctor-config-flow.test.ts Remove zalouser mocked capabilities and repoint mutable-allowlist warning test to msteams.
src/cli/channel-auth.test.ts Replace zalouser login ambiguity fixture with zalo.
src/channels/turn/message-turn-guardrails.test.ts Remove extensions/zalouser file references from channel turn guardrail lists.
src/channels/plugins/setup-helpers.test.ts Replace zalouser config fixture with zalo.
src/channels/plugins/contracts/test-helpers/surface-contract-registry.ts Remove zalouser from contract registries and directory presence-only set.
src/channels/plugins/contracts/channel-import-guardrails.test.ts Remove zalouser from guarded extension lists.
src/channels/plugins/configured-state.test.ts Remove zalouser from configured-state metadata expectations.
src/channels/plugins/bundled.shape-guard.test.ts Remove extensions/zalouser doctor-path checks from bundled shape guard suite.
src/channels/ids.ts Add REMOVED_BUNDLED_CHANNEL_IDS + isRemovedBundledChannelId helper.
src/auto-reply/reply/inbound-context.test.ts Replace zalouser inbound context fixture with zalo.
security/opengrep/precise.yml Remove zalouser-specific GHSA opengrep rule.
scripts/lib/optional-bundled-clusters.mjs Remove zalouser from optional bundled clusters list.
scripts/lib/official-external-channel-catalog.json Remove @openclaw/zalouser entry from official external channel catalog.
scripts/generate-plugin-inventory-doc.mjs Remove zalouser from humanized plugin id map.
scripts/check-channel-agnostic-boundaries.mjs Remove zalouser from channel id allowlist used by boundary checker.
pnpm-lock.yaml Remove extensions/zalouser importer and zca-js transitive packages from lockfile.
package.json Remove dist include override for dist/extensions/zalouser/**.
extensions/zalouser/tsconfig.json Deleted: remove plugin subtree.
extensions/zalouser/test-api.ts Deleted: remove plugin subtree.
extensions/zalouser/src/zca-js-exports.d.ts Deleted: remove plugin subtree.
extensions/zalouser/src/zca-constants.ts Deleted: remove plugin subtree.
extensions/zalouser/src/zca-client.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/zalo-js.test-mocks.ts Deleted: remove plugin subtree.
extensions/zalouser/src/types.ts Deleted: remove plugin subtree.
extensions/zalouser/src/test-helpers.ts Deleted: remove plugin subtree.
extensions/zalouser/src/status-issues.ts Deleted: remove plugin subtree.
extensions/zalouser/src/status-issues.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/shared.ts Deleted: remove plugin subtree.
extensions/zalouser/src/setup-test-helpers.ts Deleted: remove plugin subtree.
extensions/zalouser/src/setup-core.ts Deleted: remove plugin subtree.
extensions/zalouser/src/session-state.ts Deleted: remove plugin subtree.
extensions/zalouser/src/session-scope.ts Deleted: remove plugin subtree.
extensions/zalouser/src/session-route.ts Deleted: remove plugin subtree.
extensions/zalouser/src/session-route.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/send-receipt.ts Deleted: remove plugin subtree.
extensions/zalouser/src/security-audit.ts Deleted: remove plugin subtree.
extensions/zalouser/src/security-audit.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/runtime.ts Deleted: remove plugin subtree.
extensions/zalouser/src/reaction.ts Deleted: remove plugin subtree.
extensions/zalouser/src/reaction.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/qr-temp-file.ts Deleted: remove plugin subtree.
extensions/zalouser/src/probe.ts Deleted: remove plugin subtree.
extensions/zalouser/src/probe.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/monitor.send.test-mocks.ts Deleted: remove plugin subtree.
extensions/zalouser/src/monitor.account-scope.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/message-sid.ts Deleted: remove plugin subtree.
extensions/zalouser/src/message-sid.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/ingress.test-support.ts Deleted: remove plugin subtree.
extensions/zalouser/src/group-policy.ts Deleted: remove plugin subtree.
extensions/zalouser/src/group-policy.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/doctor.ts Deleted: remove plugin subtree.
extensions/zalouser/src/doctor.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/doctor-contract.ts Deleted: remove plugin subtree.
extensions/zalouser/src/directory.ts Deleted: remove plugin subtree.
extensions/zalouser/src/config-schema.ts Deleted: remove plugin subtree.
extensions/zalouser/src/channel.setup.ts Deleted: remove plugin subtree.
extensions/zalouser/src/channel.setup.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/channel.runtime.ts Deleted: remove plugin subtree.
extensions/zalouser/src/channel.directory.test.ts Deleted: remove plugin subtree.
extensions/zalouser/src/channel-api.ts Deleted: remove plugin subtree.
extensions/zalouser/src/accounts.ts Deleted: remove plugin subtree.
extensions/zalouser/src/accounts.test-mocks.ts Deleted: remove plugin subtree.
extensions/zalouser/src/accounts.runtime.ts Deleted: remove plugin subtree.
extensions/zalouser/setup-plugin-api.ts Deleted: remove plugin subtree.
extensions/zalouser/setup-entry.ts Deleted: remove plugin subtree.
extensions/zalouser/secret-contract-api.ts Deleted: remove plugin subtree.
extensions/zalouser/runtime-api.ts Deleted: remove plugin subtree.
extensions/zalouser/README.md Deleted: remove plugin docs in extension subtree.
extensions/zalouser/package.json Deleted: remove plugin package definition.
extensions/zalouser/openclaw.plugin.json Deleted: remove plugin manifest.
extensions/zalouser/index.ts Deleted: remove plugin entrypoint.
extensions/zalouser/contract-api.ts Deleted: remove plugin contract exports.
extensions/zalouser/channel-plugin-api.ts Deleted: remove plugin contract exports.
extensions/zalouser/api.ts Deleted: remove plugin public API barrel.
extensions/policy/src/policy-state-tool-posture.ts Remove zalouser from implicit default account fields registry.
docs/tools/reactions.md Remove zalouser reactions tool notes.
docs/start/hubs.md Remove zalouser plugin hub link.
docs/plugins/zalouser.md Deleted: remove plugin doc page.
docs/plugins/reference/zalouser.md Deleted: remove plugin reference page.
docs/plugins/reference/clickclack.md Adjust surface line and add manual block markers (regen support).
docs/plugins/reference.md Update generated inventory count after removal.
docs/plugins/plugin-inventory.md Remove zalouser entry and update totals.
docs/gateway/security/index.md Remove zalouser dangerous config key mention.
docs/docs.json Remove channels/zalouser + plugins/zalouser from docs nav map.
docs/docs_map.md Remove docs-map entries for removed zalouser pages.
docs/concepts/multi-agent.md Remove zalouser from multi-account channel list.
docs/cli/directory.md Remove zalouser directory-id docs and update examples.
docs/channels/pairing.md Remove zalouser from supported pairing channel list.
docs/channels/index.md Remove zalouser from channels index.
docs/.generated/config-baseline.sha256 Regenerated config baseline hash after removal.
docs/.generated/config-baseline.counts.json Regenerated baseline counts after removal.
config/max-lines-baseline.txt Remove extensions/zalouser from max-lines baseline.
.github/workflows/codeql-critical-quality.yml Remove extensions/zalouser from CodeQL paths and routing switch.
.github/labeler.yml Remove channel: zalouser labeler rules.
.github/codeql/codeql-channel-runtime-boundary-critical-quality.yml Remove extensions/zalouser from CodeQL boundary config.
Files not reviewed (3)
  • extensions/browser/chrome-extension/modules/copilot-runtime.js: Generated file
  • extensions/zalouser/npm-shrinkwrap.json: Generated file
  • pnpm-lock.yaml: Generated file

Comment on lines +32 to +34
const entries = await readdir(target);
return entries.some((entry) => entry === "credentials.json" || entry.startsWith("credentials-"));
}
Retire the unofficial zca-js Zalo personal-account (web-spoof) channel.
Zalo automation via zca-js carries account-ban risk and has no official
vendor backing; the official path is the external
@zalo-platforms/openclaw-zaloclawbot plugin.

- Delete extensions/zalouser and its docs; purge every registry, catalog,
  labeler, CodeQL, Opengrep, i18n, and generated-metadata reference.
- Config migration: an orphaned channels.zalouser now loads with a warning
  instead of failing config load, and `openclaw doctor --fix` strips the
  stale key plus dependent modelByChannel/heartbeat refs
  (REMOVED_BUNDLED_CHANNEL_IDS in src/channels/ids.ts).
- Add core/doctor/removed-zalouser-state to clean leftover
  state/credentials/zalouser credential files.

The plugin-sdk/zalouser compat facade is intentionally retained for
external published plugins that import it.
@ken-kuro
ken-kuro force-pushed the refactor/remove-zalouser branch from 2fd2440 to e01e523 Compare July 22, 2026 03:59
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jul 22, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Aug 5, 2026
@clawsweeper clawsweeper Bot added clawsweeper-recovery-stuck rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 6, 2026
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 7, 2026
@clawsweeper

clawsweeper Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 6, 2026, 7:39 PM ET / 23:39 UTC.

ClawSweeper review

What this changes

Removes the bundled Zalo Personal channel and adds config, Doctor, documentation, registry, and state-cleanup changes for existing operators.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 11 items remain

Keep open: current main still bundles and registers Zalo Personal, but this retirement patch leaves its current SQLite-held credentials behind and can over-delete the legacy credential directory.

Priority: P1
Reviewed head: e01e523bdf16791dd4848a0e6e9f93e91cd8a459
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The broad removal is thoughtfully scoped, but current persisted credentials remain and the cleanup guard can delete unrelated files.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The PR describes local checks but provides no inspectable after-fix transcript or artifact proving both legacy and SQLite credential cleanup; redact credential values in any supplied proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The PR describes local checks but provides no inspectable after-fix transcript or artifact proving both legacy and SQLite credential cleanup; redact credential values in any supplied proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current main still ships the channel: The bundled entry registers the zalouser channel and tool; this PR’s central removal is not already implemented on main.
Current credential owner: Zalo Personal saves credentials through its plugin-state keyed store, rather than only in the legacy credentials directory.
SQLite persistence contract: The plugin-state store persists rows in the shared OpenClaw state database and exposes namespace clearing, so a Doctor migration can remove the retired plugin’s current credentials precisely.
Findings 2 actionable findings [P1] Clear the retired channel’s SQLite credentials
[P2] Require exact credential files before deleting the directory
Security Needs attention Retained Zalo credentials after retirement: Current Zalo Personal credentials are persisted under the zalouser plugin-state namespace; the proposed Doctor check only deletes legacy files, leaving credentials in the shared state database.

How this fits together

Bundled channel metadata feeds configuration validation and gateway plugin discovery. Doctor is the migration owner that removes retired channel configuration and credential state before the next normal startup.

flowchart LR
A[Existing Zalo Personal setup] --> B[Config validation]
B --> C[Gateway plugin discovery]
A --> D[Doctor repair]
D --> E[Legacy files and SQLite state]
E --> F[Clean retired-channel setup]
Loading

Decision needed

Question Recommendation
Should OpenClaw retire the shipped Zalo Personal channel now, contingent on complete credential cleanup, or keep the bundled channel pending a maintainer-owned migration plan? Sponsor a complete retirement: Finish precise SQLite and legacy-file cleanup, prove the upgrade path, then review the removal as an intentional breaking change.

Why: Removing a shipped channel is a product and upgrade decision; the security label and incomplete persisted-credential migration make it unsafe to infer that choice from the branch alone.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The PR describes local checks but provides no inspectable after-fix transcript or artifact proving both legacy and SQLite credential cleanup; redact credential values in any supplied proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Clear the retired channel’s SQLite credentials (P1) - The new Doctor check only removes state/credentials/zalouser, but current Zalo Personal saves its cookie-bearing credentials in the shared plugin_state_entries store. After this change, doctor --fix reports cleanup while those credentials remain; clear the exact zalouser/credentials namespace and cover that upgrade state.
  • Require exact credential files before deleting the directory (P2) - credentials-* matches unrelated files such as credentials-notes.md, and the check does not require the matched entry to be a regular file. One match then recursively removes the entire directory; mirror the existing .json and regular-file validation before offering deletion.
  • Resolve security concern: Retained Zalo credentials after retirement - Current Zalo Personal credentials are persisted under the zalouser plugin-state namespace; the proposed Doctor check only deletes legacy files, leaving credentials in the shared state database.
  • Resolve merge risk (P1) - openclaw doctor --fix would leave the active Zalo Personal credential rows in shared SQLite despite describing the channel as retired.
  • Resolve merge risk (P1) - A file named credentials-notes.md or a non-file credentials.json under the legacy directory can trigger recursive deletion of that whole directory.
  • Resolve merge risk (P1) - The proposed removal is a breaking retirement of a currently bundled, released channel and needs explicit maintainer sponsorship.
  • Improve patch quality - Clear and test the zalouser shared plugin-state credential namespace.
  • Improve patch quality - Restrict the legacy directory fingerprint to regular, exact credential JSON files.
  • Improve patch quality - Add a redacted Doctor transcript showing config plus both credential stores are cleaned.

Findings

  • [P1] Clear the retired channel’s SQLite credentials — src/flows/doctor-core-checks.ts:1135
  • [P2] Require exact credential files before deleting the directory — src/flows/doctor-removed-zalouser-state-check.ts:33
  • [high] Retained Zalo credentials after retirement — extensions/zalouser/src/session-state.ts:104
Agent review details

Security

Needs attention: The retirement migration leaves current cookie-bearing credentials in shared SQLite after its advertised cleanup.

Review metrics

Metric Value Why it matters
Retired configuration surface 1 channel id retired channels.zalouser changes from a valid bundled-channel configuration to a Doctor-migrated deprecated configuration, so upgrade behavior must be proven.
Credential stores 2 stores: legacy files and shared SQLite plugin state The migration currently covers only the legacy directory while current credentials are stored in plugin-state SQLite.

Stored data model

Persistent data-model change detected: migration/backfill/repair: extensions/zalouser/doctor-contract-api.test.ts, migration/backfill/repair: extensions/zalouser/doctor-contract-api.ts, migration/backfill/repair: src/channels/plugins/bundled.shape-guard.test.ts, migration/backfill/repair: src/commands/doctor-config-flow.test.ts, migration/backfill/repair: src/commands/doctor/channel-capabilities.test.ts, migration/backfill/repair: src/commands/doctor/shared/stale-plugin-config.test.ts, and 14 more. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete credential migration (recommended)
    Clear the retired plugin’s shared SQLite credential namespace and tighten legacy-file detection before merging.
  2. Pause the removal
    Close or defer the branch if maintainers do not want to retire this shipped channel with a supported upgrade path.

Technical review

Best possible solution:

If maintainers sponsor the retirement, make Doctor clear only the zalouser credentials namespace in shared plugin state, retain unrelated session history, and restrict legacy-file removal to the exact regular credential-file contract with end-to-end migration proof.

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

Yes, from source: seed a zalouser credentials plugin-state entry, run the proposed Doctor repair, and verify that the shared SQLite row is removed; the proposed check only scans the legacy directory.

Is this the best way to solve the issue?

No: retirement plus Doctor migration is the right owner boundary, but the current implementation does not clean the credential store used by main and its legacy-file fingerprint is broader than the original contract.

Full review comments:

  • [P1] Clear the retired channel’s SQLite credentials — src/flows/doctor-core-checks.ts:1135
    The new Doctor check only removes state/credentials/zalouser, but current Zalo Personal saves its cookie-bearing credentials in the shared plugin_state_entries store. After this change, doctor --fix reports cleanup while those credentials remain; clear the exact zalouser/credentials namespace and cover that upgrade state.
    Confidence: 0.98
  • [P2] Require exact credential files before deleting the directory — src/flows/doctor-removed-zalouser-state-check.ts:33
    credentials-* matches unrelated files such as credentials-notes.md, and the check does not require the matched entry to be a regular file. One match then recursively removes the entire directory; mirror the existing .json and regular-file validation before offering deletion.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7c9596b0077c.

Labels

Label justifications:

  • P1: Merging the current retirement path can retain live account credentials after users run the advertised cleanup.
  • merge-risk: 🚨 compatibility: Existing channels.zalouser setups require a breaking configuration and state migration.
  • merge-risk: 🚨 security-boundary: The patch changes deletion of credential-bearing state while leaving the current SQLite credential store unaddressed.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR describes local checks but provides no inspectable after-fix transcript or artifact proving both legacy and SQLite credential cleanup; redact credential values in any supplied proof. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [high] Retained Zalo credentials after retirement — extensions/zalouser/src/session-state.ts:104
    Current Zalo Personal credentials are persisted under the zalouser plugin-state namespace; the proposed Doctor check only deletes legacy files, leaving credentials in the shared state database.
    Confidence: 0.98

What I checked:

  • Current main still ships the channel: The bundled entry registers the zalouser channel and tool; this PR’s central removal is not already implemented on main. (extensions/zalouser/index.ts:19, 7c9596b0077c)
  • Current credential owner: Zalo Personal saves credentials through its plugin-state keyed store, rather than only in the legacy credentials directory. (extensions/zalouser/src/session-state.ts:104, 7c9596b0077c)
  • SQLite persistence contract: The plugin-state store persists rows in the shared OpenClaw state database and exposes namespace clearing, so a Doctor migration can remove the retired plugin’s current credentials precisely. (src/plugin-state/plugin-state-store.sqlite.ts:371, 7c9596b0077c)
  • Exact legacy-file contract: The existing plugin migration accepts only regular credentials.json or credentials-<encoded-profile>.json files; the proposed checker instead accepts any credentials-* name before removing the whole directory. (extensions/zalouser/doctor-contract-api.ts:60, 7c9596b0077c)
  • History signal: Current-file blame attributes the credential-store lines to the checked-out history boundary; deeper feature provenance could not be completed because the partial clone’s promisor remote was unreachable. (extensions/zalouser/src/session-state.ts:104, d73eb23b290f)
  • Unresolved persisted-state scope: The PR body expressly says migration of the newer plugin-SQLite credential KV was not tested and leaves orphaned rows as a possible follow-up. (e01e523bdf16)

Likely related people:

  • Vincent Koc: Current-file blame maps the Zalo Personal credential-store code to the available history boundary commit. (role: recent credential-state contributor; confidence: low; commits: d73eb23b290f; files: extensions/zalouser/src/session-state.ts, extensions/zalouser/index.ts)
  • steipete: Authored the merged Workspaces retirement referenced by this PR, including the related Doctor-cleanup pattern. (role: author of adjacent bundled-plugin retirement precedent; confidence: medium; commits: a068d38b663e; files: src/flows/doctor-removed-workspaces-state-check.ts)

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.

@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Aug 7, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Aug 28, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing due to inactivity.
If you believe this PR should be revived, post in #clawtributors on Discord to talk to a maintainer.
That channel is the escape hatch for high-quality PRs that get auto-closed.

@openclaw-barnacle openclaw-barnacle Bot closed this Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui channel: zalouser Channel integration: zalouser cli CLI command changes commands Command implementations dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation extensions: policy gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts security Security documentation size: XL stale Marked as stale due to inactivity status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants