Skip to content

fix: deliver Bot questions before native Client answerers - #2593

Merged
DoodleBears merged 1 commit into
mainfrom
codex/2590-question-channel-projection
Oct 22, 2026
Merged

DoodleBears merged 1 commit into
mainfrom
codex/2590-question-channel-projection

Conversation

@DoodleBears

@DoodleBears DoodleBears commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2590 | Work claim

Why the change

Bot questions now appear in their conversation and remote Activity instead of waiting inside a generic Host client without an answerable Channel card.

Special things to note

  • Merge risk: two-way door — revert this commit; medium blast radius — native PersonaBot question routing. Review the existing exact live-Agent and Session Ownership checks, preserved fallback for unowned requests, and the same native answer continuation. No schema, CLI contract or admission change.
  • Verified 27 targeted tests, including a real Cordis dispatch regression that failed before the fix; lint, formatting, typecheck, build, both release ledgers and feature-map checks pass. Real macOS Chromium with two isolated Hosts and direct DeepSeek V4.1 Flash rendered the question, accepted Light from remote Activity, persisted the remote resolution and produced ANSWER_QA: Light; the local Host had no matching Channel and its Channel IDs were unchanged. Exact-head applicable CI passed, including three affected-test shards, mobile verification, docs build and isolated Host smoke; CodeRabbit completed with no inline findings. Skipped jobs are not native device acceptance. Native iOS/Android acceptance remains separate.
  • Task codex/local/01a16230-879c-7ea2-bdc1-9f65f57a031a. This is a short event-registration ordering fix, fully shown below; no separate HTML explainer is needed. This PR does not authorize merging or publishing 1.5.0.

Change outline

The native question service already validates the live root and emits a waterfall. Let the existing application Channel owner handle its own questions before a generic answerer can wait on them:

 native user-questions/request
- earlier generic Client answerer waits; Channel owner never receives the request
+ Channel owner first: retain ownership/liveness checks, commit card, await answer
+ unowned request: call next() and preserve native fallback

The registration uses prepend: true, matching existing Channel approval routing. Regression coverage exercises the real dispatcher, durable card/answer and unowned/non-live fallback. The AX guide records the diagnosed ordering trap, and the remote journey now checks questions while the owning Host’s ordinary Web Client is open.

Real desktop evidence — Chinese/light, 1440 × 1000

Base cd38a528eff629611977eb80133e5aaae2e4b82c; after uses this head’s formal build with no diagnostic probes. Separate fresh Bots run the same Light/Dark task to distinguish a new call from recovery of an old pending call; their names/avatars and roster therefore differ. Synthetic names only; selected images were visually reviewed and contain no private identifiers. Provenance.

Before: the real model is waiting in its native tool, but the Channel has no question card.

Before: native question has no answerable Channel card

After: a fresh real question exposes Light/Dark choices.

After: the remote Channel renders the real question choices

Answer: selecting Light in remote Activity resumes the Bot and produces its real reply.

Remote Activity answer resumes the Bot with ANSWER_QA Light

Issue: #2590

Agent-Task: codex/local/01a16230-879c-7ea2-bdc1-9f65f57a031a
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3e311931-310f-4456-99a3-e9c79f4cad92
📥 Commits

Reviewing files that changed from the base of the PR and between c9e7ae6 and 905e295.

⛔ Files ignored due to path filters: 3
  • .github/pr-screenshots/2590/after.png is excluded by !**/*.png
  • .github/pr-screenshots/2590/answer.png is excluded by !**/*.png
  • .github/pr-screenshots/2590/before.png is excluded by !**/*.png
📒 Files selected for processing: 9
  • .agents/skills/dsh-dev/SKILL.md
  • .agents/skills/dsh-plugin-dev/CHANGELOG.md
  • .agents/skills/dsh-plugin-dev/CHANGELOG.zh.md
  • .agents/skills/verify-deepseekbot/features/remote-hosts.md
  • .github/pr-screenshots/2590/README.md
  • changes/2590-question-routing.md
  • packages/core/src/channels/user-questions.ts
  • packages/core/src/plugin.ts
  • packages/core/test/user-questions.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📝 Walkthrough

The core plugin now registers a prepended user-questions/request handler through registerChannelUserQuestions. The handler asks the Channel question owner first and calls next() when the request is unanswered. Tests cover owned live callers and fallback for unowned or inactive callers. Supporting documentation describes the routing and verification.

Changes: Channel Question Request Routing

Layer / File(s) Summary
Register and verify Channel question routing
packages/core/src/channels/user-questions.ts, packages/core/src/plugin.ts, packages/core/test/user-questions.test.ts, .agents/skills/dsh-dev/SKILL.md, .agents/skills/verify-deepseekbot/features/remote-hosts.md, .agents/skills/dsh-plugin-dev/CHANGELOG*, .github/pr-screenshots/2590/README.md, changes/2590-question-routing.md
The core plugin registers the prepended Channel question handler. Tests cover handling by the Channel owner and fallback to a later answerer. The guides, changelogs, screenshot notes, and release notes document the routing and verification.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant Context
  participant ChannelUserQuestions
  participant NativeAnswerer
  Caller->>Context: Send user-questions/request
  Context->>ChannelUserQuestions: Ask about request
  alt Channel question owner answers
    ChannelUserQuestions-->>Context: Return answer
    Context-->>Caller: Resolve request
  else Channel question owner returns undefined
    ChannelUserQuestions->>Context: Call next()
    Context->>NativeAnswerer: Pass request onward
  end
Loading

Possibly related issues

  • BotHarness/DeepSeekBot#2590: The issue describes native ask_user_question calls without an answerable Channel or remote Activity card. This change lets the owning Channel handle its questions before a native answerer.
Merge Risk: ⚪ Minimal · up to 905e2

No identified issue blocks merging the question-routing change after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (6 skipped: 6 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: delivering Bot questions before native Client answerers can consume them.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description follows the required structure. It explains the problem, links the issue, states merge risk, documents automated and runtime verification, includes the change outline, and…
Full details: Description check

Explanation

The pull request description follows the required structure. It explains the problem, links the issue, states merge risk, documents automated and runtime verification, includes the change outline, and provides rendered before/after/answer evidence. It does not explicitly state whether the CI plan selected affected, full, or none, but the reported affected-test shards provide substantial verification context.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DoodleBears
DoodleBears merged commit 87724a3 into main Oct 22, 2026
12 checks passed
@DoodleBears

Copy link
Copy Markdown
Contributor Author

Merged-main regression passed on frozen 87724a3b58d556807ef1ba860adcbb96bda6d92f: real direct DeepSeek ask_user_question with the owning Host's ordinary Client open appeared in the remote Channel/Activity, actual Activity Light answer committed the owning resolution and resumed the Bot to ANSWER_QA: Light; local Host Channel IDs unchanged. Build and authenticated Host checks passed. Native iOS remains independently queued. Private receipt candidate-question-result.json and screenshots47/49 retained in the release archive index; both test Hosts/browser stopped after the round.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant