fix(external-wait): normalize short head SHAs at registration, heal legacy records (#961) - #975
Merged
Merged
Conversation
…egacy records (#961) A 7-39 char head SHA passed format validation but could never equal GitHub's 40-char headRefOid, so the wait superseded on the first poll while register returned ok — the #949 silent promise loss. - register: resolve short SHAs to the full head via gh api; refuse registration (ok:false, exit 2) when the SHA does not resolve - monitor: a recorded short SHA that prefixes the live head is healed to the full SHA instead of superseded; a genuinely moved head still supersedes - registry: correct_head_sha() heals only monitoring records with a strict prefix match Closes #961
seoseo-ai
approved these changes
Aug 6, 2026
seoseo-ai
left a comment
Collaborator
There was a problem hiding this comment.
Approved after explicit operator authorization using the local seoseo-ai 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.
문제 (#961 / #949 실측)
external_wait_cli register에 7~39자 축약 SHA를 주면 검증 통과 +ok:true반환하지만, 모니터의 비교는 GitHubheadRefOid(항상 40자)와의 정확 일치라 첫 폴에서 즉시 superseded — "CI 끝나면 자동 재개" 약속이 조용히 유실됐다.수정
gh api repos/{repo}/commits/{sha}로 40자 전체 SHA로 정규화. 해소 실패 시 등록 거부(ok:false, exit 2) — 지킬 수 없는 약속을 만들지 않음correct_head_sha()— monitoring 상태 + 엄격 접두사 일치 + 40자 검증일 때만 치유기존 레코드(머지 전 등록된 축약 SHA)도 모니터 치유 경로로 회복됨.
검증
test_external_wait*.py43 passed, ruff·mypy cleanca993cc1→ca993cc1c738...실제 gh 해소 확인Closes #961