Skip to content

fix(slack): name channels in approval summaries, log resolver misses - #845

Merged
angel-manuel merged 2 commits into
devfrom
fix/slack-resolver-channel-names
Oct 28, 2026
Merged

angel-manuel merged 2 commits into
devfrom
fix/slack-resolver-channel-names

Conversation

@angel-manuel

Copy link
Copy Markdown
Contributor

Why

A Slack approval on prod (Reveni) was titled Post Slack message "…" to C0123…, even though services/slack.yaml already declares a conversations.info resolver on channel, and the existing test passes against the fake. The HTTP display resolver drops every failure without logging anything. Slack also reports its own failures in-band (200 {"ok": false, "error": "missing_scope" | "channel_not_found"}), so there was nothing on prod to diagnose from.

Likely causes, not confirmed (prod isn't reachable from the agent env):

  • the connection or BYOC app lacks channels:read / groups:read;
  • the target was a private channel or a DM / user ID, which chat.postMessage accepts but conversations.info can't name.

What

  • Resolver misses are logged (services/param_resolver.rs). HTTP display resolvers now log three cases: transport errors and error statuses at warn, and empty projections at info. Each line carries the template get path, the param name and the upstream's short top-level error code. The substituted URL and the argument are never logged. The MCP path already did this. No behaviour change: misses still fall back to the raw ID.
  • slack.yaml
    • Channels render as '#general' (display: '#{channel.name}').
    • get_thread_replies gains the channel resolver.
    • get_user gains a users.info resolver: Alice Liddell (@alice).
  • Tests (tests/slack.rs)
    • The approval title (action_description) names #general.
    • An unresolvable channel still gates and falls back to the raw ID.
    • Read audit rows carry the resolved channel and user names.
    • New unit test for the error-code filter.

Follow-up

  • Reveni: check that their Slack connection's granted scopes include channels:read and groups:read. If they don't, a reconnect fixes public and private channels. Once this ships, Cloud Logging will show Slack's exact error code for the next miss.
  • DMs addressed by user ID still show the raw ID. Naming them as @alice needs a resolver fallback chain, and the engine allows only one target per param today.

Test plan

  • cargo nextest run -p overslash-api -E 'test(/slack|upstream_error_code/)': 12/12 pass
  • pre-commit hook (fmt, clippy, line-count gate)
  • CI

No screenshots: no dashboard change. The title string is asserted in tests.

🤖 Generated with Claude Code

A prod Slack approval read "to C0123…" though slack.yaml declares a
conversations.info resolver: the HTTP resolver drops every failure
silently, and Slack answers its own (missing_scope, channel_not_found)
in-band as 200 {"ok": false}, so there was nothing to diagnose from.

- HTTP display resolvers log transport errors, error statuses and empty
  projections, with the upstream's short `error` code; never the URL or
  the argument. Mirrors the MCP path, which already logged.
- slack.yaml: channels render as '#general'; get_thread_replies gains the
  channel resolver and get_user a users.info resolver.
- Tests: approval title names the channel, an unresolvable channel falls
  back to the raw id, read audit rows carry the resolved names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
overslash Ready Ready Preview Oct 28, 2026 12:17pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Code diff size

+53 / −3 across 1 file (net +50)

Area Files Added Removed Net
overslash-api 1 +53 −3 +50

Source files under src/ only (.cjs, .go, .js, .jsx, .mjs, .py, .rs, .svelte, .ts, .tsx); test files and inline #[cfg(test)] modules excluded. 3 other changed files not counted.

reqwest's Display quotes the request URL, which carries the substituted
argument the log line was written to keep out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.35294% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rates/overslash-api/src/services/param_resolver.rs 82.35% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@angel-manuel
angel-manuel merged commit 04489f8 into dev Oct 28, 2026
17 checks passed
@angel-manuel
angel-manuel deleted the fix/slack-resolver-channel-names branch October 28, 2026 13:16

This branch was successfully deployed

1 active deployment
Preview — 947dca3a Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant