Skip to content

fix(setup): record install-source repo path for self-update (#958) - #977

Merged
jinon86 merged 2 commits into
mainfrom
fix/setup-records-repo-path
Aug 6, 2026
Merged

fix(setup): record install-source repo path for self-update (#958)#977
jinon86 merged 2 commits into
mainfrom
fix/setup-records-repo-path

Conversation

@jinon86

@jinon86 jinon86 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

문제 (#958)

ccc-self-update.shresolve_repo() 최종 폴 back이 $HOME/ccc-node인데, 12노드 중 8노드의 실제 서빙 체크아웃은 /opt/ccc-node — 설치 원본 경로가 어디에도 기록되지 않아 매 실행이 abort reason=no-repo(조기 abort라 notify도 없음). 2026-08-05 노드별 수동 오버라이드로 임시 해소했으나 신규 노드·재설치 시 재발.

수정

  • setup.sh가 설치 시점에 자기 repo 경로($SRC)를 ~/.claude/self-update.repo에 기록 (resolve_repo 우선순위: env > 이 파일 > 스크립트 위치 추론 > ~/ccc-node)
  • 파일은 operator-owned: 동일 값이면 no-op, 다른 값이면 보존 + WARNING(setup은 운영자 상태를 몰래 덮어쓰지 않음), dry-run은 기록 안 함

검증

  • setup.test.sh 3건 추가(총 76 pass): 기록 확인 / 다른 체크아웃에서 재실행 시 오버라이드 보존+경고 / dry-run 미기록
  • bash -n clean

후속 효과: 다음 전노드 self-update 사이클에서 setup.sh가 각 노드에 올바른 경로를 자동 기록 — 8노드의 수동 오버라이드는 동일 값이라 no-op으로 흡수됨(gongmyoung처럼 의도적 다른 값은 보존).

Closes #958

resolve_repo() falls back to $HOME/ccc-node, which does not exist on
the 8 nodes serving from /opt/ccc-node — ccc-self-update aborted
no-repo on every tick until hand-written ~/.claude/self-update.repo
overrides were dropped in, and every new node/reinstall would hit the
same trap.

setup.sh now records its own repo path ($SRC) into
~/.claude/self-update.repo at install time. The file stays
operator-owned: an identical entry is a no-op, a differing entry is
preserved with a warning (setup never silently rewrites operator
state), and dry-run writes nothing.

Closes #958
@jinon86
jinon86 requested a review from seoseo-ai as a code owner August 6, 2026 01:57

@seoseo-ai seoseo-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after explicit operator authorization using the local seoseo-ai credential.

@jinon86
jinon86 merged commit 67fb440 into main Aug 6, 2026
8 checks passed
@jinon86
jinon86 deleted the fix/setup-records-repo-path branch August 6, 2026 02:38
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.

self-update: resolve_repo()가 설치 원본 경로를 모른다 — /opt 체크아웃 8노드에서 abort

2 participants