@chrono-meta/fh-gate 3.11.0 β†’ 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,8 +26,15 @@ cd "$repo" || { echo "FAIL: cannot cd to repo '$repo'" >&2; exit 2; }
26
26
  git rev-parse --git-dir >/dev/null 2>&1 || { echo "FAIL: '$repo' is not a git repo" >&2; exit 2; }
27
27
 
28
28
  # Fetch: surface failure (stale enumeration on an irreversible surface is a real risk), do not swallow.
29
- if ! git fetch origin --quiet 2>/dev/null; then
30
- echo "WARN: 'git fetch origin' failed β€” enumerating against possibly-STALE remote refs" >&2
29
+ # πŸŸ₯ `--prune` β€” 2026-09-17 μ‹€μΈ‘: 이것이 μ—†μ–΄μ„œ 이 검사가 **μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” 브랜치λ₯Ό 회수 λŒ€μƒμœΌλ‘œ
30
+ # 보고**ν–ˆλ‹€. 둜컬 remote-tracking 243 vs μ‹€μ œ 원격 7 β€” 236κ°œκ°€ μœ λ Ήμ΄μ—ˆκ³  REVIEW 213 쀑
31
+ # λŒ€λΆ€λΆ„μ΄ κ·Έκ²ƒμ΄μ—ˆλ‹€. prune ν›„ REVIEW λŠ” 213 β†’ 4.
32
+ # κ³Όνƒμ§€λŠ” μ‚­μ œλ₯Ό λ§‰λŠ” λ°©ν–₯이라 데이터λ₯Ό μžƒμ§€λŠ” μ•ŠλŠ”λ‹€. πŸŸ₯ κ·ΈλŸ¬λ‚˜ γ€ŒREVIEW 213」을 λ‚΄λ©΄
33
+ # 아무도 μ•ˆ 읽고, κ·Έ λ¬΄μ‹œλŠ” **μ§„μ§œ REVIEW κ°€ 뜬 날에도** μž‘λ™ν•œλ‹€. 그것이 이 ν‘œλ©΄μ˜ 손싀 κ²½λ‘œλ‹€.
34
+ if ! git fetch origin --prune --quiet 2>/dev/null; then
35
+ echo "WARN: 'git fetch origin --prune' failed β€” enumerating against possibly-STALE remote refs" >&2
36
+ echo " πŸŸ₯ stale 은 Β«μ—†λŠ” 브랜치λ₯Ό REVIEW 둜» λ³΄κ³ ν•œλ‹€. μ•„λž˜ 숫자λ₯Ό μ‹€μž¬λ‘œ 읽지 마라 β€”" >&2
37
+ echo " 확인: git ls-remote --heads origin | wc -l (이 μˆ˜μ™€ 크게 λ‹€λ₯΄λ©΄ μΊμ‹œκ°€ λ‚‘μ•˜λ‹€)" >&2
31
38
  fi
32
39
 
33
40
  # Base must resolve, else every comparison is bogus and the old code would misclassify SAFE β†’ fail-closed.
@@ -58,8 +65,25 @@ while IFS= read -r ref; do
58
65
  n=$(git log --oneline "${base}..${ref}" 2>/dev/null | wc -l | tr -d ' ')
59
66
  # πŸŸ₯ 2026-08-31 β€” λ‘œμΌ€μΌ μ ‘νž˜ λ°©μ§€. μ—¬κΈ°κ°€ μ ‘νžˆλ©΄ unique path κ°€ 쀄어 REVIEW νŒμ •μ΄
60
67
  # CHECK/SAFE 둜 κ°•λ“±λœλ‹€(λΉ„κ°€μ—­ ν‘œλ©΄). [[feedback_locale_string_equality_breaks_nonascii]]
61
- uniq=$(LC_ALL=C comm -23 <(git ls-tree -r --name-only "$ref" 2>/dev/null | LC_ALL=C sort) \
62
- <(git ls-tree -r --name-only "$base" 2>/dev/null | LC_ALL=C sort) | wc -l | tr -d ' ')
68
+ # πŸŸ₯ «브랜치 νŠΈλ¦¬μ— 있고 base 에 μ—†λ‹€Β» λŠ” 두 κ°€μ§€λ₯Ό μ„žλŠ”λ‹€ (2026-09-17 μ‹€μΈ‘):
69
+ # ⓐ λΈŒλžœμΉ˜κ°€ **μΆ”κ°€**ν•œ 파일 β†’ μ§„μ§œ 회수 λŒ€μƒ
70
+ # β“‘ base κ°€ κ·Έ λ’€ **μ‚­μ œ**ν•œ μ˜› 파일 β†’ 회수 λΆˆμš” (였히렀 μ˜λ„μ μœΌλ‘œ μ§€μš΄ 것)
71
+ # 였래된 브랜치일수둝 β“‘κ°€ μŒ“μ—¬μ„œ γ€Œunique 28」 같은 μˆ«μžκ°€ λ‚˜μ˜€λŠ”λ° νšŒμˆ˜ν•  것은 0이닀.
72
+ # β‡’ merge-base 에 **μ—†λ˜** κ²ƒλ§Œ μ„Όλ‹€. merge-base λ₯Ό λͺ» κ΅¬ν•˜λ©΄ fail-closed(μ „μˆ˜λ₯Ό μ„Όλ‹€).
73
+ mb=$(git merge-base "$base" "$ref" 2>/dev/null || true)
74
+ _cand=$(LC_ALL=C comm -23 <(git ls-tree -r --name-only "$ref" 2>/dev/null | LC_ALL=C sort) \
75
+ <(git ls-tree -r --name-only "$base" 2>/dev/null | LC_ALL=C sort))
76
+ if [ -z "$mb" ]; then
77
+ uniq=$(printf '%s' "$_cand" | grep -c . || true) # merge-base 뢈λͺ… β†’ μ’νžˆμ§€ μ•ŠλŠ”λ‹€
78
+ else
79
+ uniq=0
80
+ while IFS= read -r _f; do
81
+ [ -n "$_f" ] || continue
82
+ git cat-file -e "${mb}:${_f}" 2>/dev/null || uniq=$((uniq+1))
83
+ done <<EOF
84
+ $_cand
85
+ EOF
86
+ fi
63
87
  if [ "$uniq" -gt 0 ]; then
64
88
  echo "REVIEW $b β€” unique paths: $uniq, commits off base: $n β†’ recover/integrate BEFORE delete"
65
89
  fail=1