fix(core): update recorded prompt cache key - #41307
Merged
Merged
Conversation
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.
What
Restores the recorded
SessionRunnerLLMtest by updating its OpenAI Chat cassette for the prompt cache key now sent by the runner.Before / After
Before:
6f3a3600b904c6a14c01e7e675acf435de0150c1began forwardingLLMRequest.promptCacheKeyasprompt_cache_key. The session runner supplies its session ID, but the existing cassette was recorded without that field. Replay rejected the request as a mismatch and the session drain waited until Bun's 5-second test timeout.After: the cassette includes
prompt_cache_key: "ses_runner_recorded", matching the production request shape and allowing the recorded response to complete the drain.How
packages/core/test/fixtures/recordings/session-runner/openai-chat-streams-text.jsonwith the request field introduced by the culprit commit.packages/ai.Scope
This PR only fixes the recorded transport regression. The independent
LocationServiceMaptimeout and TUI CI races are being handled separately.Testing
cd packages/core && bun typecheckpasses.cd packages/core && bun run test test/session-runner-recorded.test.tspasses: 2 tests, 0 failures.cd packages/core && bun run testpasses the recorded runner test. The full suite still reports the independentLocationServiceMap > keeps flush open while later hot reload runstimeout and the documented local-onlyPluginSupervisor config > logs invalid packages and continues loadingfailure caused by global user plugins.