Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR limits built-in ask_user to declared question-capable channels and retires bundled question reactions while preserving the public SDK. Example: An owner in a WhatsApp DM asks the agent to choose between options A and B.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: current main still lacks this capability gate, both prior findings are addressed, and the latest exact-head CI gates pass; no new actionable defect was found. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherConversation capability preparation combines the inbound channel declaration with existing session and tool policies to produce the agent's available tools; supported questions continue through the existing Gateway question and delivery owners. flowchart TD
A[Inbound conversation] --> B[Channel question capability]
B --> C[Prepared conversation profile]
C --> D[Tool catalog and policy]
D --> E[Gateway question runtime]
E --> F[Native controls and answers]
D --> G[Ordinary text conversation]
Technical reviewBest possible solution: Retain the shared capability gate across all catalog paths, preserve shipped SDK contracts, and keep native harness delivery work separate. Do we have a high-confidence way to reproduce the issue? The affected-release report supplies a concrete WhatsApp failure, and source confirms main still offers ask_user without this channel gate; no runtime reproduction was executed during this read-only review. Is this the best way to solve the issue? The implementation follows the recorded product decision, uses one capability owner, completes the previously missing catalog propagation, and avoids unnecessary SDK removal. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 08be5ab0bf48. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -365, Tests -329, Docs +40. Total -654 across 42 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed October 16, 2026, 1:29 AM ET / 05:29 UTC (Revision 4). |
Prepare question input capability from the inbound channel for coding, Gateway, and skill tool catalogs. Retire bundled question reactions while retaining approval handling and shipped SDK compatibility. Document supported surfaces and add catalog regressions. Fixes openclaw#161445. Related: openclaw#167469; native Claude questions remain separate. Co-authored-by: Jacob Tomlinson <[email protected]>
Move the real-plugin question catalog regression into the shared channel contract suite. Retain the shipped question SDK unchanged and document compatibility without expanding the deprecated-export ratchet.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* fix(agents): gate ask_user by channel capability * test(channels): keep question catalogs within public contracts Move the real-plugin question catalog regression into the shared channel contract suite. Retain the shipped question SDK unchanged and document compatibility without expanding the deprecated-export ratchet. * test(channels): load question catalog fixtures through public artifacts * test(channels): collect question catalogs in the existing contract suite * test(imessage): restore real timers before database cleanup --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Jacob Tomlinson <[email protected]>
Fixes #161445
Fixes #167469
Related: #111470
What Problem This Solves
ask_usercan start a question on a channel that cannot reliably deliver or complete it: WhatsApp DMs fail withREPLY_DISPATCH_DELIVERY_ERROR, and Mattermost turns can wait on an unseen question.User Impact
Eligible primary sessions retain structured questions on WebChat/native OpenClaw clients, Discord, Slack, and Telegram. On Mattermost, iMessage, Signal, WhatsApp, and undeclared channels, the agent asks in ordinary plain text. Explicit tool denial still wins. Approval reactions remain unchanged.
Peter's product decision is to gate built-in
ask_userby declared native question input and retire bundled question-reaction fallbacks. This addresses the built-inask_userfailure reported in #167469 by omitting the tool from Mattermost. The separate native ClaudeAskUserQuestionpath also mentioned in that report bypasses this catalog and remains outside this fix.Why This Change Was Made
The conversation capability owner resolves
questionInputModeonce from the authoritative inbound channel. Coding tools, Gateway catalogs, and skill dispatch carry that fact into registration; a supported fallback provider cannot enable questions on an unsupported inbound surface.Bundled question-reaction adapters and obsolete tests are removed. The reaction SDK factory and members shipped in stable v2026.9.8 remain unchanged for third-party compatibility, with no removal date. The only additive SDK contract is optional
agentPrompt.questionInputMode: "buttons", documented on the existing channel adapter; no new named export is needed.Docs name the supported surfaces and explain plain-text questions elsewhere. A nearby CI fixture defect is also fixed: the final iMessage self-chat test left fake timers active during asynchronous database teardown. One file-level cleanup hook now replaces two incomplete per-suite hooks, without changing assertions or timeouts. No schema, retention, or new deferred side effect is introduced.
Original fix by @jacobtomlinson; maintainer cleanup reconciles current main, completes direct-catalog propagation, preserves shipped SDK contracts, and updates docs and regression coverage.
Evidence
Exact-head PR CI completed successfully on attempt 2 for
c6443b005a44f4679d6257f2b5213ad3d586c217, after merging maind372cddb9f: 59 jobs passed and 27 were skipped. The previously failing Slack shard and aggregate gate passed on the latest attempt. PR CI is the test and typecheck gate per maintainer policy. Local tests, local typechecks, negative controls, live Gateway proof, and remote leases were intentionally skipped.ask_user channel catalogsinchannel-catalog.contract.test.ts: ten cases using real bundled declarations through the existing public-artifact loader; supported/unsupported channels, authoritative inbound selection, and explicit denial.gates ask_user in the $messageProvider catalog (deny: $deny): three real Gateway catalog cases.gates ask_user on the inbound $message.surface surface (deny: $deny): four real skill-dispatch cases, including unknown inbound surface with a supported provider.publishes the prompt through Bot API and completes after the answer, cached-question authority, and approval-reaction/partial-delivery tests.Changed-file core
oxlint,oxfmt, andgit diff --checkpassed. The temporary lint config preserved every applicable core rule and omitted only an unmatched UI-only Solid override whose dependency was absent from the supplied install. Docs sanity passed on all ten changed pages. Full isolated Codex autoreview and each subsequent repair review were scoped-clean through P2.Prior-head CI exposed and guided three repairs: use the public-artifact loader in an existing collected contract suite; retain SDK exports without increasing the deprecated-export ratchet; restore real timers before iMessage teardown. No baseline, assertion, or timeout was weakened. Current-head CI passed all 18 tests in
channel-catalog.contract.test.ts, including the ten-case matrix, in a 52.50s shard (76% transformation, 16% tests). Production/test typechecks, lint, docs, baseline, boundary, and the previously failing iMessage shard passed. Earlier CI also ran the retained Telegram round-trip in 8.330s and passed the four new skill-dispatch cases; those timings are prior-head evidence.ClawSweeper's direct-catalog and shipped-SDK findings are addressed. Its Mattermost support concern is superseded by the product decision above. Live-proof-only requests are superseded by the maintainer proof policy.
Exact numstat against merged main: production +50/−415 (−365), tests +129/−458 (−329), docs +75/−35 (+40); total +254/−908 (−654) across 42 files. The 17 new catalog cases add no timers, sleeps, network calls, or test-only production seams.
Earlier CI failure: attempt 1's job 116812813808,
checks-node-changed-extensions-bundle-1-1, failedextensions/slack/src/monitor/provider.auth-test-token.test.ts/does not use a user-token identity as the bot mention targetwithStateDatabaseAccessError: ... is undergoing offline maintenance; retry when it finishes.The coordinator diagnosed a test-state flake; the PR's only Slack change is the declarativequestionInputMode: "buttons". The failed job was rerun, and the same exact-head shard passed on attempt 2. This is a successful retry, not a claim that the flake itself was repaired. The current-head security-sensitive review status is successful; no approval command was posted.Feishu #111470 is related: its undeclared surface is gated, but this PR does not claim to repair Feishu choice-card delivery.