Skip to content

fix(termux-worker-deploy): pass the guard's env through env, not an expansion (#2791) - #2934

Merged
seoseo-ai merged 1 commit into
mainfrom
fix/2791-deploy-guard-target-sha
Nov 27, 2026
Merged

seoseo-ai merged 1 commit into
mainfrom
fix/2791-deploy-guard-target-sha

Conversation

@seoseo-ai

Copy link
Copy Markdown
Collaborator

#2791 후속 버그 수정 — 정본 배포 스크립트를 Termux 노드에서 처음 실제로 dry-run하다 발견했습니다(2026-11-27).

증상

--target-sha와, 아티팩트에 들어 있는 worker-artifact-rollout-guard.mjs가 함께 있으면 항상 실패:
a2a-termux-native-worker-deploy.sh: line 311: A2A_WORKER_TARGET_REVISION=267d018f…: command not found → rollout guard failed → exit 20(아무것도 바뀌지 않음).

원인

run_guard가 ${TARGET_SHA:+A2A_WORKER_TARGET_REVISION="$TARGET_SHA"} node …로 환경을 만들었습니다. 치환으로 만든 이름=값은 bash에게 대입이 아니라 명령 이름입니다. 기존 테스트는 guard가 있을 때 --target-sha를 주지 않았고, --target-sha를 줄 때는 guard 파일이 없어 이 경로가 시험되지 않았습니다.

수정

env 인자 배열로 넘깁니다(A2A_WORKER_ROOT, 있으면 A2A_WORKER_TARGET_REVISION).

시험

  • 새 테스트 2개: guard + --target-sha로 dry-run이 통과하고, guard가 목표 리비전을 환경에서 받는지. 옛 줄로 되돌리면 둘 다 실패(mutation 확인).
  • deploy 스위트 49/49, shellcheck -S warning, 노드 이름 검사, changelog 검사 통과.
  • 실측: 대교에서 같은 아티팩트로 --target-sha 없이 돌린 dry-run은 끝까지 통과(guard·handler smoke·유휴 게이트 ok, nothing changed).

머지는 오너 승인 뒤.

🤖 Generated with Claude Code

…xpansion (#2791)

run_guard built the guard environment with ${TARGET_SHA:+A2A_WORKER_TARGET_REVISION=...} node ...; an
assignment produced by an expansion is not an assignment to bash, so every --target-sha run with a shipped
rollout guard ran 'A2A_WORKER_TARGET_REVISION=...' as the command (rc 127 -> exit 20, nothing changed).
Found by the first live dry-run on a Termux node. Tests: a shipped guard with --target-sha passes and sees
the target revision (both fail against the old line); suite 49/49, shellcheck -S warning clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@jinon86 jinon86 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved after exact-head validation and fresh operator authorization using the relay-held jinon86 credential.

@seoseo-ai
seoseo-ai added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit dac5cbf Nov 27, 2026
17 checks passed
@seoseo-ai
seoseo-ai deleted the fix/2791-deploy-guard-target-sha branch November 27, 2026 12:16
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.

2 participants