fix(issue#3): cwd-first ROOT resolution + seeded benchmark + miss 지표 보정 - #5
Merged
Conversation
Issue #3 (by tak2-08 / Claude web 테스트) 참고하여 재현 → 패치: 1. init/index가 process.cwd() 대신 스크립트 위치에 파일을 쓰는 버그 - 재현 확인: 외부 디렉터리에서 init 실행 시 사용자 프로젝트는 빈 채로 원본 저장소의 agent-context/*.json이 덮어씌워짐 - 수정: 모든 도구(index/init/validate/search-lite/sessions/radio/handoff)가 cwd-first로 ROOT 결정 — cwd에 config 또는 contextRoot가 있으면 그곳, 없으면 스크립트 상대경로 폴백(소스 저장소 자기검사/CI용) - init은 항상 process.cwd()(또는 --target)에 스캐폴드, 절대경로 로그 추가 - 재검증: 외부 프로젝트에서 init/sessions/handoff 실행 → 사용자 프로젝트에만 생성, 원본 무오염 2. 벤치마크 재현성 - mulberry32 시드 RNG 도입, --seed 옵션(기본 42) - 동일 시드 2회 실행 diff = 일치 확인 (REPRODUCIBLE) - BENCHMARK.md 헤더에 시드 고정 명시 3. miss 쿼리 'saving 100%' 착시 수정 - hit=false인 경우 saving을 'n/a (miss)'로 표기 — 실패 검색을 절약으로 과장 제거 - avg saving은 히트 기준으로만 집계 4. 동시 쓰기 충돌 전략 문서화 (docs/sessions.md): inbox/threads는 경로 분리, md는 1 PR = 1 파일, index.json은 충돌 시 재생성 원칙 명시
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.
Closes #3
재현 → 패치 → 재검증
1. init이 스크립트 위치에 파일을 쓰는 버그 (재현 완료 후 수정)
node <clone>/tools/agent-context-init.mjs --yes실행 → 사용자 프로젝트 빈 채로 원본 저장소 오염 (제보와 동일)init.mjs: ROOT =process.cwd()(또는--target), 절대경로 로그index/validate/search-lite/sessions/radio/handoff: cwd-first ROOT 결정 — cwd에 config/contextRoot 있으면 그곳, 없으면 스크립트 상대 폴백(소스 저장소 자기검사·CI용)2. 벤치마크 재현성
--seed옵션 (기본 42)3. miss 쿼리 'saving 100%' 착시
n/a (miss)로 표기, avg saving은 히트 기준 집계4. 동시 쓰기 충돌 전략 문서화 (관찰 메모 반영)
docs/sessions.md: inbox/threads 경로 분리 · md는 1 PR=1 파일 · index.json은 충돌 시 재생성검증