Skip to content

fix(discord): show failed final slash-command responses - #118545

Merged
steipete merged 1 commit into
mainfrom
codex/auto-qa-discord-final-outcome-577
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/auto-qa-discord-final-outcome-577

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users running a Discord slash command would receive no answer when its final interaction response failed after another response was intentionally suppressed. The deferred interaction could disappear without showing either the requested result or an actionable failure.

Why This Change Was Made

The Discord native-interaction owner now records one authoritative final response outcome: accepted, failed, or intentionally suppressed. A failed final response cannot be overwritten by an earlier or later suppression, while a genuinely accepted final response, intentional suppression, partial delivery, and component interactions retain their existing behavior.

The change touches two existing files and adds seven production lines to preserve the native interaction's actual final-delivery ownership; it adds no configuration, dependency, public API, compatibility path, or packaging surface.

User Impact

Discord slash-command users now receive a visible private failure when their final response cannot be delivered, including mixed suppressed/failed response sequences. Successfully delivered responses and deliberate silent outcomes remain unchanged.

Evidence

  • Four independent nonauthor hostile reviews and a genuine official gpt-5.6-sol high-reasoning review found no actionable P0-P3 issues. The official review reported 0.91 confidence and the authenticated TruffleHog secret scan was clean.
  • An owned Blacksmith Testbox independently reproduced five real native interaction failures plus the committed failing regression on both the unchanged parent and a rejected intermediate implementation: 12 authenticated, assertion-backed RED proofs in total.
  • The reviewed head passed all 15 real deferred slash-command/component scenarios through the actual Discord native dispatcher, installed [email protected], real interaction callback envelopes, and the Discord REST boundary. The run used no credentials and made no external network requests.
  • All 11 Discord native-command/interaction/REST suites and three shared channel-turn/dispatcher/kernel suites passed, including the complete existing 1,713-line native dispatch regression suite.
  • The complete exact-two-file changed gate passed, including formatting, lint, production and extension-test typechecks, plugin boundaries, dead exports, database-first/media/sidecar guards, and runtime import cycles.
  • Authenticated exact-head remote workflow: https://github.com/openclaw/openclaw/actions/runs/30790465298. Lease tbx_01kz35357qc03fx9039rsfp642 finished with exitCode: 0 and was stopped.

Maintainer decision and current-main compatibility

  • Current origin/main at 3aca283d44524f1c8e0d96f0aedf530f3973770c leaves both reviewed Discord files byte-identical to the original base; GitHub reports the exact reviewed head cleanly mergeable and all relevant exact-head checks are complete and green.
  • The repository owner explicitly delegated autonomous landing after four independent hostile reviews, the genuine official Sol review, completed exact-head remote proof, and current-main compatibility verification. No content-changing rebase is necessary solely because unrelated main commits advanced; preserving the independently reviewed commit retains the authenticated proof and follows the repository landing policy.

Real behavior proof

{
  "status": "PASS",
  "head": "5fd9a260c2bb9c2052e5fd324274bfac07bb018b",
  "parent": "57732647d16d3ad8629a4bef708a2bef343f9190",
  "rejectedPredecessor": "e4022e6cc0805708092cfeca4b34cf2e8b2fb260",
  "channel": "discord",
  "dependency": "[email protected]",
  "authenticBaselineRedAssertions": 6,
  "authenticRejectedPredecessorRedAssertions": 6,
  "realDeferredInteractionScenarios": 15,
  "discordOwnerAndSiblingSuites": 11,
  "sharedTurnAndDispatcherSuites": 3,
  "externalNetworkRequests": 0,
  "credentialsUsed": false,
  "productionLinesAddedNet": 7,
  "changedGate": "PASS: complete exact-two-file changed gate",
  "runner": "blacksmith-testbox",
  "run": "https://github.com/openclaw/openclaw/actions/runs/30790465298"
}

@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord size: S maintainer Maintainer-authored PR labels Aug 3, 2026
@steipete
steipete marked this pull request as ready for review August 3, 2026 06:45
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P1 High-priority user-facing bug, regression, or broken workflow. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 2:51 AM ET / 06:51 UTC.

