Repository navigation
fix: reject message tables without a caption instead of silently dropping them - #196367
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesReject presentation tables without a non-empty caption before any message content is sent. Example: Send “Summary” with a table containing headers [“Name”], rows [[“Alpha”]], and no caption.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR provides a focused, proven repair for silent table omission, with no actionable findings; exact-head CI is still running. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCLI and message-tool arguments enter the shared message-action runner, which validates presentation input before routing, normalization, channel rendering, and transport delivery. flowchart LR
A[CLI or message tool] --> B[Parse presentation]
B --> C[Require table captions]
C --> D[Route and decorate]
D --> E[Normalize presentation]
E --> F[Channel rendering]
F --> G[Transport delivery]
Technical reviewBest possible solution: Keep caption validation in the existing parameter owner before normalization or delivery can discard authored table content. Do we have a high-confidence way to reproduce the issue? Current-main source establishes silent omission with surviving text, matching judeKim’s official-release report and obviyus’s supplied before/after Gateway trace; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete repair for the reported missing-caption case: it reuses existing coercion and required-parameter errors, preserves atomic normalization, and validates before cross-context decoration can erase invalid input. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 895091c98787. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +19, Tests +10, Docs +2. Total +31 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 18, 2026, 8:15 PM ET / November 19, 2026, 01:15 UTC (Revision 3). |
|
Added shipped CLI behavior proof to the PR body at unchanged head @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
…ng required-param error - Move the check to the message-action param owner so every message action rejects before any part is sent, reuse the ToolInputError '<label> required' message, fold the regression into one test, and drop the test-lines allocation.
|
Observed proof (source tier: |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thanks @indra622 for the fix and @judeKim for the report. This is merged in e20e84f: a presentation table without a caption no longer vanishes while the message tool reports "sent". The message is now checked before anything is posted, and the agent gets the tool's existing " |
…ping them (openclaw#196367) Root cause: `src/interactive/payload.ts:738` (`normalizeTableBlock`) drops a table without a caption by design (the presentation docs make table normalization atomic and the caption required, and Slack's `data_table` requires `caption`), but nothing in the message action path checked the caption before that drop, so the rest of the message was sent and the tool reported `deliveryStatus: "sent"` without the table. Fixes openclaw#196312 ## What Problem This Solves When an agent sends a Slack message through the `message` tool with a table block that has no `caption`, the table vanishes. The text around it is posted, and the tool tells the agent the message was sent, so the agent reports success while the data it meant to share is missing. ## User Impact A table without a caption is now rejected before anything is posted, with the same "`<field> required`" tool error the message tool already uses for missing inputs (`presentation.blocks[].caption required`). The agent sees the error and can retry with a caption instead of reporting a send that lost its table. Tables with a caption are unchanged. ## Why This Change Was Made The caption is part of the documented table contract, and Slack's native data table block requires it ([Slack data table block](https://docs.slack.dev/reference/block-kit/blocks/data-table-block): `caption` is Required), so rendering a captionless table would mean inventing a heading, which the docs rule out ("drops the table block instead of truncating or repairing its data"). The check now lives with the other message-action parameter parsing, right after the `presentation` JSON is parsed, so every message action rejects the table before any part is sent. It reuses the existing required-parameter error instead of adding new wording. This adopts @indra622's PR: their commit added the check inside the send payload builder with a new error message. On top of it, the check moved to the parameter owner, uses the existing error, and the regression is folded into one test; the test-lines allocation file is dropped. ## Evidence - Real Gateway from source (`ocx src`) with the bundled Slack plugin in Socket Mode against a local Slack Web API and Socket Mode fixture; a deterministic model calls the `message` tool with "Contract summary", a text block and a two-row table, first without a caption, then with one. - main `b13146de12b7`, no caption: Slack receives `chat.postMessage` with only two `section` blocks and no table, and the tool returns `deliveryStatus="sent"`, `payloadOutcomes[0].status="sent"`. - this PR `a8aa768ead2b`, no caption: no Slack call; the tool returns `error="presentation.blocks[].caption required"`. - control, with caption, both refs: Slack receives `section`, `section`, `data_table` (caption "Expiring contracts", 3 rows), `deliveryStatus="sent"`. - Observed proof lines: openclaw#196367 (comment) - `src/infra/outbound/message-action-send.validation.test.ts`: the new case fails on main (the send resolves instead of rejecting) and passes here (18/18). Neighbouring send, params and runner suites pass (102 tests). Thanks @judeKim for the clear report with both receipts, and @indra622 for the original fix. Merge danger: two-way door. Only adds input validation; a revert restores the old silent drop. Blast radius: message tool and `openclaw message` calls that include a table block without a caption now get an error instead of a partial send; tables with captions and all other blocks are unchanged. Co-authored-by: Ayaan Zaidi <[email protected]>
…ping them (#196367) Root cause: `src/interactive/payload.ts:738` (`normalizeTableBlock`) drops a table without a caption by design (the presentation docs make table normalization atomic and the caption required, and Slack's `data_table` requires `caption`), but nothing in the message action path checked the caption before that drop, so the rest of the message was sent and the tool reported `deliveryStatus: "sent"` without the table. Fixes #196312 ## What Problem This Solves When an agent sends a Slack message through the `message` tool with a table block that has no `caption`, the table vanishes. The text around it is posted, and the tool tells the agent the message was sent, so the agent reports success while the data it meant to share is missing. ## User Impact A table without a caption is now rejected before anything is posted, with the same "`<field> required`" tool error the message tool already uses for missing inputs (`presentation.blocks[].caption required`). The agent sees the error and can retry with a caption instead of reporting a send that lost its table. Tables with a caption are unchanged. ## Why This Change Was Made The caption is part of the documented table contract, and Slack's native data table block requires it ([Slack data table block](https://docs.slack.dev/reference/block-kit/blocks/data-table-block): `caption` is Required), so rendering a captionless table would mean inventing a heading, which the docs rule out ("drops the table block instead of truncating or repairing its data"). The check now lives with the other message-action parameter parsing, right after the `presentation` JSON is parsed, so every message action rejects the table before any part is sent. It reuses the existing required-parameter error instead of adding new wording. This adopts @indra622's PR: their commit added the check inside the send payload builder with a new error message. On top of it, the check moved to the parameter owner, uses the existing error, and the regression is folded into one test; the test-lines allocation file is dropped. ## Evidence - Real Gateway from source (`ocx src`) with the bundled Slack plugin in Socket Mode against a local Slack Web API and Socket Mode fixture; a deterministic model calls the `message` tool with "Contract summary", a text block and a two-row table, first without a caption, then with one. - main `0b18f610d325`, no caption: Slack receives `chat.postMessage` with only two `section` blocks and no table, and the tool returns `deliveryStatus="sent"`, `payloadOutcomes[0].status="sent"`. - this PR `a8aa768ead2b`, no caption: no Slack call; the tool returns `error="presentation.blocks[].caption required"`. - control, with caption, both refs: Slack receives `section`, `section`, `data_table` (caption "Expiring contracts", 3 rows), `deliveryStatus="sent"`. - Observed proof lines: #196367 (comment) - `src/infra/outbound/message-action-send.validation.test.ts`: the new case fails on main (the send resolves instead of rejecting) and passes here (18/18). Neighbouring send, params and runner suites pass (102 tests). Thanks @judeKim for the clear report with both receipts, and @indra622 for the original fix. Merge danger: two-way door. Only adds input validation; a revert restores the old silent drop. Blast radius: message tool and `openclaw message` calls that include a table block without a caption now get an error instead of a partial send; tables with captions and all other blocks are unchanged. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit e20e84f) Co-authored-by: RomneyDa <[email protected]>
…ping them (openclaw#196367) Root cause: `src/interactive/payload.ts:738` (`normalizeTableBlock`) drops a table without a caption by design (the presentation docs make table normalization atomic and the caption required, and Slack's `data_table` requires `caption`), but nothing in the message action path checked the caption before that drop, so the rest of the message was sent and the tool reported `deliveryStatus: "sent"` without the table. Fixes openclaw#196312 ## What Problem This Solves When an agent sends a Slack message through the `message` tool with a table block that has no `caption`, the table vanishes. The text around it is posted, and the tool tells the agent the message was sent, so the agent reports success while the data it meant to share is missing. ## User Impact A table without a caption is now rejected before anything is posted, with the same "`<field> required`" tool error the message tool already uses for missing inputs (`presentation.blocks[].caption required`). The agent sees the error and can retry with a caption instead of reporting a send that lost its table. Tables with a caption are unchanged. ## Why This Change Was Made The caption is part of the documented table contract, and Slack's native data table block requires it ([Slack data table block](https://docs.slack.dev/reference/block-kit/blocks/data-table-block): `caption` is Required), so rendering a captionless table would mean inventing a heading, which the docs rule out ("drops the table block instead of truncating or repairing its data"). The check now lives with the other message-action parameter parsing, right after the `presentation` JSON is parsed, so every message action rejects the table before any part is sent. It reuses the existing required-parameter error instead of adding new wording. This adopts @indra622's PR: their commit added the check inside the send payload builder with a new error message. On top of it, the check moved to the parameter owner, uses the existing error, and the regression is folded into one test; the test-lines allocation file is dropped. ## Evidence - Real Gateway from source (`ocx src`) with the bundled Slack plugin in Socket Mode against a local Slack Web API and Socket Mode fixture; a deterministic model calls the `message` tool with "Contract summary", a text block and a two-row table, first without a caption, then with one. - main `0b18f610d325`, no caption: Slack receives `chat.postMessage` with only two `section` blocks and no table, and the tool returns `deliveryStatus="sent"`, `payloadOutcomes[0].status="sent"`. - this PR `a8aa768ead2b`, no caption: no Slack call; the tool returns `error="presentation.blocks[].caption required"`. - control, with caption, both refs: Slack receives `section`, `section`, `data_table` (caption "Expiring contracts", 3 rows), `deliveryStatus="sent"`. - Observed proof lines: openclaw#196367 (comment) - `src/infra/outbound/message-action-send.validation.test.ts`: the new case fails on main (the send resolves instead of rejecting) and passes here (18/18). Neighbouring send, params and runner suites pass (102 tests). Thanks @judeKim for the clear report with both receipts, and @indra622 for the original fix. Merge danger: two-way door. Only adds input validation; a revert restores the old silent drop. Blast radius: message tool and `openclaw message` calls that include a table block without a caption now get an error instead of a partial send; tables with captions and all other blocks are unchanged. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit e20e84f) Release adaptation: Exact caption validation at message-action ingress before normalized tables can silently disappear. Co-authored-by: RomneyDa <[email protected]>
…ping them (#196367) Baseline adaptation: preserve the branch outbound fixtures and assert no send at its real dispatch boundary. Production checks and docs match upstream. (cherry picked from commit e20e84f) Co-authored-by: Ayaan Zaidi <[email protected]> Co-authored-by: RomneyDa <[email protected]>
Root cause:
src/interactive/payload.ts:738(normalizeTableBlock) drops a table without a caption by design (the presentation docs make table normalization atomic and the caption required, and Slack'sdata_tablerequirescaption), but nothing in the message action path checked the caption before that drop, so the rest of the message was sent and the tool reporteddeliveryStatus: "sent"without the table.Fixes #196312
What Problem This Solves
When an agent sends a Slack message through the
messagetool with a table block that has nocaption, the table vanishes. The text around it is posted, and the tool tells the agent the message was sent, so the agent reports success while the data it meant to share is missing.User Impact
A table without a caption is now rejected before anything is posted, with the same "
<field> required" tool error the message tool already uses for missing inputs (presentation.blocks[].caption required). The agent sees the error and can retry with a caption instead of reporting a send that lost its table. Tables with a caption are unchanged.Why This Change Was Made
The caption is part of the documented table contract, and Slack's native data table block requires it (Slack data table block:
captionis Required), so rendering a captionless table would mean inventing a heading, which the docs rule out ("drops the table block instead of truncating or repairing its data"). The check now lives with the other message-action parameter parsing, right after thepresentationJSON is parsed, so every message action rejects the table before any part is sent. It reuses the existing required-parameter error instead of adding new wording.This adopts @indra622's PR: their commit added the check inside the send payload builder with a new error message. On top of it, the check moved to the parameter owner, uses the existing error, and the regression is folded into one test; the test-lines allocation file is dropped.
Evidence
ocx src) with the bundled Slack plugin in Socket Mode against a local Slack Web API and Socket Mode fixture; a deterministic model calls themessagetool with "Contract summary", a text block and a two-row table, first without a caption, then with one.0b18f610d325, no caption: Slack receiveschat.postMessagewith only twosectionblocks and no table, and the tool returnsdeliveryStatus="sent",payloadOutcomes[0].status="sent".a8aa768ead2b, no caption: no Slack call; the tool returnserror="presentation.blocks[].caption required".section,section,data_table(caption "Expiring contracts", 3 rows),deliveryStatus="sent".src/infra/outbound/message-action-send.validation.test.ts: the new case fails on main (the send resolves instead of rejecting) and passes here (18/18). Neighbouring send, params and runner suites pass (102 tests).Thanks @judeKim for the clear report with both receipts, and @indra622 for the original fix.
Merge danger: two-way door. Only adds input validation; a revert restores the old silent drop. Blast radius: message tool and
openclaw messagecalls that include a table block without a caption now get an error instead of a partial send; tables with captions and all other blocks are unchanged.