fix(slack): avoid null table column settings - #57128
Conversation
Competes with open PR #56618, which also fixes #56615 (null |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for targeting the live rich-table failure; current main still emits None placeholders in plugins/platforms/slack/block_kit.py:288-300.
Problems
- The new
client = self._get_client(chat_id)in this PR'splugins/platforms/slack/adapter.py:1407drops current workspace routing. Main's live send path uses_get_client(chat_id, team_id=self._metadata_team_id(metadata))atplugins/platforms/slack/adapter.py:1447-1449; preserve that on both retry attempts and test it with metadata. - The no-block recovery is only added to
send(). Finalized streaming edits also render blocks and callchat_updateinplugins/platforms/slack/adapter.py:1541-1547, so aninvalid_blocksresponse there still fails. Add a matching fallback that sendsblocks=[]to clear a previous layout.
Suggested changes
- Salvage the retry into the current workspace-aware send call and assert both client selections.
- Add the finalized-edit fallback and regression coverage.
This is an automated hermes-sweeper review.
| @@ -1407,7 +1407,19 @@ async def send( | |||
| if broadcast and i == 0: | |||
There was a problem hiding this comment.
Current main routes outbound sends through _get_client(chat_id, team_id=self._metadata_team_id(metadata)) (plugins/platforms/slack/adapter.py:1447-1449). Retain that metadata on the initial post and retry; this unqualified lookup can route a multi-workspace response through the primary client.
There was a problem hiding this comment.
Verified at the current head (aff6d4835): the metadata-selected client is resolved with team_id=self._metadata_team_id(metadata) and reused for both the initial request and fallback. The adapter regression test asserts _get_client.assert_called_once_with("C1", team_id="T_OTHER"). The focused Slack suite passes 277/277. This concern is addressed; leaving thread resolution to a maintainer.
cdcaf4b to
aff6d48
Compare
|
Independent validation evidence for this PR:
This renderer correction plus the plain-text retry is more complete than my narrower duplicate #68434, which I closed in favor of this canonical PR. @teknium1, could you please take the maintainer merge look when convenient? The PR is currently mergeable with all required checks green. |
Summary
nullSlack tablecolumn_settingsentries with schema-valid objects and omit trailing default columns.chat.postMessagepayload withinvalid_blocks, retry once as plain text.chat.updatecalls, usingblocks=[]so an existing block layout is cleared.Tests
.venv/bin/python -m pytest tests/gateway/test_slack_block_kit.py tests/gateway/test_slack_block_kit_adapter.py tests/gateway/test_slack.py -q(277 passed).venv/bin/python -m ruff check plugins/platforms/slack/adapter.py plugins/platforms/slack/block_kit.py tests/gateway/test_slack_block_kit.py tests/gateway/test_slack_block_kit_adapter.pygit diff --check