Skip to content

fix(zalo): match native bot identity fields#99274

Merged
RomneyDa merged 1 commit into
mainfrom
fix/zalo-bot-info-contract
Jul 3, 2026
Merged

fix(zalo): match native bot identity fields#99274
RomneyDa merged 1 commit into
mainfrom
fix/zalo-bot-info-contract

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • align ZaloBotInfo with the official Zalo Bot Platform getMe response
  • use account_name for the gateway startup label
  • cover the documented id, account_name, account_type, and can_join_groups fields

Official contract: https://bot.zapps.me/docs/apis/getMe/

Stack

Tests

  • node scripts/run-vitest.mjs extensions/zalo/src/api.test.ts
  • pnpm format:check extensions/zalo/src/api.ts extensions/zalo/src/api.test.ts extensions/zalo/src/channel.runtime.ts
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode branch --stream-engine-output (clean, no actionable findings)

@openclaw-barnacle openclaw-barnacle Bot added channel: zalo Channel integration: zalo size: XS maintainer Maintainer-authored PR labels Jul 3, 2026
@clawsweeper

clawsweeper Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 8:55 PM ET / 00:55 UTC.

Summary
Updates the Zalo Bot API getMe type and gateway startup label to use native account_name, account_type, and can_join_groups fields, with focused API coverage.

PR surface: Source +1, Tests +22. Total +23 across 3 files.

Reproducibility: yes. Current main reads probe.bot?.name for the startup label while the official getMe sample returns account_name and no name; a mock native response reproduces the missing-label path by source inspection.

Review metrics: none identified.

Root-cause cluster
Relationship: canonical
Canonical: #99274
Summary: This PR is the canonical item for the native Zalo getMe identity-field fix; the related API-root PR is a stacked adjacent change.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] The CI rollup had QA Smoke marked failed and two compact checks still pending during this read-only review, so final merge readiness still depends on the normal GitHub check gate.

Maintainer options:

  1. Decide the mitigation before merge
    Land this focused Zalo plugin fix after ordinary maintainer and CI gates, keeping the native getMe fields as the canonical runtime shape.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No automated repair is appropriate; this protected maintainer PR has no source finding and should continue through normal maintainer and CI handling.

Security
Cleared: No concrete security or supply-chain regression was found; the diff only changes Zalo plugin types, startup label lookup, and a focused unit test.

Review details

Best possible solution:

Land this focused Zalo plugin fix after ordinary maintainer and CI gates, keeping the native getMe fields as the canonical runtime shape.

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

Yes. Current main reads probe.bot?.name for the startup label while the official getMe sample returns account_name and no name; a mock native response reproduces the missing-label path by source inspection.

Is this the best way to solve the issue?

Yes. Updating the Zalo plugin type and the one startup-label consumer is the narrowest maintainable fix; adding a legacy name normalization shim would preserve a non-native internal shape without a shipped API need.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9238d9aeae8d.

Label changes

Label justifications:

  • P2: This is a bounded Zalo channel bug fix with limited blast radius and clear source/API-contract evidence.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external-contributor proof gate does not apply to this maintainer-labeled MEMBER PR; the PR body lists focused local validation as supplemental evidence.
Evidence reviewed

PR surface:

Source +1, Tests +22. Total +23 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 4 3 +1
Tests 1 22 0 +22
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 26 3 +23

What I checked:

  • Repository policy read: Root AGENTS.md and extensions/AGENTS.md were read fully; the maintainer label prevents cleanup closing, and the extension policy supports keeping this change inside the Zalo plugin boundary. (AGENTS.md:31, 9238d9aeae8d)
  • Current main mismatch: Current main types ZaloBotInfo as id, name, and optional avatar, which does not match the official getMe sample response fields. (extensions/zalo/src/api.ts:22, 9238d9aeae8d)
  • Current startup label path: Current main builds the gateway startup label from probe.bot?.name, so a native getMe response with only account_name cannot populate that label. (extensions/zalo/src/channel.runtime.ts:56, 9238d9aeae8d)
  • PR implementation: The PR changes ZaloBotInfo to the native account fields, switches the startup label to account_name, and adds a focused getMe response test for the documented shape. (extensions/zalo/src/api.ts:22, 91342b007dbc)
  • Official Zalo contract: The official Zalo Bot Platform getMe page returns POST JSON with result.id, result.account_name, result.account_type, and result.can_join_groups.
  • Related stacked PR: The related Zalo API-root PR is explicitly stacked on this PR and says it no longer changes ZaloBotInfo or gateway identity labeling, so it is adjacent rather than a replacement.

Likely related people:

  • steipete: Commit 5abe3c2 added the Zalo plugin and Bot API client path that this PR updates. (role: introduced behavior; confidence: medium; commits: 5abe3c21456e; files: extensions/zalo/src/api.ts, extensions/zalo/src/channel.runtime.ts, docs/channels/zalo.md)
  • darkamenosa: Merged Zalo lifecycle and API type work in PR history around provider startup and API behavior. (role: feature history contributor; confidence: medium; commits: 67b2e81360c4, 608133b4251c; files: extensions/zalo/src/api.ts, extensions/zalo/src/channel.runtime.ts)
  • hugenshen: Recently maintained the Zalo API client and tests for bounded Bot API JSON response reads. (role: recent area contributor; confidence: medium; commits: 38ddcef78f07, 798fed7e9c1d; files: extensions/zalo/src/api.ts, extensions/zalo/src/api.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • 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.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jul 3, 2026
@RomneyDa
RomneyDa merged commit 381b44a into main Jul 3, 2026
187 of 195 checks passed
@RomneyDa
RomneyDa deleted the fix/zalo-bot-info-contract branch July 3, 2026 01:06
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: zalo Channel integration: zalo maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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