fix(dsh-plugin): run profile and recall in parallel on pre-step - #4643
Merged
ZaynJarvis merged 1 commit intoSep 4, 2026
Merged
Conversation
agent/pre-step currently gates user/message push in dsh-agent-loop. Overlap profileMessage and recallMessage to cut waterfall wall time. Related to volcengine#4515.
Contributor
|
Verified the parallelization is behavior-safe on all three fronts I could check statically:
Two notes:
Nice, surgical fix for #4515's waterfall cost. |
Contributor
Author
|
Thanks @now-ing — added a rendezvous-style test on this head:
Abort-semantics note acknowledged (wasted in-flight recall on abort is an accepted trade for the latency win). |
skloxo
pushed a commit
to skloxo/OpenVikingStudio
that referenced
this pull request
Sep 4, 2026
…engine#4643) agent/pre-step currently gates user/message push in dsh-agent-loop. Overlap profileMessage and recallMessage to cut waterfall wall time. Related to volcengine#4515.
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
agent/pre-stepindsh-memory-pluginawaitedprofileMessagethenrecallMessagesequentially. That waterfall still runs beforedsh-agent-loopappendsuser/message(#4515), so serial OV work adds avoidable latency to the blank chat window.Run profile + recall concurrently via
Promise.allafternext()(ensureStateis already single-flight safe).This is a mitigation inside OpenViking's plugin; a complete UX fix still needs
dsh-agent-loopto pushuser/messagebefore the pre-step waterfall.Related to #4515
Test plan
node --test examples/dsh-memory-plugin/index.test.mjs