Repository navigation
test: cover resume tool pairing and plugin note fan-out - #182
Draft
cursor[bot] wants to merge 1 commit into
Draft
cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
A missing middle tool result, a stray tool id, and a second assistant group must still resume as a valid transcript. A throwing before_llm_call must not drop a later note, and frozen settings arrays must stay frozen. Co-authored-by: moikapy <[email protected]>
This branch has not been deployed
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.
Risky behavior now covered
before_llm_callkeeps going after one plugin throws. An empty note and a non-string note are omitted. The surviving note is sent on that call only and is not written into history.pushinto the shared config.Test files updated
test/session_persist.test.tstest/plugin_host.test.tsWhy this reduces regression risk
Resume writes the transcript the next provider call will see. The existing tests covered a missing last call and a fully missing batch. They did not cover a hole in the middle, a stray id sitting in that batch, or a second assistant group followed by a dangling user. A bad index walk there sends the next turn an unpaired tool history.
Plugin notes are concatenated into one system message for a single model call. If a throwing hook stopped the fan-out, or an empty note was inserted, every later plugin's decision note would vanish or shift. Freezing only nested objects left arrays mutable, so a plugin could change settings shared with the next run.
No production code changed. Focused vitest (25) and
tsc --noEmitpassed. The full suite was not run; it still has known failures that spawnbunor needdist/.