Files
llm-intelligence/scripts/review/backlog_blocker_freshness_guard_test.sh
2026-05-29 18:48:48 +08:00

42 lines
1.6 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT_DIR"
TMP_DIR="$(mktemp -d)"
trap 'rm -rf "$TMP_DIR"' EXIT
BAD_BACKLOG="$TMP_DIR/backlog.md"
cat > "$BAD_BACKLOG" <<'EOF'
## 当前未修复问题速查表(截至 2026-05-29 15:10
| # | 问题 | 优先级 | 首次暴露 | 修复状态 | 影响次数 |
|---|------|--------|----------|----------|----------|
| 46 | sensenova-live smoke FAIL | P1 | 05-28 15:10 | ❌ 未修复 | 1 次 |
| 48 | xfyun-live smoke FAIL 导致 live_run SKIP 传导链 | P1 | 05-29 15:10 | ❌ 未修复 | 首次暴露 |
---
### 2026-05-29 15:10afternoon-review cron
- freshness_hint=same-day-blocker-switch old=sensenova-live new=xfyun-live
EOF
set +e
bash scripts/review/backlog_blocker_freshness_guard.sh "$BAD_BACKLOG" >/tmp/backlog_blocker_bad.out 2>&1
BAD_RC=$?
set -e
[[ "$BAD_RC" -ne 0 ]]
grep -q 'stale blocker still present in current table' /tmp/backlog_blocker_bad.out
GOOD_BACKLOG="$TMP_DIR/backlog-good.md"
cat > "$GOOD_BACKLOG" <<'EOF'
## 当前未修复问题速查表(截至 2026-05-29 15:10
| # | 问题 | 优先级 | 首次暴露 | 修复状态 | 影响次数 |
|---|------|--------|----------|----------|----------|
| 48 | xfyun-live smoke FAIL 导致 live_run SKIP 传导链 | P1 | 05-29 15:10 | ❌ 未修复 | 首次暴露 |
---
### 2026-05-29 15:10afternoon-review cron
- freshness_hint=same-day-blocker-switch old=sensenova-live new=xfyun-live
EOF
bash scripts/review/backlog_blocker_freshness_guard.sh "$GOOD_BACKLOG" >/tmp/backlog_blocker_good.out 2>&1
grep -q 'BACKLOG_BLOCKER_FRESHNESS_GUARD: PASS' /tmp/backlog_blocker_good.out