Repository navigation
Conversation
…닌 운영 오류로 안내 (#57 #58) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011H9PaY448m3DkzzBNW1n5n
This was referenced Oct 28, 2026
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 #57
Fixes #58
#57 — accept 검사가 다시 쓴 추적 산출물이 작업 브랜치에 커밋됨
원인:
harness/lib/integrate.js의 acceptcheckHere는 판정이fail이면(시간 초과 포함)commitInto(task, P.wt, 'checks after bringing target up to date')로 worktree 의 변경을 전부 커밋한다. 검사가 추적되는outside_git_ok산출물을 다시 쓰면, 그 파일이 작업 브랜치에 들어간다. 사용자가 메인 체크아웃에서 시험을 돌려 같은 파일이 바뀌어 있으면, 다음 accept 는uncommitted changes … touch files this task changed로 거절된다.수정: 검사를 한 번 돌릴 때마다
G.restoreOutsideOk(P.wt)가outside_git_ok패턴에 맞는 추적 파일 변경을git checkout -q HEAD -- :(literal)<path>로 되돌린다. 되돌린 경로는 작업 로그에restored_after_checks로 남긴다. 추적되지 않은 파일과 무시된 파일은 건드리지 않는다. 검사 직전에 'uncommitted work before accept' 커밋을 하므로, 검사 뒤에 남은 변경은 검사가 만든 것이다.재현 테스트:
tests/unit/test_v5_thin.jsTH-13. 검사가gen/stamp.txt(추적되고outside_git_ok로 선언된 파일)를 다시 쓰고 회귀로 실패한다.["gen/stamp.txt","src/app.js"]다.["src/app.js"]만 남고, 되돌림이 기록된다.#58 —
git add -A가 남은index.lock때문에 실패하면 하네스 결함으로 기록됨원인:
commitAll은 잠금 오류에 백오프(약 6초)로 다시 시도한다. 그 뒤에도 잠금 파일이 남아 있으면GIT_FAILED로 던진다.cli.js는GIT_FAILED를 예기치 못한 예외로 보고 하네스 결함 보고(record(root, 'cli', e))를 만든다. 사용자는 무엇을 하면 되는지 안내를 받지 못한다. 스택(integrate.js:237)은 accept 의 'uncommitted work before accept' 커밋이다. 잠금이 왜 남았는지는 보고만으로 알 수 없다(편집기, 다른 세션, 강제 종료된 git 등). 메인 체크아웃 병합 경로는 #20 에서 이미 같은 안내를 하고 있다.수정:
git.js의fail()이 git 오류에서Unable to create '<…>.lock': File exists를 알아보면 코드를GIT_LOCKED로 하고, "<경로>is left over; if no git command is running (editor, another session), delete that file and run the command again" 을 덧붙인다.cli.js는GIT_LOCKED를LOCK_HELD처럼 운영 오류로 보고 결함으로 기록하지 않는다. 잠금 파일을 하네스가 지우지는 않는다(#20 과 같은 정책).재현 테스트:
tests/unit/test_v5_integrate.jsIN-18b..git/index.lock을 남겨 두고commitAll을 부른다.GIT_FAILED, 안내 없음.GIT_LOCKED, 잠금 경로와 안내가 나오고 커밋은 없다.검증
node tests/run.js→ 1052 PASS / 0 FAIL, 종료 코드 0. 이 클라우드 환경에서는GH_TOKEN/GITHUB_TOKEN을 지우고 돌렸다(BR-15·16 이 로그인 없음을 가정한다. fix: factory 통합 worktree 의 검사가 바꾼 추적 파일을 되돌려 카드 병합 실패·재실행을 막는다 (#51) #52·fix: 검사 자손이 출력 파이프를 붙들어도 결과를 낸다 · 등록만 지워진 worktree 폴더 정리와 이어받기 안내 (#53 #54) #55 와 같다).harness/)을 stash 로 되돌리면 TH-13·IN-18b 가 실패하는 것을 확인했다.적대적 검토
outside_git_ok에 맞는 추적 파일만 되돌린다. 작업이 커밋한 내용은 HEAD 에 있으므로 영향이 없다. 이름 바뀜 항목(orig)은 건드리지 않는다.GIT_LOCKED: 다른 곳에서GIT_FAILED코드를 비교하는 코드는 없다(grep). 메시지 앞부분(git … failed (code): …)도 그대로다. Windows 에서도 git 은'C:/…/index.lock'형식으로 출력하므로 같은 정규식에 맞는다. 셸을 거치지 않는다.Generated by Claude Code