fix(reply): prefer provider over surface for run channel fallback#31880
Merged
steipete merged 1 commit intoopenclaw:mainfrom Mar 2, 2026
Merged
Conversation
Contributor
Greptile SummaryThis PR fixes a bug in queued run setup where Key changes:
Impact: Confidence Score: 5/5
Last reviewed commit: 9d61044 |
14 tasks
9d61044 to
d60e17c
Compare
d60e17c to
c7ff32c
Compare
Contributor
|
Landed via temp rebase onto main.
Thanks @liuxiaopai-ai! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
messageProviderfallback usedSurfacebeforeProviderwhenOriginatingChannelwas missing.Surface=webchatwhile the active channel is still Feishu, causing embedded runs to be mislabeled and downstream channel behavior to drift.Provider -> Surfaceinget-reply-run, and added a regression test forProvider=feishu+Surface=webchat+ missing origin metadata.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
OriginatingChannelno longer fall back towebchatwhen context hasProvider=feishuandSurface=webchat.Security Impact (required)
No)No)No)No)No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
OriginatingChannel.ctx.Provider="feishu"andctx.Surface="webchat".followupRun.run.messageProvider.Expected
messageProviderresolves tofeishu.Actual
webchat.feishu.Evidence
Human Verification (required)
pnpm test src/auto-reply/reply/get-reply-run.media-only.test.ts src/auto-reply/reply/agent-runner-utils.test.tsprefers Provider over Surface when origin channel is missing.uses inbound origin channel for run messageProvider).Compatibility / Migration
Yes)No)No)Failure Recovery (if this breaks)
src/auto-reply/reply/get-reply-run.tssrc/auto-reply/reply/get-reply-run.media-only.test.tsmessageProviderunexpectedly reverting towebchatin Feishu relayed contexts.Risks and Mitigations
Surface-first fallback might observe different inferred provider when origin metadata is missing.