Skip to content

fix(codex): index 링크 상대경로를 플랫폼 무관하게 (AGT-4878) - #914

Open
unohee wants to merge 1 commit into
mainfrom
fix/agt-4878-codex-index-relpath
Open

unohee wants to merge 1 commit into
mainfrom
fix/agt-4878-codex-index-relpath

Conversation

@unohee

@unohee unohee commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

무엇

  • updateIndex의 링크 경로를 summaryPath.replace(CODEX_DIR + '/', '') 대신 새 indexLinkPath()로 만든다: path.relative(codexDir, summaryPath) 후 구분자를 /로 바꾼다. 테스트용으로 path 구현을 주입할 수 있다.
  • 세션 요약의 [Detail Record] 링크(relativeDetailPath)도 join 대신 posix.join을 써 Windows에서 \가 들어가지 않게 했다.

왜

구분자가 \이거나 CODEX_DIR 끝에 슬래시가 붙으면 문자열 치환이 실패해 index.md 링크에 절대경로가 그대로 들어갔다.

검증

  • 새 테스트 src/memory/codexIndexLink.test.ts 4건: path.win32 경로, trailing slash가 붙은 POSIX/Windows CODEX_DIR, 기본(native) 경로 모두 2026-11/...md 같은 POSIX 상대 링크.
  • vitest run src/memory 16 파일 116 테스트 통과, tsc --noEmit -p tsconfig.check.json 통과, oxlint 0건.

Linear: AGT-4878

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant