Skip to content

docs: fix stale example, dispatch, and retry text - #132

Merged
ThomasK33 merged 5 commits into
mainfrom
docs/fix-stale-example-text
Oct 29, 2026
Merged

ThomasK33 merged 5 commits into
mainfrom
docs/fix-stale-example-text

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Why

The operator wants every open follow-up issue in coder/chat closed by one small, reviewed PR. This one fixes sentences in docs and doc comments that no longer match the code on main.

What changed

  • The three Slack state example READMEs link to the tutorial sections that hold the tunnel setup and the channels:history scope, and show the reply as the Markdown that main.go posts. The Linear example README says the app replaces the external links. It no longer says the app adds one.
  • DispatchDeferred acknowledges without waiting for the handler, so the handler can act before the acknowledgement is written. The root README, doc.go, CONTEXT.md (Dispatch Mode, Ack-Then-Work, Detached Work Context, and the Runtime Dispatch invariant), docs/reference.md, docs/how-to/deferred-dispatch.md, and a comment in the Linear example now say this. None of them says that the handler runs after the acknowledgement.
  • The retry deadline check and MaxElapsed bound only the backoff sleep, not the HTTP attempts. The Slack package doc, the slackapi.RetryPolicy comment, and the slack.Options.RetryPolicy comment now say this. The SleepCtx comment and the internal/ratelimit README drop their ack-window claims.
  • The newFirstThoughtDeadline comment names its now() fallback.
  • Two README blueprint citations now also cite Chat.prelude (command and interaction routing) and Chat.queuePollInterval (the poll interval and its clamp).

Scope

  • Text only. No code line changes.
  • The ADRs keep their wording, because they record decisions as made.

Blast Radius

Readers of the READMEs, CONTEXT.md, the docs pages, and go doc output see corrected text. Nothing compiles differently.

Verification

  • go vet, go test (root, adapters, state, and example modules), go test -race on the touched packages, and gofmt -l pass on the head commit.
  • I checked each new sentence against the function it describes on main (Chat.dispatchDeferred, Chat.startDetachedTail, the burst runner, Client.doWithRetry, RetryPolicy.withDefaults), and checked that both tutorial anchors exist.

Closes #127


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

…rding

The state READMEs now point at the tutorial sections that hold the tunnel and the channels:history setup, and show the reply as the Markdown that main.go posts. The Linear README says UpdateSession replaces the external links.
DispatchDeferred starts the handler before it returns to the adapter, so the acknowledgement and the handler run at the same time. The retry deadline check and MaxElapsed bound only the backoff sleep, not the HTTP attempts. newFirstThoughtDeadline falls back to now() for a bad timestamp.
Chat.prelude routes commands and interactions. Chat.queuePollInterval holds the ThreadLockTTL/20 value and its clamp.
Queue, debounce, and burst make the handler wait, so the ack and the handler do not always run at the same time. Name the caller's context the same way in the Slack retry paragraph, and drop the SleepCtx sentence that described its callers.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T21:05:34.639375Z 2d9a60c Manual request
🔒 Security Review ✅ Completed 2026-10-29T21:06:33.654431Z 2d9a60c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 505ceb5561

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 505ceb5561

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

The retry deadline check and MaxElapsed bound only the backoff sleep, and
DispatchDeferred acknowledges without waiting for the handler. Correct the
copies of the old claims in CONTEXT.md, docs/, the Slack retry comments,
the ratelimit README, and the Linear example.
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 2d9a60c80d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 2d9a60c80d

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 merged commit 509d3f9 into main Oct 29, 2026
2 checks passed
ThomasK33 added a commit that referenced this pull request Oct 29, 2026
…retry docs (#137)

## Why

The operator wants every open follow-up issue in coder/chat closed by one small, reviewed PR. This PR closes the five Slack adapter and retry-doc follow-ups from the reviews of #132 and #133, as the triage comment on #136 decided them.

## What changed

- `chat.postEphemeral` no longer gets a `mrkdwn` field. Slack lists no such argument for that method, so `slackapi.PostEphemeralRequest` loses `Mrkdwn`. The DM fallback keeps `"mrkdwn": false` on `chat.postMessage`, and a test now pins it.
- The `withDefaults` comment states the real worst-case backoff: 2s (`MaxElapsed`) with a Slack `Retry-After`, not about 600ms. ADR 0005 decision 3 now states only the bounds, with a dated amendment note that points to #132. Decision 4 and two Consequences drop the same ack-window claim.
- A comment at the `PostNative` payload says why it skips the typed `PostMessage`: `[]slackapi.Block` models only three block types, and the docs call the payload opaque Block Kit.

Closes #136

## Scope

- No caller or test relied on `mrkdwn: false` for literal ephemeral text, so the text gets no escape.
- Plain Text in a native ephemeral message keeps Slack's mrkdwn parsing. Slack has no `mrkdwn` argument on `chat.postEphemeral`, so the dropped field likely never turned parsing off. I did not verify this against a live workspace. CONTEXT.md and the interactive-components how-to now record this exception.
- `adapters/linear/retry.go` had the same stale 600ms comment, and this PR corrects it too.

## Blast Radius

`slackapi.PostEphemeralRequest.Mrkdwn` is an exported field, so a caller that sets it stops compiling. The field had no documented effect on Slack.

## Verification

- The two new ephemeral tests fail on the test commit and pass on the fix commit. The DM-fallback test fails when the fallback stops sending `mrkdwn`.
- A local 429 server that always sends `Retry-After: 1` made the default policy return `RateLimited` after 2.01s and three attempts.
- `go vet`, `go test` for every module, `gofmt -l`, and `go test -race ./adapters/slack/...` pass.

---
_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
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.

docs: fix stale text in the example READMEs and one doc comment

1 participant