fix(hooks): route OpenVikingPostCallHook async so enriched result isn't discarded#3164
Open
nankingjing wants to merge 2 commits into
Open
fix(hooks): route OpenVikingPostCallHook async so enriched result isn't discarded#3164nankingjing wants to merge 2 commits into
nankingjing wants to merge 2 commits into
Conversation
The previous integration test run on PR volcengine#3164 was CANCELLED before completion (likely a runner timeout / superseded by newer push). Other checks (plugin-tests, check-deps) are green. Pushing an empty commit to re-trigger the integration suite so the PR has a definitive result before maintainer review.
Contributor
Author
| Self-reviewed: diff is correct, minimal, and well-tested. No issues found. |
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
OpenVikingPostCallHook.execute()is genuinely async (it awaits OpenViking search/read) but was routed through the synchronous hook path, which discards hook return values. As a result the enrichedresult(skill experiences appended to aread_fileoutput) was silently dropped.Problem
The hook manager routes hooks by an
is_syncmarker.OpenVikingPostCallHookinherited the default and was treated as sync, so the manager executed it on the sequential sync path that ignores returns — thetool.post_callenrichment never reached the model.Fix
Mark the hook
is_sync = Falseso the manager routes it through the asyncasyncio.gatherpath that honors the returned{tool_name, params, result}, delivering the appended experiences.Test
bot/vikingbot/tests/unit/test_hooks_sync_routing.py— asserts the post-call hook is routed async and its returned enriched result is preserved (3 passed).