ClawSweeper review

What this changes

The branch changes Discord native slash-command reply handling so a failed final delivery shows the existing private no-visible-reply warning instead of being hidden by an earlier or later intentional suppression.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this maintainer-labeled PR open for normal owner review: current main still suppresses the fallback after any non-visible final delivery, including the reported final-delivery failure, while the patch records the authoritative terminal outcome at the Discord delivery owner and covers the ordering cases.

Priority: P1
Reviewed head: 5fd9a260c2bb9c2052e5fd324274bfac07bb018b
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A narrowly scoped owner-boundary repair with concrete native-interaction proof and targeted ordering regressions; only protected-label review and remaining exact-head checks remain.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body provides exact-head Blacksmith Testbox evidence with baseline red assertions and 15 after-fix native deferred-interaction scenarios through the Discord dispatcher and REST boundary.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body provides exact-head Blacksmith Testbox evidence with baseline red assertions and 15 after-fix native deferred-interaction scenarios through the Discord dispatcher and REST boundary.
Evidence reviewed 6 items Current-main failure path: Current main sets settledWithoutVisibleReply for any final callback reporting visibleReplySent: false, but its final-error callback does not record a failed final; the post-dispatch branch therefore settles silently instead of reaching the private fallback warning.
Owner-boundary repair: The PR replaces the broad suppression flag with a final-only accepted/failed/suppressed outcome and preserves a failure until Discord accepts a later final reply; the final branch only silently settles an intentional suppression.
Shared delivery contract: The channel turn contract independently supplies a delivery result to onDelivered and delivery exceptions to onError, so tracking the terminal fact in this adapter follows the callback ownership boundary rather than inferring it from dispatch counts.
Findings None None.
Security None None.

How this fits together

Discord slash commands enter the native interaction dispatcher, which delivers final, block, and tool replies through the channel turn lifecycle. The Discord adapter observes delivery callbacks and then either leaves an accepted reply visible, settles an intentional suppression, or sends a private fallback warning.

flowchart TD
  A[Discord slash command] --> B[Native interaction dispatcher]
  B --> C[Channel delivery lifecycle]
  C --> D[Final delivery outcome]
  D --> E[Accepted reply remains visible]
  D --> F[Intentional suppression settles interaction]
  D --> G[Failed final shows private warning]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled Discord delivery repair merge after its current-main refresh and remaining exact-head checks complete? Merge after refresh: Refresh the cleanly mergeable branch against current main and merge once every required exact-head check succeeds.

Why: The code and submitted proof support the narrow repair, but the protected maintainer label requires an explicit owner merge decision rather than automated cleanup.

Before merge

  • Resolve merge risk (P1) - The supplied snapshot reports the PR as mergeable but behind current main, with some exact-head build and channel-quality jobs still running; refresh against current main and wait for required checks before merging, without treating base drift as a source regression.
  • Complete next step (P2) - No mechanical repair remains: the patch is coherent, but the protected maintainer label and in-progress exact-head checks require normal owner review rather than automated repair.
Agent review details

Security

None.

PR surface

Source +7, Tests +130. Total +137 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 15 8 +7
Tests 1 139 9 +130
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 154 17 +137

Review metrics

Metric Value Why it matters
Production versus regression tests production +7 net, tests +130 net The small owner-boundary state change is accompanied by ordering coverage for suppressed, failed, partial, and accepted final replies.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the final-delivery outcome as Discord-owned state, rebase or refresh the branch against current main, and merge once the owner confirms the exact head passes required checks.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the final-delivery outcome as Discord-owned state, rebase or refresh the branch against current main, and merge once the owner confirms the exact head passes required checks.

Do we have a high-confidence way to reproduce the issue?

Yes, source-reproducible with high confidence: current main records any non-visible final as silent settlement while final delivery errors do not override that state. The submitted exact-head Testbox proof also reports red baseline assertions and after-fix native interaction scenarios, though this read-only review did not execute them.

