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

41 lines
1.5 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
| # | 问题 | 优先级 | 首次暴露 | 修复状态 | 影响次数 |
|---|------|--------|----------|----------|----------|
| 33 | 已证伪 blocker 缺少自动降级/撤销机制 | P1 | 05-18 09:30 | ❌ 未修复 | 2 次 |
---
#### 问题 33 状态更新:已修复(从 current 表移除)
- 结论:问题 33 已关闭。
EOF
set +e
bash scripts/review/backlog_revocation_guard.sh "$BAD_BACKLOG" >/tmp/backlog_revocation_bad.out 2>&1
BAD_RC=$?
set -e
[[ "$BAD_RC" -ne 0 ]]
grep -q 'resolved issue still present in current table' /tmp/backlog_revocation_bad.out
GOOD_BACKLOG="$TMP_DIR/backlog-good.md"
cat > "$GOOD_BACKLOG" <<'EOF'
## 当前未修复问题速查表(截至 2026-05-29 15:10
| # | 问题 | 优先级 | 首次暴露 | 修复状态 | 影响次数 |
|---|------|--------|----------|----------|----------|
| 34 | 局部 smoke 已通过后缺少全局 blocker 切换提示 | P1 | 05-18 15:10 | ❌ 未修复 | 1 次 |
---
#### 问题 33 状态更新:已修复(从 current 表移除)
- 结论:问题 33 已关闭。
EOF
bash scripts/review/backlog_revocation_guard.sh "$GOOD_BACKLOG" >/tmp/backlog_revocation_good.out 2>&1
grep -q 'BACKLOG_REVOCATION_GUARD: PASS' /tmp/backlog_revocation_good.out