Repository navigation
Description
What happened
Every real permission ask against a --posture strict mecak8s instance's Slack bot fails to deliver its approval card. Slack rejects the message outright:
```
[ERROR] web-api:WebClient:0 failed to match any allowed schemas [json-pointer:/blocks/0/rows/0/1]
[ERROR] web-api:WebClient:0 missing required field: text [json-pointer:/blocks/0/rows/0/1]
[ERROR] web-api:WebClient:0 missing required field: value [json-pointer:/blocks/0/rows/0/1]
[ERROR] web-api:WebClient:0 must be more than 0 characters [json-pointer:/blocks/0/rows/0/1/elements/0/elements/0/text]
[ERROR] web-api:WebClient:0 missing required field: element [json-pointer:/blocks/0/rows/0/1]
[WARN] bolt-app failed to DM a permission-approval card — denying closed WebAPIPlatformError: An API error occurred: invalid_blocks
at async Object.postMessage (/sdk/examples/slack-bot/src/approvals.ts:66:24)
at async PermissionApprovalGateway.#start (/sdk/examples/slack-bot/src/approvals.ts:373:18)
```
Per `approvals.ts`'s own fail-closed design (`#1707`), the ask correctly resolves to `deny` when the card can't be delivered - so this isn't a security gap, but it means the entire DM-approval feature is currently non-functional whenever a real ask fires. Every ask silently denies instead of ever reaching the user.
Where
`sdk/typescript/examples/slack-bot/src/approvals.ts` - whatever builds the Block Kit payload passed to `postMessage` (line 66), specifically the structure at `blocks[0].rows[0][1]` per the schema errors above. That path looks like a rich-text/section block missing a required leaf (empty `text`, no `value`, no `element`) - possibly a tool name or argument string that's empty or undefined for some tool/arg shape, producing a block with an empty text leaf.
Repro
Deploy the Slack bot against a `--posture strict` mecak8s instance with no blanket allow for a mutate-ask-floor tool (or any tool with no explicit rule, which also defaults to `Ask` - see stacklok/infra#5844 for a real case: `Skill` had no explicit `allow`/`deny` in the CLI permission-config, so it defaulted to `Ask`, triggering this path). Trigger any tool call that reaches a real `PermissionAsk`. Confirmed live in staging (`mecak8s-slack-bot-backend`, 2026-09-28).
Impact
The DM-approval feature (`#1707`) cannot currently deliver a single real approval card - it always fails closed instead. Worth prioritizing given it's the core safety mechanism the feature exists for.
Fully or partially written by an AI agent.
Activity