Repository navigation
refactor: keep sticky fallback reset in test support - #183580
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Contributor
Author
|
Simplified: the sticky fallback reset now lives in test support while preserving the existing cache and reset behavior. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 26, 2026
Keeps sticky fallback test cleanup in test support while preserving the process-global cache and its lifecycle.
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 Problem This Solves
The sticky model-fallback reset is test infrastructure, but it is currently exported from the production cache owner solely so test cleanup can reach it.
User Impact
There is no user-visible behavior change. Sticky fallback selection, expiration, capacity limits, recording, and close/restart cleanup remain unchanged, while tests keep the same per-test and same-session isolation.
Why This Change Was Made
This moves the reset into a narrow test-support module. The helper observes the existing process-global map through its established symbol key and clears that map only when it already exists, so it neither creates another cache nor registers another lifecycle owner.
Both existing consumers now import the test-support owner. Their reset calls and ordering are unchanged, including the fallback transcript suite's explicit mid-test reset and the global runtime cleanup hook.
Evidence
run-entry.fallback-transcript.test.ts: 15/15 tests passed; the explicit reset still makes the next same-session run start from the primary model.setup-openclaw-runtime.plugin-cache.test.ts: 2/2 cleanup-owner tests passed.