按门禁组拆分客户端 CI,AGC 的 web / rust 两段并行
Project CI / Native shell tests (push) Failing after 3m36s
Project CI / Frontend tests (push) Successful in 4m13s
Project CI / Repository checks (push) Successful in 3m3s
Project CI / AI game creator shell web tests (push) Successful in 2m31s
Project CI / Backend tests (push) Successful in 7m49s
Project CI / AI game creator shell Rust tests (push) Successful in 14m10s
Project CI / Native shell tests (push) Failing after 3m36s
Project CI / Frontend tests (push) Successful in 4m13s
Project CI / Repository checks (push) Successful in 3m3s
Project CI / AI game creator shell web tests (push) Successful in 2m31s
Project CI / Backend tests (push) Successful in 7m49s
Project CI / AI game creator shell Rust tests (push) Successful in 14m10s
原生壳门禁原本挤在同一个 job 里串行执行,跑一遍 18 分 37 秒,其中 AI 游戏创作 壳独占约 15 分钟(壳内 Rust 套件 2451 条用例串行 441 秒),而微信 / 移动 / 桌面 / H5 的全部门禁加起来不到 50 秒。长尾拖住短门禁,runner 也无法并行。 - scripts/check-native-shells.mjs 支持 `--groups=`(contract / shells / agc-web / agc-rust / release):每个步骤与静态断言归属且只归属一个分组,不带参数时仍按 原顺序串行跑全部分组,本地 `npm run check:native-shells` 语义不变。 - 顺带修掉 H5 HostBridge 调用链扫描在 Windows 上恒红的缺陷:collectFiles 返回 反斜杠路径而期望清单是 POSIX 写法,scannedFiles.has() 永远为假。新增 normalizeScannedFilePath 只统一分隔符(不能复用会去后缀的 normalizeModulePath), 在 Linux 上是恒等变换。 - package.json 增加 5 个分组脚本,并把 ai-game-creator-shell:check 拆成 :check:web 与 :check:rust;聚合脚本保持 web && rust && agent-run:smoke 同序。 agent-run smoke 会 spawn cargo,因此归入 agc-rust。 - .gitea/workflows/project-ci.yml 拆成 6 个 job:新增 native-shell-tests(contract + shells + release)、ai-game-creator-shell-web-tests、ai-game-creator-shell-rust-tests 三个门禁 job,与 backend-tests / frontend-tests / repository-checks 并列。 - scripts/project-ci-workflow.test.ts 增加 3 条结构测试:分组恰好被一个 job 调用且 与脚本内声明一致、CI 不再调用全量入口、AGC web/rust 拆分与聚合脚本等价、独立 crate 预热必须发生在 AGC Rust 门禁之前。 - 同步运维文档、development-workflow、decision-log、pitfalls。 验证:`--groups=contract` 本地通过;vitest 11 passed;eslint 与 prettier 通过; check:encoding 13329 文件通过;check:doc-index 103 份通过。shells / agc-web / agc-rust / release 分组只能由 Linux CI 执行(Windows 上 spawnSync npm.cmd 报 EINVAL,属既有平台限制,非本次引入)。分支保护需补两个新 required context: `Project CI / AI game creator shell web tests (pull_request)` 与 `Project CI / AI game creator shell Rust tests (pull_request)`。 Co-authored-by: DotCraft <273930855+dotcraft-ai@users.noreply.github.com>
This commit is contained in:
@@ -74,4 +74,4 @@ SpacetimeDB 任务统一先读取 `.codex/skills/genarrative-spacetimedb/SKILL.m
|
||||
|
||||
## Gitea CI 依赖闭合
|
||||
|
||||
`.gitea/workflows/project-ci.yml` 的 `Native shell tests` 在运行原生壳门禁前,必须使用 `cargo fetch --locked` 预取 `server-rs/Cargo.toml`、桌面壳和 AGC 壳三份依赖。Backend host workspace tests 使用 `cargo test --locked --workspace --exclude spacetime-module --no-fail-fast`,避免 `spacetime-module` 的 `spacetime-types` feature 统一污染普通领域 crate 的 host 测试;随后单独执行 `cargo test --locked -p spacetime-module --no-fail-fast`,由 `spacetime-module/src/active.rs` 在 host 测试构建期间提供仅测试期的 SpacetimeDB ABI 链接支持,使该 crate 的纯单元测试也纳入 Backend 门禁。`spacetime-module` 的 reducer / procedure 运行时行为仍必须通过真实 SpacetimeDB runtime/integration harness 验证,host 链接支持不得被当作运行时替身。Backend 另外执行 `cargo check --locked -p spacetime-module` 验证模块源码。AGC 壳检查还会运行 `platform-llm` 与 `shared-contracts` 的 server-rs workspace 测试,这些命令以及 AGC 壳测试必须带 `--locked`,避免在测试阶段重新解析 registry index;锁文件发生变化时应先更新受信任 CI 镜像缓存,再重跑门禁。
|
||||
`.gitea/workflows/project-ci.yml` 的客户端门禁拆成三个 job,每个 job 只预热自己会构建的那几份依赖:`AI game creator shell Rust tests` 用 `cargo fetch --locked` 预取 `server-rs/Cargo.toml` 与 AGC 壳 manifest(`agent-run` smoke 会用 `src-tauri/Cargo.toml` spawn `cargo`,因此必须同 job),`Native shell tests` 预取桌面壳与 AGC 壳 manifest,`AI game creator shell web tests` 不触碰 Cargo,不预热。两个被 `server-rs/Cargo.toml` 排除、且没有提交 `Cargo.lock` 的独立 crate(`agent-runtime-core`、`agent-runtime-orchestration`)只能在 `AI game creator shell Rust tests` 里用不带锁标志的 fetch。Backend host workspace tests 使用 `cargo test --locked --workspace --exclude spacetime-module --no-fail-fast`,避免 `spacetime-module` 的 `spacetime-types` feature 统一污染普通领域 crate 的 host 测试;随后单独执行 `cargo test --locked -p spacetime-module --no-fail-fast`,由 `spacetime-module/src/active.rs` 在 host 测试构建期间提供仅测试期的 SpacetimeDB ABI 链接支持,使该 crate 的纯单元测试也纳入 Backend 门禁。`spacetime-module` 的 reducer / procedure 运行时行为仍必须通过真实 SpacetimeDB runtime/integration harness 验证,host 链接支持不得被当作运行时替身。Backend 另外执行 `cargo check --locked -p spacetime-module` 验证模块源码。AGC 壳检查还会运行 `platform-llm` 与 `shared-contracts` 的 server-rs workspace 测试,这些命令以及 AGC 壳测试必须带 `--locked`,避免在测试阶段重新解析 registry index;锁文件发生变化时应先更新受信任 CI 镜像缓存,再重跑门禁。
|
||||
|
||||
Reference in New Issue
Block a user