Partition overridden Metro cache roots by app - #94
Merged
Conversation
janicduplessis
force-pushed
the
codex/issue-75-cache-root-segment
branch
from
August 29, 2026 04:52
b0bcb98 to
7502f4b
Compare
janicduplessis
marked this pull request as ready for review
August 29, 2026 04:53
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.
Description
STIM_CLI_METRO_CACHEand machine-levelcaches.metroCachecurrently bypass the app-name segment, causing configured roots to become one flat Metro store. This makes per-app reporting and pruning impossible.Closes #75.
Solution
@stim-cli/core,@stim-cli/metro, and the CLI's bare and Expo start paths.metro-named-v1layout marker. They replace only an exact unmarked legacy flat Metro record; if an older package registers that parent afterward, currentgcsuppresses it only when a marked child proves the migration. Marked stores are preserved when they later become another override parent and remain visible but report-only while a marked child exists. Canonical and symlinked child relationships are handled safely. Existing root-level files are left untouched for manual cleanup.Test plan
gc --delete --older-thansafety, and unrelated same-root/ancestor preservation.pnpm run format:check,pnpm run lint,pnpm run build,pnpm run typecheck,pnpm run knip,pnpm run test:runtime, andpnpm test(2,273 passing).pnpm run test:e2e(12 passing).--dry-run; no full native device build was performed.