fix(slack): form-encode Web API requests - #3753
Conversation
Yeachan-Heo
left a comment
There was a problem hiding this comment.
Terminal red-team review at exact head a307d006764d5f502fc930831ff41b7392fd6249 (base dev caeeecbc52e5ff0f82e967c6c8f58d4c50d4f0da; base is the exact parent of head).
Scope reviewed: Slack Web API form encoding, headers/content types, Unicode and special parameters, pagination/thread/replies semantics, error handling, backward compatibility, and focused tests.
Implementation assessment: URLSearchParams correctly emits UTF-8 form data, omits undefined fields, preserves special characters, and leaves the existing conversations.history/conversations.replies lookup and error/retry semantics intact. Exact-head local evidence: bun test packages/coding-agent/test/sdk-slack-live-provider.test.ts — 11 pass; additional exact-head Unicode/special-parameter round-trip and content-type probe — pass.
REQUEST_CHANGES blocker: exact-head GitHub CI evidence is absent. The commit reports zero check runs and zero legacy statuses (check-runs: 0, commit status: pending, total_count: 0), and gh pr checks reports no checks for the branch. This prevents a MERGE_READY decision under the terminal review gate. Please produce green checks on this exact head or an explicitly recorded maintainer-approved CI waiver.
No source mutation or merge was performed. Signed via terminal GitHub CLI as Yeachan-Heo.
a307d00 to
ba3a16a
Compare
Yeachan-Heo
left a comment
There was a problem hiding this comment.
Fresh terminal GJC review at exact head ba3a16a095050514f66c807b3d9da5f60f6d0adf against current dev 57577acd7ea2da991024604e92bb209f3a30c7d5 (PR base recorded as bf37cb30d0442926ad3fb2b2c6fc26a6d3edeffc; current dev is two commits ahead of that base).
Adversarial scope: request serialization, auth/content-type semantics, Unicode/special/query edge cases, binary-body applicability, pagination/thread/replies behavior, error/retry compatibility, and regression coverage. The implementation uses URLSearchParams over the string-only Slack parameter contract, omits undefined values, preserves the Bearer Authorization header, and uses application/x-www-form-urlencoded; charset=utf-8; focused exact-head test passes (11/11). No source or external-branch mutation was performed.
REQUEST_CHANGES blockers:
- Fresh exact-head GitHub CI is not green/available: check-runs API reports
total_count: 0, commit-status API reportstotal_count: 0withstate: pending, andgh pr checksreports no checks for the branch. - Exact-head package check is not clean:
bun --cwd=packages/coding-agent run checkfails on the inheritedtest/agent-session-retry-fallback.test.tsformatting mismatch; the failure is outside this PR diff but means the exact head does not provide clean CI evidence.
Merge gate: no MERGE_READY recommendation and no merge performed. Please provide green checks on this exact head (or an explicitly recorded maintainer-approved CI waiver) and a clean exact-head validation result.
ba3a16a to
20cbbdc
Compare
|
Rebased onto current
New exact-head fork workflows require maintainer approval:
Maintainer action requested: approve both runs, then refresh the formal review decision for this exact head. No duplicate PR or comment was opened. |
|
Owner resume required; no duplicate mutation opened. Exact head: |
6d36814 to
d0dac07
Compare
1c1dd9d to
8c8fcd9
Compare
|
Rebased onto current This addresses the second blocker from the 2026-08-03 review directly. That review recorded:
That failure was inherited from the old base and has since been fixed upstream. At the new exact head it is gone: Verified in a disposable worktree checked out at exactly On the first blocker — absent GitHub CI evidence — I do not think this is actionable from my side. The workflow runs exist but GitHub is holding them for maintainer approval because this is a fork PR:
Requesting re-review, or a CI approval on |
Slack's conversations.replies endpoint rejects JSON request bodies with invalid_arguments even though equivalent form-encoded requests succeed. Serialize all Slack Web API POST parameters with URLSearchParams, omit undefined fields, and pin the request contract with a regression test. Confidence: high Scope-risk: narrow Reversibility: easy Tested: Slack provider and daemon 60/60; coding-agent check; CLI smoke Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
8c8fcd9 to
92ad43d
Compare
|
Following up on the
The gate is the ancestry check in if git merge-base --is-ancestor "${GITHUB_BASE_SHA}" HEAD; then :
else echo "::error::Exact-head CI requires this PR head to contain base ${GITHUB_BASE_SHA}; rebase onto current ${GITHUB_BASE_REF}."Checked locally against the current tip — all three of my open PRs now satisfy it: Exact-head validation at The second blocker from the 2026-08-03 review — the inherited One practical note: because the gate compares against the base recorded on the triggering event, a head that is current now goes stale whenever |
Yeachan-Heo
left a comment
There was a problem hiding this comment.
OWNER_CONFIRMATION_REQUIRED — exact-head review
Reviewed exact head 92ad43dca9b55cdf7f790ff805c76f5f44943379 against exact base/current dev 732856b3ccb3fade6e9fbc17908a4fbca5a7682f. GitHub reports MERGEABLE / UNSTABLE; the existing formal review decision remains CHANGES_REQUESTED.
Code verdict: MERGE_READY
No functional blocker was found in the form serializer, Bearer authentication, retry behavior, string-only callsites, omission of undefined, or interaction with #3816's added limit: "1" request. The exact-head package check passed, and the focused Slack provider/daemon suites passed 60/60 with 223 assertions.
Why owner confirmation is still required
- Exact-head
Dev CIrun30936309914andPublic site syncrun30936310488are bothaction_requiredbecause this is a fork workflow. - The head has 0 check runs and 0 statuses. This review did not approve or rerun either workflow and does not supply a CI waiver.
- Current base
dev@732856b3also has a failed Dev CI run (30935832940, shard 8), so the owner must distinguish the base failure from this PR's evidence when admitting or waiving CI.
Owner action is therefore limited to approving exact-head fork workflows or recording an explicit waiver; no source change is required by this verdict.
Non-blocking follow-ups
- Narrow the comment/changelog claim that Slack categorically rejects JSON: current Slack documentation lists both JSON and form content types for
conversations.replies, while the contributor's live deployment evidence supports form encoding as the working contract. - Add one literal raw-body assertion covering reserved characters and Unicode; the current ordered
URLSearchParamsassertions prove the ASCII call contract.
Contributor ledger
#3753 is the canonical contribution from nahyeongjin1. The contributor self-closed #3824 as its duplicate and explicitly preserved #3753's stronger coverage. #3816 is complementary and should consume this prerequisite rather than open another encoding lane.
gajae.pr-review-verdict.v1 OWNER_CONFIRMATION_REQUIRED head:92ad43dca9b55cdf7f790ff805c76f5f44943379 base:732856b3ccb3fade6e9fbc17908a4fbca5a7682f reviewer:Yeachan-Heo code:MERGE_READY
Signed: GJC / Yeachan-Heo via GitHub CLI
What
URLSearchParamsform encoding and omitundefinedvalues.conversations.replies,chat.postMessage, and optionalthread_tsomission.packages/coding-agent/CHANGELOG.md→Unreleased / Fixed.Why
Slack's
conversations.repliesendpoint returnsinvalid_argumentsfor the JSON request body used by the live provider, while the equivalent form-encoded request succeeds. This prevents thread reconciliation during Slack notification startup.Testing
bun test packages/coding-agent/test/sdk-slack-live-provider.test.ts packages/coding-agent/test/sdk-slack-daemon.test.ts— 60 pass, 221 assertionsbun --cwd=packages/coding-agent run checkbun run ci:test:smokebun run check— all adapter receipts completed, then the Telegram baseline manifest reported two missing commands; reproduced unchanged on pristineupstream/devand still present after rebasing tocaeeecbcwithbun scripts/generate-telegram-baseline-manifest.ts --check:notifications-telegram-daemon-staging-temp-leak.test.tsnotifications-topic-settle-fence-epoch.test.tsGJC verdict
devbun checkpasses