Repository navigation
fix(discord): report pending message search indexes - #118573
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 4:23 AM ET / 08:23 UTC. ClawSweeper reviewWhat this changesThis PR makes Discord message search report a guild’s warming search index and retry delay as an error instead of returning it as a successful empty or malformed search result. Merge readinessKeep this PR open for landing: current main can turn Discord’s successful HTTP 202 index-warming payload into an Priority: P1 Review scores
Verification
How this fits togetherDiscord message search passes a REST response through the Discord plugin’s search owner before the channel action and CLI present it to an operator or agent. The change distinguishes the temporary index-warming payload from valid search-result objects so downstream paths do not emit false success. flowchart LR
A[Discord message search request] --> B[Discord REST client]
B --> C[Search response payload]
C --> D[Discord search response owner]
D -->|Index warming| E[Retryable error with delay]
D -->|Messages array| F[Action and CLI success result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +15, Tests +32. Total +47 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase the narrow response-owner repair onto current main, retain the focused empty/warming/malformed-result coverage, and merge once the refreshed exact head has green required checks and the HTTP-202 action/CLI proof still passes. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible with high confidence: current main returns every successful HTTP response body to the search owner, which accepts the warming object, and the action then emits Is this the best way to solve the issue? Yes. The response owner is the canonical boundary because it is where the successful-but-not-search-result payload first becomes an application value; fixing the CLI or action consumer would leave sibling callers exposed. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0cad02313a9c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
* origin/main: refactor(tts): absorb speech core package (openclaw#118513) fix(qa): restore Telegram release validation (openclaw#118542) fix(discord): report pending message search indexes (openclaw#118573)
What Problem This Solves
Fixes an issue where Discord message search reported success with an empty result when Discord actually returned HTTP 202 because the guild's message index was not ready. The public message-search tool and CLI both falsely presented the unfinished search as complete.
Why This Change Was Made
Discord's actual installed API contract represents index warming as
{ "code": 110000, "retry_after": ... }, while Undici correctly treats HTTP 202 as a successful HTTP status. The existing Discord search response owner now recognizes that official response shape, reuses the existing retry-after parser, and reports an actionable retry delay. Genuine empty/successful results, rate limits, ordinary HTTP failures, and malformed-response handling retain their existing ownership.The change touches two existing Discord plugin files and adds 15 production lines. It adds no configuration, dependencies, persisted state, public API, packaging surface, or alternative transport.
User Impact
An operator or agent receives a clear retryable search-index-warming error instead of a misleading success or empty result. Successful searches and the existing Discord rate-limit behavior remain unchanged.
Evidence
gpt-5.6-solhigh-reasoning P0–P3 autoreview found no actionable issues; the official review reported 0.93 confidence and the real authenticated TruffleHog scan was clean.[email protected]contract,[email protected], credential-free localhost HTTP 202 responses, actual Discord REST request handling, the public message action, and the real CLI formatter.tbx_01kz39c4fgnjm7ktx0qxwpeay6completed with authoritativeexitCode: 0and was stopped; the hosting Actions workflow can appear cancelled after successful delegated lease cleanup.Maintainer review resolution
4affa32abd797377d13ffc9755fe318a8aa4b1d5passed actual HTTP-202 Discord action and CLI scenarios, preserved empty searches, 429s, HTTP failures, and retry timing, and completed 327 owner/sibling tests plus the full changed-file gate.Real behavior proof
{ "status": "PASS", "head": "4affa32abd797377d13ffc9755fe318a8aa4b1d5", "parent": "2e46ab1f231a65f26ce25cae5e317f6df2308fde", "channel": "discord", "officialDiscordIndexWarmingCode": 110000, "unchangedParentFalseToolSuccess": true, "unchangedParentFalseCliSuccess": true, "unchangedParentSearchRequests": 11, "candidateSearchRequests": 16, "candidateLoopbackHttpRequests": 17, "candidateActionableWarmingFailure": true, "retryAfterPreserved": true, "emptyAndRealResultsRemainSuccessful": true, "rateLimitAndHttpErrorsUnchanged": true, "malformedSuccessRejected": true, "ownerTestsPassed": 9, "cliTestsPassed": 17, "discordSiblingTestsPassed": 301, "testsPassed": 327, "externalNetworkRequests": 0, "credentialsUsed": false, "productionLinesAddedNet": 15, "changedGate": "PASS: complete exact-two-file changed gate", "runner": "blacksmith-testbox", "run": "https://github.com/openclaw/openclaw/actions/runs/30794841737" }