fix(statusline): 세션별 캐시로 창 간 폴더명 오염 차단 - #1
Merged
Conversation
단일 전역 prev-status.cache 를 여러 Claude Code 창이 공유해, 한 창이 캐시를 쓰면 다른 창이 최대 5초간 남의 폴더·git 상태를 표시하는 오염이 있었다. 캐시 경로를 session_id 로 분리한다. session_id 는 jq 미설치 환경 대비 sed 로 파이프 JSON에서 추출하고, 1일 이상 지난 세션 캐시는 갱신 시점에 자동 정리한다. 🗿 MoAI <email@mo.ai.kr>
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.
문제
단일 전역
prev-status.cache를 모든 Claude Code 창이 공유 → 한 창이 캐시를 쓰면 다른 창이 최대 5초간 남의 폴더/git 상태를 표시하는 오염 발생.수정
makeWrapper()에서 캐시를prev-status.<session_id>.cache로 세션별 분리.session_id는 jq 미설치 환경 대비sed로 파이프 JSON에서 추출하고, 값이 없으면default폴백. 1일 이상 지난 세션 캐시는 갱신 시점에 자동 정리.lib/install.js(+12/-2)adopt.js도makeWrapper()를 호출하므로 자동 커버검증
npm test71/71 통과 (wrapper 회귀 테스트 포함)sh -n문법 통과🗿 MoAI email@mo.ai.kr