Repository navigation
feat(termux-worker): owner decisions 1/3/4 — opt-in file, identity-lib stale, dry-run smoke (#2791) - #2933
Merged
Conversation
…rvise loop stale (#2791) Owner decision 2026-11-27 (3): the supervise script sources lib/a2a-supervisor-identity.sh at start-up, so for kind=supervise the installed time is the latest of the script and that lib (each max(mtime, ctime)). When the lib is the newest change the line carries changed=<lib> before file=<script>, which stays last so the health parser and the self-update restart match are unchanged. A missing lib is ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner decision 2026-11-27 (1): ~/.claude/self-update.native-supervisor-restart (exists -> on) is an operator-owned alternative to CCC_SELF_UPDATE_NATIVE_SUPERVISOR_RESTART=1. The env var, when set and non-empty, wins over the file (0 keeps a node off despite it) - the same precedence as self-update.notify. Tests also cover a lib-only change restarting through the file opt-in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…temp preview (#2791) Owner decision 2026-11-27 (4): the dry-run runs the same step-4 checks as --apply (build revision, the artifact's rollout guard --deployed, --smoke-cmd) against a preview of the post-deploy worker root in a private mktemp dir that the EXIT trap removes. Deploy dirs are copied dereferenced so a symlinked live dist/ is never written through; unchanged node_modules packages are symlinks. Failure exits 20 before the idle gate with nothing changed. Decisions 2 and 5 (no forced restart, hung children only reported) are documented, not changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jinon86
approved these changes
Nov 27, 2026
jinon86
left a comment
Contributor
There was a problem hiding this comment.
Approved after exact-head validation and fresh operator authorization using the relay-held jinon86 credential.
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.
요약
#2791 후속입니다. 2026-11-27 오너 결정 5개 중 코드 변경이 필요한 1·3·4를 한 PR에 담았습니다(커밋 3개). 2·5는 지금 동작을 유지하고, 문서에 한 줄로 적었습니다.
결정별 변경
결정 1 — 노드별 opt-in을 파일로도 켤 수 있게 (
scripts/ccc-self-update.sh)~/.claude/self-update.native-supervisor-restart가 있으면 켜집니다.self-update.notify와 같습니다. envCCC_SELF_UPDATE_NATIVE_SUPERVISOR_RESTART가 비어 있지 않으면 env가 이깁니다.0이면 파일이 있어도 꺼집니다. 비어 있거나 unset이면 파일이 결정합니다.docs/self-update.md(5c 단계, env 표)에 적었습니다. 에이전트는 이 파일을 쓰지 않습니다.결정 3 —
lib/a2a-supervisor-identity.sh변경도 supervise stale로 감지 (scripts/lib/a2a-native-worker-stale.sh)max(mtime, ctime)로 봅니다.changed=<lib 경로>를 붙입니다. 위치는file=앞이고,file=<스크립트>는 계속 마지막입니다. 그래서 health의kind=파싱과 self-update의"kind=supervise "*" file=$own"재기동 매칭은 바뀌지 않습니다.installed=missing은 스크립트가 없을 때만 나옵니다.결정 4 — 배포 dry-run에 handler smoke 포함 (
scripts/a2a-termux-native-worker-deploy.sh)--apply의 4단계 검사(build revision, artifact의worker-artifact-rollout-guard.mjs --deployed,--smoke-cmd)를 실행합니다. 대상은 배포 후 worker root의 임시 preview입니다.$TMPDIR아래mktemp -d에 만들고 EXIT trap으로 지웁니다. 구성은 다음과 같습니다.node_modules와dist.bak*를 뺀 것(백업과 같은 범위)dist/·scripts/·handlers/는 심링크를 따라가 실제 파일로 복사합니다. 그래서 심링크된 releasedist/에 덮어쓰지 않습니다. 복사 뒤에도 심링크가 남아 있으면 거부합니다.node_modules에는 artifact 패키지를 실제로 복사하고, 나머지 live 패키지는 심링크로 둡니다.--apply경로는 같은 함수(pre_restart_checks)를 쓰도록 정리만 했고 메시지와 순서는 그대로입니다.결정 2·5 — 코드 변경 없음: busy가 계속돼도 강제로 재기동하지 않습니다. hung 자식은
hung=N으로 보고만 합니다.docs/a2a-claude-worker.md에 한 줄로 적었습니다.검증 (로컬, fresh clone)
scripts/a2a-termux-native-worker-health.test.shscripts/ccc-self-update.test.shscripts/a2a-termux-native-worker-deploy.test.shscripts/a2a-termux-native-worker-restart.test.shscripts/a2a-termux-native-worker.test.sh변이 테스트(red 확인):
changed=출력을 없애면 health 2개 FAIL입니다.0이 파일을 이기지 못하게(OR) 바꾸면 1개 FAIL입니다.dist/).정적 점검:
shellcheck -S warning(변경한 셸 파일 6개),canon-node-name-scan.sh --repo-wideok(baseline 일치),changelog_fragments.py checkok. changelog:changelog.d/2791-native-worker-owner-decisions.md범위 밖 / 게이트
--apply)도 노드별로 각각 따로 승인받습니다.node_modules패키지는 live 패키지를 가리키는 심링크입니다. 그래서 smoke 명령이node_modules에 쓰면 live에 반영됩니다(문서에 명시). 미교체 패키지가 교체된 workspace 패키지를 import하면, 실제 경로 기준으로 해석되므로 옛 버전이 잡힐 수 있습니다.Refs #2791
🤖 Generated with Claude Code