Is this the best way to solve the issue?

Yes. Recording accepted, failed, or intentionally suppressed state at the Discord delivery observer is the narrowest maintainable fix because that adapter owns the authoritative final-delivery fact; it avoids downstream inference from aggregate dispatch counts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 48d3f2e21345.

Labels

Label changes:

  • add P1: A Discord slash-command final response can silently disappear for active users when delivery fails after suppression, breaking a normal channel workflow.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head Blacksmith Testbox evidence with baseline red assertions and 15 after-fix native deferred-interaction scenarios through the Discord dispatcher and REST boundary.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides exact-head Blacksmith Testbox evidence with baseline red assertions and 15 after-fix native deferred-interaction scenarios through the Discord dispatcher and REST boundary.

Label justifications:

  • P1: A Discord slash-command final response can silently disappear for active users when delivery fails after suppression, breaking a normal channel workflow.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides exact-head Blacksmith Testbox evidence with baseline red assertions and 15 after-fix native deferred-interaction scenarios through the Discord dispatcher and REST boundary.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides exact-head Blacksmith Testbox evidence with baseline red assertions and 15 after-fix native deferred-interaction scenarios through the Discord dispatcher and REST boundary.

Evidence

What I checked:

  • Current-main failure path: Current main sets settledWithoutVisibleReply for any final callback reporting visibleReplySent: false, but its final-error callback does not record a failed final; the post-dispatch branch therefore settles silently instead of reaching the private fallback warning. (extensions/discord/src/monitor/native-command-agent-reply.ts:95, 48d3f2e21345)
  • Owner-boundary repair: The PR replaces the broad suppression flag with a final-only accepted/failed/suppressed outcome and preserves a failure until Discord accepts a later final reply; the final branch only silently settles an intentional suppression. (extensions/discord/src/monitor/native-command-agent-reply.ts:53, 5fd9a260c2bb)
  • Shared delivery contract: The channel turn contract independently supplies a delivery result to onDelivered and delivery exceptions to onError, so tracking the terminal fact in this adapter follows the callback ownership boundary rather than inferring it from dispatch counts. (src/channels/turn/types.ts:209, 48d3f2e21345)
  • Regression coverage: The PR adds cases for a failed deferred final amid suppressed block, tool, prior-final, and later-final callbacks, plus mixed accepted/failed finals, which directly tests the precedence invariant. (extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts:1100, 5fd9a260c2bb)
  • Feature provenance: Blame attributes the current broad suppression state and its silent-settlement branch to the recent native reply change in commit 5bcebc3267ea2832af40c44040243ec09a53a100, making this a targeted follow-up to that behavior rather than a new parallel flow. (extensions/discord/src/monitor/native-command-agent-reply.ts:95, 5bcebc3267ea)
  • Submitted real-behavior proof: The PR body reports a passing exact-head Blacksmith Testbox run covering 15 native deferred-interaction scenarios, with red baseline assertions and the successful Real behavior proof check in the supplied check snapshot. (5fd9a260c2bb)

Likely related people:

  • Shakker: Current-main blame assigns the broad non-visible-final state and silent settlement branch to the recent native reply change. (role: introduced the current final-settlement behavior; confidence: high; commits: 5bcebc3267ea; files: extensions/discord/src/monitor/native-command-agent-reply.ts, extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts)
  • Peter Steinberger: Feature history shows substantial contribution volume in the affected reply and dispatch-test files, and the proposed repair is a focused follow-up on that surface. (role: recent Discord reply contributor; confidence: medium; commits: 5fd9a260c2bb, 57732647d16d; files: extensions/discord/src/monitor/native-command-agent-reply.ts, extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit c6bcd93 into main Aug 3, 2026
159 of 170 checks passed
@steipete
steipete deleted the codex/auto-qa-discord-final-outcome-577 branch August 3, 2026 07:02
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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

Labels

channel: discord Channel integration: discord maintainer Maintainer-authored PR P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant