fix: harden review and verifier governance

This commit is contained in:
phamnazage-jpg
2026-05-29 18:48:48 +08:00
parent 88833fac8b
commit e999d31b25
133 changed files with 2538 additions and 159 deletions

View File

@@ -6,11 +6,11 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
. "$SCRIPT_DIR/verify_common.sh"
. "$SCRIPT_DIR/report_utils.sh"
TODAY="$(report_date_value)"
TODAY_MARKDOWN_PATH="$(report_markdown_path "$TODAY")"
TODAY_HTML_PATH="$(report_html_path "$TODAY")"
TODAY_ARCHIVE_MARKDOWN_PATH="$(report_archive_markdown_path "$TODAY")"
TODAY_ARCHIVE_HTML_PATH="$(report_archive_html_path "$TODAY")"
LATEST_OFFICIAL_MARKDOWN_PATH="$(find "$(report_output_dir)" -maxdepth 1 -type f -name 'daily_report_*.md' | sort | tail -n 1)"
LATEST_OFFICIAL_HTML_PATH="$(find "$(report_html_dir)" -maxdepth 1 -type f -name 'daily_report_*.html' | sort | tail -n 1)"
LATEST_OFFICIAL_ARCHIVE_MARKDOWN_PATH="$(find "$(report_output_dir)" -mindepth 3 -maxdepth 3 -type f -name 'daily_report_*.md' | sort | tail -n 1)"
LATEST_OFFICIAL_ARCHIVE_HTML_PATH="$(find "$(report_output_dir)" -mindepth 3 -maxdepth 3 -type f -name 'daily_report_*.html' | sort | tail -n 1)"
echo "=== Phase 3 验收检查 ==="
@@ -23,9 +23,10 @@ check_shell "正式调度链启用严格真实采集" "grep -q -- '-strict-real'
check_shell "正式调度链校验本次采集结果数量" "grep -q '本次采集结果异常' scripts/run_daily.sh && grep -q 'total=' scripts/run_real_pipeline.sh"
check_shell "每日流水线已纳入多源补充同步" "grep -q 'fetch_multi_source.go --sources moonshot,deepseek,openai' scripts/run_daily.sh && grep -q 'import_zhipu_data.go' scripts/run_daily.sh && grep -q 'import_phase2_data.go' scripts/run_daily.sh && grep -q 'import_bytedance_data.go' scripts/run_daily.sh"
check_shell "每日流水线会把来源级运行审计写入正式日报上下文" "grep -q 'REPORT_RUNTIME_AUDIT' scripts/run_daily.sh && grep -q 'selected_source_keys=' scripts/run_daily.sh && grep -q 'failed_source_keys=' scripts/run_daily.sh"
check_shell "今日日报 Markdown 主产物存在且包含数据质量摘要" "test -f ${TODAY_MARKDOWN_PATH} && grep -q '数据质量摘要' ${TODAY_MARKDOWN_PATH}"
check_shell "今日日报 HTML 主产物存在" "test -f ${TODAY_HTML_PATH}"
check_shell "今日日报归档副本存在Markdown + HTML" "test -f ${TODAY_ARCHIVE_MARKDOWN_PATH} && test -f ${TODAY_ARCHIVE_HTML_PATH}"
check_shell "最新正式日报 Markdown 主产物存在且包含数据质量摘要" "test -n \"${LATEST_OFFICIAL_MARKDOWN_PATH}\" && test -f \"${LATEST_OFFICIAL_MARKDOWN_PATH}\" && grep -q '数据质量摘要' \"${LATEST_OFFICIAL_MARKDOWN_PATH}\""
check_shell "最新正式日报 HTML 主产物存在" "test -n \"${LATEST_OFFICIAL_HTML_PATH}\" && test -f \"${LATEST_OFFICIAL_HTML_PATH}\""
check_shell "最新正式日报归档副本存在Markdown + HTML" "test -n \"${LATEST_OFFICIAL_ARCHIVE_MARKDOWN_PATH}\" && test -f \"${LATEST_OFFICIAL_ARCHIVE_MARKDOWN_PATH}\" && test -n \"${LATEST_OFFICIAL_ARCHIVE_HTML_PATH}\" && test -f \"${LATEST_OFFICIAL_ARCHIVE_HTML_PATH}\""
check_shell "非正式运行产物已隔离到 reports/ad_hoc" "bash scripts/verify_phase3_official_report_paths_test.sh"
check_shell "日报归档约定已统一收敛到公共工具" "grep -q 'report_utils.sh' scripts/run_daily.sh && grep -q 'report_utils.sh' scripts/run_real_pipeline.sh && grep -q 'report_utils.sh' scripts/verify_phase3.sh"
check_sql_int_ge "daily_report 已写入至少 1 条 generated 记录" \
"select count(*) from daily_report where status='generated';" \