fix(outbound): keep Discord runtime adapters resolvable#90198
fix(outbound): keep Discord runtime adapters resolvable#90198TurboTheTurtle wants to merge 3 commits into
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
d3aefa9 to
65bfcde
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs changes before merge. Reviewed June 7, 2026, 4:17 AM ET / 08:17 UTC. Summary PR surface: Source +98, Tests +223. Total +321 across 4 files. Reproducibility: yes. for the remaining blocker: source inspection shows the PR-head resolver can return a metadata-only Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Keep the PR branch but repair delivery resolution to require send-capable outbound/message surfaces, while preserving read-only setup-shell lookup behavior. Do we have a high-confidence way to reproduce the issue? Yes for the remaining blocker: source inspection shows the PR-head resolver can return a metadata-only Is this the best way to solve the issue? No. The PR is in the right layer and covers the live Discord path, but the send-path predicate needs to match the bootstrap send-capable contract before this is the best fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against a931884eb543. Label changesLabel justifications:
Evidence reviewedPR surface: Source +98, Tests +223. Total +321 across 4 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Pushed a CI-unblocker for the plugin SDK testing barrel contract failure ( Validation after the new commit:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Added the redacted live Discord proof ClawSweeper requested to the PR body. Summary: PR-head gateway on OpenClaw 2026.6.2 ( @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper automerge |
|
🦞🔧 Source: I will update this PR branch, or open a safe credited replacement, if the repair worker finds a narrow fix. Automerge progress:
|
f62c3e0 to
4cbba1f
Compare
|
🦞✅ Source: Why human review is needed: What the maintainer can do as a next step: I added |
|
@thewilloftheshadow quick nudge on this one: ClawSweeper’s automerge loop paused on |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper 🐠 reef update Thanks for the contribution. ClawSweeper hit a branch-permission wall on this PR, so it opened a replacement branch to keep review moving while preserving credit. Why replacement: ClawSweeper could not update the source PR branch directly; GitHub did not grant sufficient push rights to the bot for that branch.
fish notes: model gpt-5.5, reasoning high; reviewed against d5fe741. |
Summary
What problem does this PR solve?
Outbound not configured for channel: discordwhen the outbound path observes a pinned/setup channel registry that no longer exposes the runtime send/message adapter while the active replacement registry does.Why does this matter now?
What is the intended outcome?
What is intentionally out of scope?
What does success look like?
What should reviewers focus on?
Linked context
Which issue does this close?
Closes #90162
Which issues, PRs, or discussions are related?
Related #87333 (adjacent channel-registry pinning issue; different files and failure path).
Was this requested by a maintainer or owner?
No maintainer request seen; ClawSweeper marked the issue source-repro/fix-shape-clear.
Real behavior proof (required for external PRs)
Behavior or issue addressed:
Discord final reply delivery could fail with
Outbound not configured for channel: discordafter active registry replacement when the selected channel registry still exposed only a setup shell and the bootstrap attempt guard did not retry after a non-send-capable load.Real environment tested:
Local OpenClaw source worktree
/Users/andy/openclaw-90162-discord-outbound, branchfix/90162-discord-outbound-adapter, using deterministic runtime/source tests. Live Discord proof was also captured on a PR-head temp gateway running OpenClaw 2026.6.2 (f62c3e0) with build-info commitf62c3e0912ee0a7aebe5db4910f7ec2ecd57781b; the temp PR-head gateway was stopped afterward and production gateway health was verified OK.Exact steps or command run after this patch:
node scripts/run-vitest.mjs run src/infra/outbound/channel-resolution.test.ts src/infra/outbound/channel-bootstrap.runtime.test.ts src/plugins/runtime.channel-pin.test.tsnode scripts/run-vitest.mjs src/infra/outbound/deliver.test.ts src/infra/outbound/delivery-queue.recovery.test.ts src/infra/outbound/message-action-runner.plugin-dispatch.test.ts src/infra/outbound/message-action-runner.media.test.ts src/infra/outbound/channel-selection.test.ts src/infra/outbound/targets.test.tsnode scripts/run-vitest.mjs src/infra/outbound/message.test.ts src/cron/isolated-agent/delivery-target.test.ts src/gateway/server-methods/send.test.ts src/channels/turn/durable-delivery.test.tspnpm exec oxfmt --check src/infra/outbound/channel-bootstrap.runtime.test.ts src/infra/outbound/channel-bootstrap.runtime.ts src/infra/outbound/channel-resolution.test.ts src/infra/outbound/channel-resolution.tsnode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/infra/outbound/channel-bootstrap.runtime.test.ts src/infra/outbound/channel-bootstrap.runtime.ts src/infra/outbound/channel-resolution.test.ts src/infra/outbound/channel-resolution.tsnode scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfonode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfogit diff --checkcodex review --base upstream/mainLive Discord proof commands/checks:
git -C <pr-worktree> rev-parse HEADnode <pr-worktree>/dist/index.js --versionjq . <pr-worktree>/dist/build-info.jsonStarted PR-head gateway on temp port
18790with temp config and Discord tech account enabled.gateway health --jsonagainst temp port.Sent a real Discord trigger message in
#agent-chatfrom another bot account.Read recent Discord messages through the Discord API.
rg "Outbound not configured for channel: discord" <pr-head-log>Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output):
Source-backed runtime tests prove that setup-only and actions-only shells do not satisfy runtime outbound resolution, active replacement registries remain visible to message/outbound resolution, and bootstrap retries after a load that still does not make the channel send-capable. Live Discord proof also shows a real Discord inbound turn completed and the final outbound Discord reply posted successfully on PR fix(outbound): keep Discord runtime adapters resolvable #90198 / SHA
f62c3e0912ee0a7aebe5db4910f7ec2ecd57781bwith noOutbound not configured for channel: discorderror in the PR-head log.A live before/after reproduction on the exact pre-patch SHA was not run; the before behavior is covered by the linked stable-release issue logs and source-level regression tests.
Live proof used a temporary PR-head gateway on port
18790with a Discord tech account. Message, guild, channel, session, and run identifiers are redacted. The temp PR-head gateway was stopped after proof capture and production gateway health was verified OK.The added regression tests model the source-level failure shape from [Bug]: Discord final replies can still lose outbound adapter on 2026.6.1 #90162: pinned setup/channel registry plus active runtime replacement and a non-send-capable bootstrap result. These cases would have returned/kept a setup shell or suppressed retry before the resolver/bootstrap changes.
Tests and validation
Which commands did you run?
node scripts/run-vitest.mjs run src/infra/outbound/channel-resolution.test.ts src/infra/outbound/channel-bootstrap.runtime.test.ts src/plugins/runtime.channel-pin.test.ts— passednode scripts/run-vitest.mjs src/infra/outbound/deliver.test.ts src/infra/outbound/delivery-queue.recovery.test.ts src/infra/outbound/message-action-runner.plugin-dispatch.test.ts src/infra/outbound/message-action-runner.media.test.ts src/infra/outbound/channel-selection.test.ts src/infra/outbound/targets.test.ts— passednode scripts/run-vitest.mjs src/infra/outbound/message.test.ts src/cron/isolated-agent/delivery-target.test.ts src/gateway/server-methods/send.test.ts src/channels/turn/durable-delivery.test.ts— passedpnpm exec oxfmt --check src/infra/outbound/channel-bootstrap.runtime.test.ts src/infra/outbound/channel-bootstrap.runtime.ts src/infra/outbound/channel-resolution.test.ts src/infra/outbound/channel-resolution.ts— passednode scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json src/infra/outbound/channel-bootstrap.runtime.test.ts src/infra/outbound/channel-bootstrap.runtime.ts src/infra/outbound/channel-resolution.test.ts src/infra/outbound/channel-resolution.ts— passednode scripts/run-tsgo.mjs -p tsconfig.core.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core.tsbuildinfo— passednode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.json --incremental --tsBuildInfoFile .artifacts/tsgo-cache/core-test.tsbuildinfo— passedgit diff --check— passedcodex review --base upstream/main— no actionable regressionsWhat regression coverage was added or updated?
src/infra/outbound/channel-bootstrap.runtime.test.tscovers active replacement registry send-capability visibility and retry after a bootstrap attempt that leaves the channel non-send-capable.src/infra/outbound/channel-resolution.test.tscovers pinned message adapter lookup after active registry replacement, setup shell and actions-only avoidance during bootstrap, active runtime preference over loaded setup shells, and non-return of setup shells after unsuccessful bootstrap.What failed before this fix, if known?
If no test was added, why not?
Risk checklist
Did user-visible behavior change? (
Yes/No)Yes. Final outbound delivery should now recover through a runtime adapter instead of failing when registry replacement leaves a setup shell in the selected channel registry.
Did config, environment, or migration behavior change? (
Yes/No)No.
Did security, auth, secrets, network, or tool execution behavior change? (
Yes/No)No.
What is the highest-risk area?
resolveOutboundChannelPlugin({ allowBootstrap: true }).How is that risk mitigated?
Current review state
What is the next action?
What is still waiting on author, maintainer, CI, or external proof?
f62c3e0912ee0a7aebe5db4910f7ec2ecd57781b.Which bot or reviewer comments were addressed?