Skip to content

fix(summary): origin/main과 같은 커밋의 detached HEAD에서 --write를 허용한다 - #116

Merged
hsleedevelop merged 3 commits into
mainfrom
ao/harness-aijient-team-plugin-11/summary-detached-head
Sep 27, 2026
Merged

hsleedevelop merged 3 commits into
mainfrom
ao/harness-aijient-team-plugin-11/summary-detached-head

Conversation

@hsleedevelop

Copy link
Copy Markdown
Contributor

Summary

  • summary --write가 detached HEAD에서 "브랜치 조회 실패"로 거부되던 결함 수정. branch --show-current의 빈 출력(detached)을 git 오류(error)와 같게 분류했기 때문이다 — 워커 워크트리의 머지 후 종결(feat(docs-version-drift-check): docs:check가 현행 문서의 버전 표지를 package.json과 대조한다 #114·fix(handoff): user handoff를 워크트리 로컬 파일로 — 병렬 PR 충돌 제거 #115)이 매번 임시 브랜치 우회를 요구했다.
  • branchState에 detached를 분리하고, 가드가 이를 비-기본 브랜치처럼 기존 isSyncedWithDefault(origin/HEAD 대상 정확한 커밋 동일성)로 판정한다. 근거는 synced 브랜치와 동일 — 로컬 커밋 0개라 원장 커밋이 기본 tip 위에 얹힌다.
  • 가드 의미 불변: 다른 커밋의 detached·origin/HEAD 없는 저장소의 detached·git 실패는 계속 거부(fail-closed). isSyncedWithDefault는 변경 없음.
  • done 가드는 브랜치를 조회하지 않아(status·log만) 영향 없음 — 머지 후 종결에서 실측 예정.

Tests

  • 재현 테스트 3건 추가(tests/summary.test.mjs): synced detached 허용(수정 전 실패 확인) · 다른 커밋 detached 거부 · origin/HEAD 없는 detached 거부
  • npm test 1072 pass / 0 fail, npm run docs:check 최신
  • codex 리뷰(diff 범위): P1·P2 없음, P3(주석 "Three outcomes") 반영 — artifact Reviews 기록

Risks

  • branch --show-current가 빈 출력을 내는 경우를 detached로 간주한다(rebase·bisect 중 포함). 이 경우도 synced가 아니면 거부된다.

🤖 Generated with Claude Code

hsleedevelop and others added 3 commits September 28, 2026 00:59
branch --show-current의 빈 출력(detached)을 git 오류와 같은 error로 분류해
워커 워크트리의 머지 후 종결이 매번 임시 브랜치 우회를 요구했다. detached를
별도 상태로 분리하고 비-기본 브랜치와 같은 isSyncedWithDefault 판정에 태운다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hsleedevelop
hsleedevelop merged commit d868e04 into main Sep 27, 2026
1 check passed
@hsleedevelop
hsleedevelop deleted the ao/harness-aijient-team-plugin-11/summary-detached-head branch September 27, 2026 16:04
hsleedevelop added a commit that referenced this pull request Sep 27, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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