fix: clear jiti cache on SIGUSR1 restart#11143
Closed
Bentlybro wants to merge 1 commit intoopenclaw:mainfrom
Closed
fix: clear jiti cache on SIGUSR1 restart#11143Bentlybro wants to merge 1 commit intoopenclaw:mainfrom
Bentlybro wants to merge 1 commit intoopenclaw:mainfrom
Conversation
TypeScript plugins compiled via jiti cache their output to disk. This cache persists across SIGUSR1 restarts, causing modified plugins to not take effect until the cache is manually cleared. Changes: - Configure jiti to use ~/.openclaw/cache/jiti instead of /tmp/jiti - Clear this OpenClaw-specific cache directory on SIGUSR1 restart - Export OPENCLAW_JITI_CACHE_DIR constant for shared access Using an OpenClaw-specific cache directory avoids affecting other processes that may share /tmp/jiti on the same system.
7916f83 to
6c0c0aa
Compare
bfc1ccb to
f92900f
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
3 tasks
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing due to inactivity. |
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.
Problem
TypeScript plugins compiled via jiti cache their output to disk. This cache persists across SIGUSR1 restarts, causing modified plugins to not take effect until the cache is manually cleared.
This is a footgun for anyone developing or modifying plugins — changes appear to not work, leading to confusion.
Solution
~/.openclaw/cache/jiti) instead of the shared/tmp/jitiThis ensures:
/tmp/jition the same systemChanges
src/plugins/loader.ts: ExportOPENCLAW_JITI_CACHE_DIRconstant and configure jiti to use itsrc/cli/gateway-cli/run-loop.ts: Clear the OpenClaw-specific cache directory on SIGUSR1 restartTesting