Repository navigation
Conversation
… 문맥을 싣는다 (#91 #93) - status.js: 무시된 파일 때문에 worktree 를 남길 때 --force 대신 그 경로로 `git worktree remove "<wt>"` 를 권한다(guard 가 --force 를 막는다). - lang.js: UserPromptSubmit 에서 세션 기록 잠금이 시간 초과여도 기록 실패만 남기고 이번 턴의 한국어 규칙 문맥은 그대로 싣는다. - 회귀 테스트: IN-13b(test_v5_integrate) · [lang][#93](test_v5_hooks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011H9PaZCKkCxWUCPX6Y1vGw
Owner
Author
|
v7.1.0(#104)에 v7.1 원본에 맞춰 옮겨 반영했습니다 — 이 PR 은 옛 기점(v7.0.x 이전)이라 닫습니다. |
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.
Fixes #91
Refs #93 (부분 수정. 잠금이 오래 잡히는 근본 원인은 사람이 판단해야 합니다. 아래 참고)
#91: gc 안내와 guard 가 어긋남
원인:
harness/lib/status.js:257ignoredWhy는 무시된 파일이 바뀐 worktree 를 남기면서git worktree remove --force를 권했습니다. 그런데harness/hooks/guard.js:734는worktree remove에--force가 붙으면 항상 막습니다. 이미 accept 된 레인이라cancel도 쓸 수 없어서, 사용자는 안내대로 할 방법이 없었습니다.수정: 안내를
git worktree remove "<그 worktree 경로>"(--force없음)로 바꿨습니다. 이 경우 남은 것은 무시된 파일뿐이므로 git 이 그대로 지웁니다. 추적 파일이나 추적되지 않은 파일에 변경이 남아 있으면 git 이 거절하므로 안전합니다. 이 안내는 gc · accept · batch 가 모두 같이 씁니다(removeIfSafe).재현 테스트:
tests/unit/test_v5_integrate.js[IN-13b][#91](IN-13 시나리오를 이어서 씁니다)--force없이 그 worktree 경로로git worktree remove "…"를 권하는지 봅니다.guard.decide가 통과시키고, 같은 명령에--force를 붙이면 막는지 봅니다.--force이고 경로가 없습니다).#93:
session lock timeout때문에 lang 훅이 그 턴의 언어 규칙을 놓침확인한 것: 세션 기록 잠금(
<sid>.json.lock)을 다른 프로세스가 쥐고 있을 때lang.jsUserPromptSubmit 을 실행했습니다. 그러면 5초(LOCK.waitMs) 뒤acquireLock(harness/hooks/_common.js:112)이 던집니다. 스택은 이슈와 같습니다. 이 예외는main의 catch 로 넘어가서, 그 턴에 덧붙여야 할 한국어 규칙 문맥(additionalContext)이 출력되지 않습니다. 훅은 열린 채(허용) 끝나므로 사용자에게는 아무것도 보이지 않고, 답이 영어로 나올 수 있습니다.수정:
lang.js는updateSession실패만 잡아서hook-errors.log에 남깁니다. 그 뒤 문맥은 그대로 냅니다. 기록(user_lang)은 이번 턴에 갱신되지 않지만, 이전 턴에 쓴 값은 남아 있습니다.재현 테스트:
tests/unit/test_v5_hooks.js[lang][#93](잠금 폴더를 미리 만들어 둡니다)session lock timeout이 남습니다.다루지 않은 것(사람 판단 필요): 왜 Windows 에서 잠금이 5초 넘게 잡혀 있었는지는 이 클라우드에서 재현할 수 없습니다. 임계 구역은 JSON 하나를 읽고 쓰는 것뿐입니다. 가능한 원인은 두 가지입니다.
staleMs10초)보다 먼저 포기합니다.waitMs/staleMs를 조정하는 것은 설계 결정이라 바꾸지 않았습니다. 기록 실패는 계속 로그에 남으므로, 같은 서명의 자동 보고는 계속 올 수 있습니다.검증
node tests/run.js→ 1107 PASS / 0 FAIL, 종료 코드 0.GH_TOKEN/GITHUB_TOKEN을 지우고 돌렸습니다. BR-15·16 이 로그인 없음을 가정하기 때문이며, 이전 PR 들과 같은 방식입니다.harness/만 stash 로 되돌려서 IN-13b(2개) ·[lang][#93](1개)가 실패하는 것을 확인했습니다.적대적 검토
JSON.stringify는 쓰지 않았습니다. Windows 경로의 백슬래시가 두 배로 늘어나기 때문입니다. bash · PowerShell 에서 모두 그대로 쓸 수 있습니다.--force를 빼서 오히려 더 보수적이 됐습니다. 추적 파일이나 추적되지 않은 파일에 변경이 있으면 git 이 거절합니다.Generated by Claude Code