@@ -406,7 +406,13 @@ if git rev-parse --is-inside-work-tree &>/dev/null \
406406 && [[ -z " $DFDRAW_SKIP_TAG_DRIFT_CHECK " ]]; then
407407
408408 # _END tags claimed in the history doc vs _END tags actually in the repo.
409- DOC_END_TAGS=$( grep -oE ' PHASE_[A-Z0-9_]+_END' " $PHASE_HISTORY_FILE " \
409+ # A phase closure is *claimed* in the history by declaring it as a tag, e.g.
410+ # "tag \`PHASE_X_END\`" or "**Tag:** \`PHASE_X_END\`". Match ONLY that form
411+ # (a PHASE_*_END inside backticks, preceded within a few chars by the word
412+ # "tag"), so the check does not flag PHASE_*_END tokens merely *mentioned* in
413+ # prose (e.g. an example tag inside a sentence describing this very check).
414+ DOC_END_TAGS=$( grep -ioE ' tag[^`]{0,12}`PHASE_[A-Z0-9_]+_END`' " $PHASE_HISTORY_FILE " \
415+ | grep -oE ' PHASE_[A-Z0-9_]+_END' \
410416 | sort -u || true)
411417 REPO_END_TAGS=$( git tag --list ' PHASE_*_END' | sort -u || true)
412418
@@ -416,26 +422,26 @@ if git rev-parse --is-inside-work-tree &>/dev/null \
416422 <( printf ' %s\n' " $REPO_END_TAGS " ) | grep -v ' ^$' || true)
417423
418424 if [[ -n " $MISSING_TAGS " ]]; then
419- echo " "
420- echo " ${RED}${BOLD} ❌ BUNDLE BLOCKED — PHASE_HISTORY.md claims tags that do not exist: ${RESET} "
421- echo " $MISSING_TAGS " | sed ' s/^/ / '
422- echo " "
423- echo " ${YELLOW} docs/PHASE_HISTORY.md documents these phase closures, but the${RESET} "
424- echo " ${YELLOW} corresponding git tags are absent. Either the closure was never ${RESET} "
425- echo " ${YELLOW} tagged, or the history entry is premature/incorrect. ${RESET} "
426- echo " "
427- echo " Resolve each by ONE of: "
428- echo " git tag <PHASE_..._END> <commit> # if the work landed but tagging was missed "
429- echo " (edit PHASE_HISTORY.md) # if the entry is premature/wrong "
430- echo " "
431- echo " Verify the intended commit first: git log --oneline -1 <commit> "
432- echo " "
433- echo " Override (development only): DFDRAW_SKIP_TAG_DRIFT_CHECK=1 bash run_tests.sh "
434- echo " "
435- echo " Test results from this run are saved to: "
436- echo " $LOG_DIR / "
437- echo " Bundle .zip was NOT created. "
438- exit 1
425+ # NON-BLOCKING (Phase 13.48 design change). Rationale: doc<->tag drift is
426+ # a documentation-hygiene signal, not a test result. Blocking the bundle
427+ # on a heuristic grep of a prose file is fragile (a prose mention or a
428+ # format change can mis-fire) and creates override pressure — a new coder
429+ # who hits a hard wall reaches for DFDRAW_SKIP_... and the bypass is then
430+ # invisible to reviewers, so the check quietly becomes dead weight.
431+ # Instead: WARN loudly AND record the warning in the SUMMARY so the drift
432+ # itself travels in reviewer.zip for the architect/reviewers to see and
433+ # resolve. The bundle is still built. (A false negative here is now
434+ # low-harm: a missed warning, not a false sense of a passed gate.)
435+ {
436+ echo " "
437+ echo " ⚠️ TAG DRIFT (non-blocking) — PHASE_HISTORY.md declares phase-closure "
438+ echo " tags that have no matching git tag: "
439+ echo " $MISSING_TAGS " | sed ' s/^/ / '
440+ echo " (These appear as \" tag \` PHASE_..._END \`\" in docs/PHASE_HISTORY.md.) "
441+ echo " Resolve by tagging the closure (git tag <PHASE_..._END> <commit>) "
442+ echo " or correcting the history entry. Reported, NOT blocked. "
443+ } | tee -a " $SUMMARY_FILE "
444+ echo " ${YELLOW} (Tag drift reported in SUMMARY; bundle still built.) ${RESET} "
439445 fi
440446
441447 # (2) Misplaced FIX tag (heuristic warning, non-blocking).
0 commit comments