Skip to content

fix: preserve multiline Slack, Feishu, and Zalo command arguments - #190730

Merged
roboclaw-bot merged 1 commit into
mainfrom
loop/contributor-pr-185267
Nov 2, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
loop/contributor-pr-185267

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: Slack, Feishu, and Zalo Personal flatten multiline /btw questions and /loop prompts after removing bot mentions.

Supersedes #185267, thanks @masatohoshino. Fixes #185266.

User Impact

Pasted stack traces, blank lines, and indentation now reach command dispatch intact. Single-line commands retain their existing whitespace normalization. There are no configuration changes or migration steps.

Why This Change Was Made

These three channel adapters collapse command whitespace before core can preserve it. Keep multiline slash arguments in the existing mention-removal owners, following core's multiline contract. Non-command text still collapses whitespace.

Simplification removes Zalo's redundant conditional around the remaining tail slice. Production code is +9/−10 (net −1); no new helper, SDK surface, or state. Regression tests grow by 61 lines, allocated specifically to the three distinct inbound boundaries.

Evidence

On current main 71becfa19f32a86eb3e62bccf713f5be7107884f, six multiline cases failed with flattened command text: two each for Slack, Feishu, and Zalo Personal. Single-line controls passed. After the fix, all three named test files pass:

Named file Main result Fixed result Fixed local wall time CI test time
extensions/slack/src/monitor/message-handler/prepare.commands.test.ts 2 failed / 1 passed 3 passed 10.09 s 0.248 s
extensions/feishu/src/bot.commands.test.ts 2 failed / 4 passed 6 passed 11.07 s 0.925 s
extensions/zalouser/src/zalo-quote-metadata.test.ts 2 failed / 12 passed 14 passed 10.72 s 1.541 s

Slack exercises real message preparation and inspects CommandBody / BodyForCommands; Feishu drives the inbound handler and checks those fields plus CommandTurn.body; Zalo drives a synthetic listener and the production inbound normalizer, checking the commandContent consumed by its monitor. Slack and Zalo also check that repeated spaces in a single-line question still collapse.

Affected sibling tests: Slack message-handler.debounce-policy.test.ts; Feishu sequential-key.test.ts and monitor.message-handler.debounce-policy.test.ts; Zalo monitor.group-gating.test.ts: 31 passed, 28.16 s total.

Touched-file oxfmt, syntax-only oxlint through the repository wrapper, and git diff --check pass. Exact-head PR CI run 41365204282 passed, including type checking, lint, ratchets, source contracts, channel test bundles, security, and openclaw/ci-gate. CI test times above sum each file's reported case times in the extension bundle. No local broad suite, packaging, staging, container, or browser run was used on the production Team host.

Local autoreview (Codex, P0–P2) reviewed the full replacement against 71becfa19f32a86eb3e62bccf713f5be7107884f: scoped-clean, no actionable findings. Hosted ClawSweeper also reviewed this exact head and reported no findings or before-merge blockers. The author simplification pass retained the existing three transport owners and removed the redundant Zalo condition.

Limits: no live Slack, Feishu, Zalo, or hosted-model calls; the tests verify text at the production inbound boundary before command handlers. The contributor branch was read with GitHub view/diff only and was never checked out or executed. This is an independently implemented replacement with Masato Hoshino credited in the commit.

Keep line breaks and indentation after channel-specific mention removal.
Retain existing single-line whitespace normalization.

Co-authored-by: Masato Hoshino <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 2, 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 channel: slack Channel integration: slack channel: zalouser Channel integration: zalouser channel: feishu Channel integration: feishu size: S labels Nov 2, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 2, 2026 00:04
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 2, 2026
@clawsweeper

clawsweeper Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Preserves multiline slash-command arguments after mention removal in Slack, Feishu, and Zalo Personal while retaining single-line whitespace normalization.

Example: Send the Slack bot &lt;@B1> /btw why?\n first frame\n\n second frame.

  • Before: Command dispatch receives /btw why? first frame second frame.
  • After: Command dispatch receives /btw why?\n first frame\n\n second frame.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The focused repair and boundary regressions are convincing, but supplied verification does not satisfy the repository's real-channel proof requirement.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Pasted traces, code, and lists in multiline slash commands reach dispatch flattened onto one line.
Reason: Restores documented command behavior through existing channel boundaries; the collaborator-authored direction needs no additional product decision.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR repairs command-text corruption still present on main, and no introduced correctness defect was found.

Priority: P2
Reviewed head: b164f72ca3da77a716935f4fcd4e2e93543ec252

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Supply redacted real-channel Gateway evidence with a real agent/model showing preserved multiline arguments for Slack, Feishu, and bot-mentioned Zalo Personal commands.
Agent review details

How this fits together

Channel adapters remove transport-specific mentions and construct command text that core dispatch consumes as a side question or recurring prompt.

flowchart LR
  A[Incoming channel message] --> B[Transport mention removal]
  B --> C[Command text]
  C --> D[Core command dispatch]
  D --> E[Side question or recurring prompt]
Loading

Technical review

Best possible solution:

Keep mention removal in the existing channel owners and preserve multiline command text before it reaches core dispatch.

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

Current-main source deterministically flattens multiline input before command dispatch in all three adapters, and the supplied regression results report the corresponding failures; no target code was executed during this review.

Is this the best way to solve the issue?

This is the smallest complete repair: preserve multiline arguments in the three existing transport owners, retain single-line behavior, and test their distinct inbound boundaries without adding another abstraction.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 71becfa19f32.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit b86bc9d adds extensions/feishu/src/bot-content.ts:296 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b86bc9de95d0; files: extensions/feishu/src/bot-content.ts)

PR surface

Source -1, Tests +61, Other +2. Total +62 across 7 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 3 9 10 -1
Tests 3 93 32 +61
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 7 104 42 +62

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #185266
Summary: This PR replaces the earlier channel-local repair; the merged core repair covers a separate normalization boundary.

Members:

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

Labels

Label changes:

  • add P2: Multiline arguments are corrupted across three channels, while commands and ordinary messaging remain available.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Multiline arguments are corrupted across three channels, while commands and ordinary messaging remain available.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Attach real-channel Gateway captures showing preserved multiline command arguments reaching a real agent/model.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 1, 2026, 7:09 PM ET / November 2, 2026, 00:09 UTC.

@roboclaw-bot
roboclaw-bot merged commit 2bd7edf into main Nov 2, 2026
210 checks passed
@roboclaw-bot
roboclaw-bot deleted the loop/contributor-pr-185267 branch November 2, 2026 00:15
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 2, 2026
…enclaw#190730)

Keep line breaks and indentation after channel-specific mention removal.
Retain existing single-line whitespace normalization.

Co-authored-by: Masato Hoshino <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 17, 2026
…90730)

Keep line breaks and indentation after channel-specific mention removal.
Retain existing single-line whitespace normalization.

Release adaptation: extend the maintenance-line Feishu bot.test.ts command
admission coverage rather than restoring the newer bot.commands.test.ts harness.
Production changes are the original three parser hunks.

Companion dispositions: #190975 concerns the independent Zalo group cache
clock test; #192608 concerns attachment handoff, not text command parsing;
#197656 removes main-only retired test allocations. All are not applicable
to this bounded backport. No later #190730 mention through bd692e9.

(cherry picked from commit 2bd7edf)

Co-authored-by: Masato Hoshino <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: feishu Channel integration: feishu channel: slack Channel integration: slack channel: zalouser Channel integration: zalouser P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S 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.

Slack, Feishu and Zalo Personal join the lines of a multi-line /btw or /loop into one line

1 participant