Skip to content

fix(hooks): resolve inbound claim conversation once per pair - #115491

Merged
vincentkoc merged 1 commit into
openclaw:mainfrom
xialonglee:fix/issue-114927-inbound-claim-pair
Jul 29, 2026
Merged

vincentkoc merged 1 commit into
openclaw:mainfrom
xialonglee:fix/issue-114927-inbound-claim-pair

Conversation

@xialonglee

@xialonglee xialonglee commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #114927

What Problem This Solves

A channel plugin's messaging.resolveInboundConversation() could be called twice while constructing one inbound_claim hook delivery. A stateful resolver could therefore produce different conversationId or parentConversationId values in the event and context.

Why This Change Was Made

The rewrite resolves the conversation once and constructs the event/context pair from that single result. The dispatch gatherer now consumes only the canonical pair builder; the obsolete separate claim event/context exports were removed instead of retaining duplicate internal paths.

The same invariant is covered both at the mapper boundary and through the real dispatch state rebuild path.

User Impact

Plugin authors receive consistent conversation identity in each inbound_claim event/context pair, including after media metadata rebuilds the hook state.

Evidence

Exact PR head: f59eb37952302bfbb9619a34b30dcc8dbf6ad90b

  • node scripts/run-vitest.mjs src/hooks/message-hook-mappers.test.ts: 26 passed.
  • node scripts/run-vitest.mjs src/auto-reply/reply/inbound-context.test.ts: 28 passed.
  • Focused dispatch binding tests: 2 passed.
  • Targeted format and oxlint checks passed.
  • git diff --check passed.
  • Fresh post-rebase autoreview found no actionable issues at 0.94 confidence.

Maintainer rewrite preserves the original contribution with a Co-authored-by trailer.

@xialonglee
xialonglee force-pushed the fix/issue-114927-inbound-claim-pair branch from a2243b2 to 58fd43e Compare July 29, 2026 02:41
@vincentkoc vincentkoc self-assigned this Jul 29, 2026
@vincentkoc
vincentkoc force-pushed the fix/issue-114927-inbound-claim-pair branch 2 times, most recently from db14d0a to d3e4d2b Compare July 29, 2026 06:59
@vincentkoc
vincentkoc force-pushed the fix/issue-114927-inbound-claim-pair branch from bc2502c to f59eb37 Compare July 29, 2026 08:08
@vincentkoc
vincentkoc merged commit 10c2073 into openclaw:main Jul 29, 2026
126 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 29, 2026
* origin/main:
  fix(zalo): stop provider startup after gateway shutdown (#115763)
  fix(agents): bound completed background process retention (#115760)
  fix(plugins): bound hook execution and retire stale registrations (#115695)
  fix(ui): collapse custodian startup error gap (#115720)
  fix(gateway): reload edited hook transforms (#107875)
  refactor: centralize channel streaming config hints (#115739)
  fix(msteams): finalize sent replies after dispatch (#82354)
  fix(cron): deliver explicitly configured failure alerts (#115762)
  fix(hooks): resolve inbound claim conversation once (#115491)
  refactor: retire legacy provider and secret paths (#115655)
  fix(memory): reject malformed QMD result entries (#115705)
  fix(diagnostics): keep internal thinking out of telemetry [AI] (#115261)
  fix(ui): localize remaining control surfaces (#115730)
  fix(gateway): prevent model owner mismatch after plugin activation (#115747)
  fix(agents): run reply hooks for restart recovery (#115711)
  fix(cron): initialize detached hook run sessions (#115765)
  fix(ios): keep stop available for staged voice notes (#115744)
  fix(doctor): preserve config includes during cleanup (#115723)
  fix(memory): keep dreaming consolidation within project scope (#115721)
  fix(discord): keep tool rows under verbose progress (#111947)

# Conflicts:
#	ui/src/pages/custodian/custodian-surface.ts
#	ui/src/styles/custodian.css
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
@xialonglee
xialonglee deleted the fix/issue-114927-inbound-claim-pair branch August 17, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: inbound_claim event and context use separate conversation resolutions

2 participants