[rustjava-merge-dropped-symbols-checker-swallows-git-failures] fix(scripts): git 실패를 삼키지 않는다 — 「못 쟀다」는 rc=2 로 말한다 - #74
Merged
Conversation
…ripts): git 실패를 삼키지 않는다 — 「못 쟀다」는 rc=2 로 말한다
…origin/main — 승인된 원장 2파일 합집합(REPORT·STATE 상단) 게이트③ 2-c⒜ 승인 범위(원장 파일 한정) 내 해소. 양쪽 항목 전건 보존·시간순(최신 상단). 보존 증명: ours추가 REPORT 13 / STATE 8 · theirs추가 24 / 15 — 소실 0 · 외래줄 0. 해소면 밖 변경 0(scripts/check-merge-dropped-symbols.py · docs/worklog 쌍 = 핀 바이트 동일).
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.
The check that exists to catch a silent loss had a silent pass in it.
run()returnedNoneon a failing git and every caller wroterun(...) or "", so "git could not tell me" became "git told me nothing" — an empty diff, no parents — and the run printed✓ (0 file(s) examined)and exited 0.Reproduced in a real environment, not a mock. Cloning this repository at
--depth 10and running the pre-change script:In a full clone those same merges examine 0 and 20 files. So a merge that reads 20 files collapsed to 0 and the whole run stayed green.
The hard part is separating "failed" from "empty". Of the 8
run()call sites, exactly one must keep tolerating a non-zero exit:git show <rev>:<path>also fails when the path is simply not in that tree, which is ordinary. rc alone cannot separate that from a missing object, so the ambiguity is removed by ruling out the environment inpreflight()rather than by matching stderr text.CI already pins
fetch-depth: 0for themerge_dropsjob (with a comment saying why), so raising on failure does not red existing PRs — the frequency of a shallow checkout in that job is 0. That measurement is what chose "raise" over "fetch the objects first".Bidirectional: failure → rc=2, never
✓; a genuinely empty merge (97660921, only.md/.jsonchanged) → still✓rc=0; detection unchanged (e53b21426,514d5b086,56bb54faexamined 20).Predicate, filter width and
PATTERNSuntouched..rsfiles changed: 0. Exit code 2 was already in the contract.