项目快照整目录上传 .agent,保留项目身份与 Agent 历史
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m16s
Project CI / Native shell tests (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (pull_request) Has been cancelled
Project CI / Backend tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust crates (push) Successful in 1m17s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m47s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 7m3s
Project CI / Backend tests (push) Successful in 5m59s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 8m6s
Project CI / Native shell tests (push) Successful in 7m23s
Project CI / Frontend tests (push) Successful in 3m48s
Project CI / Repository checks (push) Successful in 3m37s
Project CI / AI game creator shell web tests (push) Successful in 3m40s

- 新增 should_skip_project_snapshot_sync_path:快照同步放行 .agent 组件,并放行其中 .db / .db-wal / .db-shm 的 Agent 状态数据库
- 组件与后缀排除表提取为常量;should_skip_project_snapshot_path 行为不变,项目索引、checkpoint、Agent 上下文与 git 检查继续排除整个 .agent
- project_snapshot 扫描入口切到新口径,.agent 的 manifest、agent.db、会话、日志、checkpoint、workbench 与 project.lock 全部参与同步
- 新增整目录扫描用例与策略用例,覆盖 .agent 内凭据、.env、版本库与构建目录仍被排除
- 主规范更新上传内容边界与后台归档范围:工程 ZIP 可用于还原项目身份与 AGC 对话历史
- 里程碑、实施计划与共享记忆决策记录同步 .agent 全量口径、真实上传与后台 ZIP 的运行时验证证据,以及 v1/v2 键布局边界
This commit is contained in:
kdletters
2026-09-22 16:38:39 +08:00
parent fdc14404b2
commit bba4f0eb24
8 changed files with 232 additions and 75 deletions
@@ -8,6 +8,16 @@
- 影响范围:`jenkins/Jenkinsfile.scheduled-release-trigger``jenkins/scheduled-release-trigger-job-config.xml``jenkins/Jenkinsfile.agc-global-version-issue``scripts/check-production-ops-guardrails.mjs`、开发运维文档、共享开发工作流与 AGC 总版本号技术方案。
- 验证方式:`npm run check:production-ops` 校验 release Job 的 cron、发号、双平台 release 参数、Mac 让位和 Copy Artifact 授权;`npm run check:encoding``git diff --check` 校验文件与补丁。
## 2026-09-22 项目快照 `.agent` 全量上传:远端工程包要能还原项目身份与 Agent 历史
- 背景:快照上传此前复用 `should_skip_project_snapshot_path`,把整个 `.agent``manifest.json``agent.db`、conversations、logs、runtime、checkpoint、workbench、`project.lock`)排除在上传集合之外。后台“项目工程”的「下载完整工程」是按清单逐文件打包的,于是导出的 ZIP 里没有项目身份与对话历史,用户在 AGC 里恢复不出同一个项目。
- 决策:快照同步改用独立口径 `should_skip_project_snapshot_sync_path``apps/ai-game-creator-shell/src-tauri/src/project/filesystem.rs`)。它与原口径共用同一份组件与后缀规则(提取为 `PROJECT_SNAPSHOT_EXCLUDED_COMPONENTS` / `PROJECT_SNAPSHOT_EXCLUDED_SUFFIXES`),只额外放行两点:`.agent` 组件本身,以及 `.agent` 内的 Agent 状态数据库后缀 `.db`/`.db-wal`/`.db-shm``agent.db` 是项目状态而不是凭据转储)。扫描入口 `src-tauri/src/project_snapshot/scan.rs` 切到新口径。
- 边界:`.agent` 内部的版本库 / 依赖 / 构建目录、凭据目录(`.ssh``credentials``secrets` 等)、`.env*``.pem`/`.key`/`.sql` 等敏感后缀继续排除;符号链接与重解析点照旧在扫描阶段跳过;单文件 64 MiB、单次 512 MiB、单项目 2 GiB 上限不变。项目索引、checkpoint、Agent 上下文与 git 检查继续使用 `should_skip_project_snapshot_path`(仍排除整个 `.agent`)——本变更只放开快照同步。
- 代价与取舍:`.agent` 里的会话记录、运行日志与诊断快照会随项目离机并写入该用户自己的私有前缀,这是“可还原”的代价,属于本轮产品决定。服务端不需要改动:快照路径校验只检查路径形状,后台归档按清单逐文件打包,都不含 `.agent` 特判。模板包导入门禁(`IMPORT_FORBIDDEN_SEGMENTS`)与 CLI 模板发布门禁继续拒绝 `.agent`,不会因为这份 ZIP 而放宽。
- 影响范围:`apps/ai-game-creator-shell/src-tauri/src/project/filesystem.rs``src-tauri/src/project_snapshot/{scan.rs,tests.rs}`;主规范 `docs/technical/【技术方案】AI游戏创作智能体App实施计划-2026-06-24.md` 的“2026-09-17 AGC 项目定时快照上传”与“后台工程列表与下载”两节;`docs/project-memory/plans/` 的两份里程碑与实施计划。
- 验证方式:`cargo test --manifest-path apps/ai-game-creator-shell/src-tauri/Cargo.toml project_snapshot`24 passed、0 failed、1 ignored),新增用例覆盖 `.agent` 整目录进入候选集、`.agent` 内凭据与 `.env*` 仍被排除、项目索引与 checkpoint 口径不变;另用同一份规则复算 15 个本机 AppData 项目的 487 个 `.agent` 普通文件,0 个仍落在排除集。
- 运行时证据(2026-09-22):真实项目副本(`.agent` 164 文件 / 5.61 MiB`projectId=gameagent-agentsmoke1`)经真实差异引擎 → 本地 api-server → 真实 OSS `agc-dev``uploaded=179`(= 原口径 15 个项目文件 + 164 个 `.agent` 文件)/18,991,590 字节、`synced` 后第二轮 `no-op`;只读 GET 远端 `agc/project-snapshots/v1/<user>/gameagent-agentsmoke1/manifest.json``files=179``.agent/**` 164 条)、HEAD 命中 `agent.db` 等对象;后台 download 的 ZIP 含 179 条目(164 条 `.agent/`),抽样文件 SHA-256 与本地一致。注意该 bucket 仍是 `v1/` 键布局:本地 `api-server.exe`2026-09-21 14:06)早于渠道分区提交 `4951b71d7`16:57),重建重启后才会写 `v2/{channel}/`
## 2026-09-21 合并 origin/masterSupervisor 永久退役,策划 V1V2 退役落到当前两条产品路径
- 背景:`refactor/split-direct-project`DirectProject 独立聊天容器)与 `origin/master`#355 退役策划 Agent V1/V2)在 2026-09-18 之后各走一条线:本分支删掉 Supervisor 前端链路、把立项策划收敛到 `view/project-development/planning/`master 删掉整套策划 V1/V2(前端会话 / 审批卡 / 适配器 / 类型与 Rust `planning_*_v2` 命令、`planning_gdd_model.rs``planning_policy_v2.rs``planning_session_v2.rs`)只保留 Design Agent。两边都在删 Supervisor,冲突集中在 `App.tsx`、聊天视图(`PlanningChatView``DirectProjectTurn``ToolCallGroup`)、Direct composer / 引用输入区、`styles.css`、Rust direct user item 与 appSurface 用例。