修复埋点接入后的客户端CI检查
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m46s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 3m39s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Successful in 9m6s
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Successful in 9m45s
Project CI / Backend tests (pull_request) Successful in 7m58s
Project CI / Native shell tests (pull_request) Successful in 8m41s
Project CI / Repository checks (pull_request) Successful in 4m51s
Project CI / Frontend tests (pull_request) Successful in 5m35s
Project CI / AI game creator shell web tests (pull_request) Successful in 4m42s

修正Tauri命令解析,避免将模块路径识别为命令名。
更新预览生命周期测试以匹配带埋点租约的注册调用。
同步技术方案中的CI适配说明。
This commit is contained in:
2026-09-22 04:18:51 +00:00
parent 65bf206490
commit b31a771b09
3 changed files with 11 additions and 3 deletions
@@ -516,7 +516,7 @@ function parseTauriHandlerCommandNames(source) {
throw new Error('AI game creator shell Tauri handler list is missing');
}
return Array.from(
match[1].matchAll(/\b([a-z][a-z0-9_]+)\b/g),
match[1].matchAll(/\b(?:[a-z][a-z0-9_]*::)*([a-z][a-z0-9_]*)\b/g),
([, command]) => command,
);
}
@@ -549,6 +549,12 @@ function assertCommandNamesDisjoint(label, leftNames, rightNames) {
}
function runAppInvokeParserRegressionChecks() {
assert.deepEqual(
parseTauriHandlerCommandNames(
'tauri::generate_handler![plain_command, analytics::gui::capture_analytics_context,]',
),
['plain_command', 'capture_analytics_context'],
);
assert.deepEqual(
parseAppInvokeCommandNames(`
invoke('direct_command', {});
@@ -195,7 +195,7 @@ describe('本地预览记录的生命周期(Rust 侧结构性守卫)', () =>
// record_replaced_preview_stop 只允许在旧预览属于别的项目时调用:同项目重启时它会把
// 刚写进去的 running 覆盖成 stopped。
const replaceBranch =
/let \(preview, previous_preview\) = registry\.set_running\(preview, stop\);([\s\S]*?)\n {4}\}/u.exec(
/let \(preview, previous_preview\) =\s*registry\.set_running_with_lease\(preview, stop, analytics_lease\);([\s\S]*?)\n {4}\}/u.exec(
previewSource,
)?.[1] ?? '';
expect(replaceBranch).toContain('ensure_preview_belongs_to_project');
@@ -1,12 +1,14 @@
# 客户端本地埋点与主站入库契约
Version: 0.26
Version: 0.27
Status: 本地采集及上传、入库、成功清理、后台查询已实现并完成本地隔离环境验收;未部署生产
Date: 2026-09-21
需求来源:[Game Agent 埋点设计原始方案](./【需求来源】GameAgent埋点设计原始方案-2026-09-05.md);原始方案与后续已确认决策有差异时,以本文为准。
## 1. 交付目标与范围
2026-09-22 CI 检查适配:Tauri 命令清单解析仅提取模块路径末尾的函数名,避免将 `analytics::gui` 误判为命令;预览生命周期结构性测试匹配当前 `set_running_with_lease` 调用,继续检查同项目重启不覆盖新预览记录的保护逻辑。此修正不改变运行行为或采集范围。
阅读说明:第 1 至 12 节记录本地采集合同及其已完成的验收证据;当前上传、入库、清理与后台查询的实施合同统一见第 13 节。第 13 节细化第 8 节,不改变现有 12 类事件和采集触发点。当前整体仍在实施验收中,不表示已经上线。
交付结果:在 Game Agent 与现役 Design Agent 客户端的真实业务节点产生有明确语义的产品事件,以明文 JSONL 批次持久化在应用级目录;当前实施增加主站入库、确认后清理与后台明细查询,验收要求见第 13 节。