Skip to content

adapters/slack: follow-ups from #132 and #133 (retry comment, ADR 0005, mrkdwn tests, PostNative) #136

Closed

Description

@ThomasK33

Follow-ups from the reviews of #132 and #133 in the Slack adapter and its retry docs. Each item is small, and none blocked those PRs.

  1. Retry default comment. The withDefaults comment in adapters/slack/slackapi/retry.go (L42-L44) says the worst-case backoff is about 600ms. With a Slack Retry-After, each delay is capped only at MaxDelay, so total backoff can reach MaxElapsed (2s). Correct the number.
  2. ADR 0005 ack-window sentence. docs/adr/0005-rate-limit-handling.md#L29 ends with "This keeps synchronous retry inside the ack window." The deadline check and MaxElapsed bound only the backoff sleep, not the HTTP attempts (docs: fix stale example, dispatch, and retry text #132 corrected the same claim in the package docs). ADRs record decisions, so decide whether to amend it or leave a note.
  3. No test pins mrkdwn: false on two posts. No adapter test checks "mrkdwn": false on chat.postEphemeral (slack.go#L359) or on the DM-fallback post (slack.go#L612). Removing either line still passes every adapters/slack test, on main before refactor(adapters/slack): move Web API calls onto typed slackapi methods #133 and after it.
  4. PostNative keeps its own request body. After refactor(adapters/slack): move Web API calls onto typed slackapi methods #133, PostNative still builds its own chat.postMessage body (interactive.go#L308), because slackapi.PostMessageRequest.Blocks is []Block and docs/reference.md promises the adapter forwards a native payload unchanged. Decide whether PostNative can require a JSON array of blocks and use the typed method.
  5. mrkdwn on chat.postEphemeral. The adapter sends mrkdwn to chat.postEphemeral, as it did before refactor(adapters/slack): move Web API calls onto typed slackapi methods #133. The refactor(adapters/slack): move Web API calls onto typed slackapi methods #133 author reported that Slack documents mrkdwn only for chat.postMessage. I did not verify this. Check Slack's method docs and drop the field if Slack ignores it.

Owner and trigger

The coder/chat maintainer triages this. Items 1 to 3 are ready for an agent. Items 4 and 5 need a decision first.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: xhigh

Activity

  1. added
    needs-triageMaintainer needs to evaluate this issue
    enhancementNew feature or request
    ready-for-agentFully specified, ready for an AFK agent
    and removed
    needs-triageMaintainer needs to evaluate this issue
    on Oct 29, 2026
  2. ThomasK33 commented on Oct 29, 2026

    @ThomasK33
    MemberAuthor

    Triage: ready-for-agent. I made the two open decisions, so all five items can ship in one PR.

    • Item 2 (ADR 0005): amend it. ADRs here record decisions, not mechanism claims, and this sentence is a false mechanism claim. Replace it with the decision only: retry backoff is bounded by MaxElapsed, and individual HTTP attempts are bounded by the caller's context and HTTP client. Add a dated amendment note that points to docs: fix stale example, dispatch, and retry text #132.
    • Item 4 (PostNative): keep its own body. docs/reference.md promises to forward a native payload unchanged. Decoding it into []slackapi.Block and encoding it again can drop fields that the typed struct does not model. Add a one-line comment at interactive.go that states this reason, so the next refactor does not undo it.
    • Item 5 (mrkdwn on chat.postEphemeral): I verified it. Slack's method docs list parse, markdown_text and text, but no mrkdwn argument. Drop Mrkdwn from slackapi.PostEphemeralRequest and from the adapter at slack.go L359.
    • Item 3 then changes for the ephemeral post: its test must assert that the mrkdwn field is absent. The DM-fallback post (chat.postMessage) keeps "mrkdwn": false, and the test must pin it.

    I did not verify one thing: whether any caller relies on mrkdwn: false to send literal text in an ephemeral message. If a test shows it does, escape the text instead.


    Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: medium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions