Files
Genarrative/scripts/warning-baseline.json
T
suzmii 8e2b81007a fix(scripts): 让 Rust 告警取数确定性(挂进 npm run lint;clean 本 profile 包 + fresh 完整性断言 + 精确包集 + first-party 过滤)
接法:挂进 npm run lint(CI 的 Repository checks 与推 master 时的 pre-push 共用那条命令),不新增 job/hook;此前自造的 pre-push 触发接线(.husky/pre-push 改动、scripts/pre-push-rust-warnings.mjs、额外 CI job)已撤。
确定性:profile 专属 target 目录 + 对本 profile first-party 包逐个 cargo clean -p <包名> + 取数后 fresh 完整性断言(每个包必须出现 compiler-artifact 且 fresh=false,否则 exit 1 报测量不完整);只收 first-party 路径前缀下的告警。
修掉两个口径 bug:包集把 AGC 壳下的 vendor/ 路径依赖误算成自己(改精确目录判定);normalizeId 只取 id 的 # 片段导致server-rs 27 个同版本成员碰撞(断言永远为假)。
否决“整体清空 target 目录”:实测 AGC 壳清空后需重建 tauri/webkit 全链依赖 15-25 分钟。
实测:A 干净 agc-windows 1/1·14/14 exit 0、server-rs 27/27·0/0 exit 0;B 播种 unused import → agc-windows 15 条/新增 1、server-rs 1 条/新增 1,均 exit 1 并逐条打印;C 撤销 → 均 exit 0;负向测试(GENARRATIVE_WARNCHECK_SKIP_CLEAN 漏清一个成员)→ 26/27 + 测量不完整 → exit 1。
基线:agc-windows 14 条 / server-rs 0 条 / agc-linux 首采(首次 CI 只采集不判失败,需一次 --update-baseline)。
文档:dev 运维「Rust 编译告警门禁」同步接法、首采、开关、否决清空的原因与局限。
2026-10-07 19:57:17 +08:00

91 lines
3.6 KiB
JSON
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.
{
"schema": 1,
"profiles": {
"agc-windows": {
"description": "AGC 壳:Windows + 三编辑器 feature 的生产口径(只有 Windows 本机可跑 → 仅 pre-push 覆盖)",
"command": "cargo check --locked --features cocos-editor-execute,unity-editor-execute,godot-editor-execute --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml",
"targetDirPolicy": "profile 专属目录(默认 <tmp>/genarrative-warncheck/<profile>;可用 GENARRATIVE_WARNCHECK_TARGET_DIR 覆盖)",
"scope": "只收 first-party 告警:apps/ai-game-creator-shell/src-tauri",
"warnings": [
{
"path": "apps/ai-game-creator-shell/src-tauri/src/command_exec.rs",
"symbol": "resolve_project_bootstrap_spec_at",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/command_exec.rs",
"symbol": "run_project_bootstrap_command_at",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/export/draft/taonier/mod.rs",
"symbol": "TaonierArtifactPackage",
"lint": "unused_imports"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/export/draft/taonier/registry.rs",
"symbol": "read_form",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/export/draft/taonier/script.rs",
"symbol": "package_json_relative",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/game_package_upload.rs",
"symbol": "ensure_staging_path_in_dir",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/game_package_upload.rs",
"symbol": "GAME_PACKAGE_UPLOAD_PROGRESS_EVENT",
"lint": "unused_imports"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/game_package_upload/runtime.rs",
"symbol": "GAME_PACKAGE_UPLOAD_PROGRESS_EVENT",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/project.rs",
"symbol": "bootstrap::*",
"lint": "unused_imports"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/project/bootstrap.rs",
"symbol": "BOOTSTRAP_PACKAGE_MAX_BYTES",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/project/bootstrap.rs",
"symbol": "ProjectBootstrapResult",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/project/bootstrap.rs",
"symbol": "read_bootstrap_file",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/project/bootstrap.rs",
"symbol": "run_project_bootstrap_at",
"lint": "dead_code"
},
{
"path": "apps/ai-game-creator-shell/src-tauri/src/project/verification.rs",
"symbol": "run_project_verification_with_commit_at",
"lint": "dead_code"
}
]
},
"server-rs": {
"description": "server-rs workspace(Linux/Windows 都可跑;CI 与 pre-push 共用)",
"command": "cargo check --locked --workspace --all-targets --manifest-path server-rs/Cargo.toml",
"targetDirPolicy": "profile 专属目录(默认 <tmp>/genarrative-warncheck/<profile>;可用 GENARRATIVE_WARNCHECK_TARGET_DIR 覆盖)",
"scope": "只收 first-party 告警:server-rs",
"warnings": []
}
}
}