Repository navigation
fix: apply Discord model picker choices without false failures - #135382
Conversation
Carry the admitted catalog into native commands and reuse completed capability facts. Preserve post-hook channel suppression through settlement so picker acknowledgements are not replaced by generic recovery. Reported-by: @Call44 (#133550). Reverified the existing #134731 repair from #135095 with an isolated Control UI click and reload.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Narrow observed final-delivery promises before aggregation and avoid a shadowed test catalog binding. Targeted lint and 278 reply regressions pass.
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 2:10 PM ET / 18:10 UTC. ClawSweeper reviewWhat this changesThe branch passes the admitted model catalog into native model selection and distinguishes Discord’s intentional captured reply from an ordinary invisible delivery so the picker retains its actual acknowledgement. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep this PR open for normal maintainer handling. The introduced changes repair two source-proven gaps in the Discord picker path without adding configuration or widening authority. Priority: P1 Review scores
Verification
How this fits togetherDiscord native commands enter the shared reply pipeline, which resolves a model choice and writes the session override before the Discord adapter presents the result. The dispatcher settles delivery outcomes and decides whether generic no-reply recovery is appropriate. flowchart LR
A[Discord model picker] --> B[Native command path]
B --> C[Admitted model catalog]
C --> D[Session override]
D --> E[Reply dispatcher]
E --> F[Discord acknowledgement]
E --> G[No-reply recovery]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -4, Tests +204. Total +200 across 14 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the focused owner-boundary repair once the normal exact-head merge gates confirm the complete check set. Do we have a high-confidence way to reproduce the issue? No independent reproduction was run in this read-only review; yes, the failure is source-reproducible because current main drops the prepared catalog before native selection and collapses intentional capture into an invisible result. Is this the best way to solve the issue? Yes. The branch carries the existing admitted snapshot through the native path and records the delivery distinction at the shared dispatcher rather than adding retries or extending timeouts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 10b2956f37c6. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…law#135382) * fix: preserve native model picker selections and replies Carry the admitted catalog into native commands and reuse completed capability facts. Preserve post-hook channel suppression through settlement so picker acknowledgements are not replaced by generic recovery. Reported-by: @Call44 (openclaw#133550). Reverified the existing openclaw#134731 repair from openclaw#135095 with an isolated Control UI click and reload. * fix: satisfy model picker delivery lint guards Narrow observed final-delivery promises before aggregation and avoid a shadowed test catalog binding. Targeted lint and 278 reply regressions pass.
Closes #133550. Related: #134731 (already fixed by #135095).
What Problem This Solves
Fixes an issue where Discord users selecting a model could hit the picker's timeout or see “No reply was generated” even though the chosen session model eventually persisted. Reported by @Call44.
The paired Control UI Ollama-row issue was already fixed by @obviyus in #135095 (
e4cf6f59756c28f5a9b26f0f7be786aa47fae032). This change does not duplicate that repair; a fresh browser click/reload check confirms it. Thanks to @BoatAngle for that report.Why This Change Was Made
The native-command fast path dropped the admitted model catalog while ordinary replies preserved it, forcing selection to rebuild catalog state. Forward the same snapshot and reuse completed, same-generation capability metadata before scoped discovery. The shared session-selection writer and its conflict/lock checks remain unchanged.
Discord intentionally captures the command's final reply after sending hooks so the picker can present it. Its suppression reason was lost at settlement, causing generic recovery to overwrite the real acknowledgement. Preserve that existing channel-owned suppression through the shared dispatcher; suppress recovery only when every queued final was intentionally captured. Real invisible results, hook cancellation, errors, and mixed outcomes remain recoverable. Hidden output is never counted as visible, and hooks are not bypassed.
User Impact
Discord picker choices apply promptly and display their actual success or rejection result. Native model selections reuse prepared catalog facts, including already-discovered thinking/input capabilities. No timeout increase, retries, new configuration, environment variables, schemas, protocol versions, or dependency changes.
Production: +61/-65 (net -4). Tests/test support: +225/-21 (net +204). Removed redundant private loader wrappers and consolidated duplicate outcome/count bookkeeping.
Evidence
Regression tests failed before the corresponding repairs: missing native catalog handoff, missing completed thinking/input metadata, and a spurious generic fallback after intentional post-hook capture. The ordinary invisible-result and mixed cancellation/failure controls passed before and after. The focused wrapper run passes 437 tests across shared selection, native replies, catalog projection, dispatch settlement, and Discord picker/plugin dispatch.
Real-flow proof used the built CLI, fresh isolated state, free loopback ports (never 18789), synthetic credentials, and a local Discord Gateway/REST fixture driving the actual native interaction handlers. No operator state or real Discord account was used.
The exact implicit/empty local-provider projection and remote/explicit-auth rejection variants remain covered by the catalog tests; the browser proof uses a configured isolated local route. Public Discord authentication/network latency is outside the synthetic-only proof.
The unrelated current-main TS7056 build blocker was repaired canonically in #135360 before this branch was refreshed. Runtime/UI rebuilds pass. One combined proof attempt had mismatched runtime/UI build identities due to concurrent builds; rebuilding the UI against the completed runtime identity resolved it, and the fresh UI replay passed. No production workaround was added.
The first CI run reported a shadowed test binding and an un-narrowed optional promise in aggregation. Both were corrected; targeted lint and 278 reply regressions pass after that follow-up.
Final post-lint runtime replay also passed: submit through
/statusconfirmation in 1,311 ms, with the same selection retained on a second/statusread after 20 seconds. The completed-catalog stage remained 1 ms.Independent Codex autoreview of the final committed branch: scoped-clean, no accepted/actionable findings. Exact-head CI and
openclaw/ci-gateare green. The two cancelled auxiliary workflows were rerun successfully. Native prepare/merge gates follow.Pre-land ClawSweeper review (final head, 17:51 UTC): no actionable correctness/security findings. Both requested next steps are addressed: the complete exact-head rollup and required gate are green, and this PR proceeds through the ordinary native review/prepare/merge workflow, not a separate repair lane. The full local
node scripts/check-changed.mjs --timedrun also passed. No Rank-up moves or safeguards are being skipped.NO-FOLLOW-UP: the useful nearby cleanup is already absorbed into the canonical catalog and outcome owners; no additional standalone refactor is justified by this repair.