WIP: 清理 AGC 壳 agent 子系统编译 warning(#649) #653

Closed
suzmii wants to merge 0 commits from chore/agc-warnings-agent into master
Member

关联

说明:本 PR 的第二批(AuthBridge / OAuth 链路删除)的 commit 尚未 push;本次更新正文时 diff 仍只有第一批(10 文件 +38/−1303)。push 后这行会移除。

认证路线决策(2026-10-06)

不支持用户自有 Codex 的 OAuth 登录态,模型流量统一走我们的中转站。 与 Issue #649 评论 6844 及 PR #650 正文同口径。按 AGC 主方案「OAuth 认证路线的契约冲突与待决边界」决策表第一行执行:删除 AuthBridge reader / variant、OAuth 专属目录分支、轮换链及专属测试,并撤销相关文档承诺;保留中转站(平台代理 / 显式自定义 Key)路由、共享模型目录与隔离运行环境。链路删除后 AuthBridge 3 条 warning 随之归零,门禁清单里唯一的实现层例外关闭。

本批(当前 commit:AuthBridge / OAuth 链路删除)

删除范围

  1. CodexAppServerCredential::AuthBridge 变体及其 fingerprint() / direct_provider_route() 分支;
  2. GAME_CREATOR_CODEX_AUTH_BRIDGE_API_BASE_URL;
  3. prepare_isolated_game_creator_codex_home 里复制 auth.json 的桥接体;
  4. OAuthHandoff 轮换链;
  5. cfg(test) 限定的 OAuth 专属项:find_game_creator_codex_auth_path / read_game_creator_codex_auth_bridge / 旧凭据 resolver;
  6. model_catalog.rs 的 OAuth 专属分支:CatalogSource::{Bundled,Authenticated} / source_for_credential / verify_authenticated_source / cache 新鲜度门禁与 authenticated-fresh-cache 回执等;
  7. model_catalog/auth_handoff.rs 整个模块;
  8. G11 余下 6 条:GAME_CREATOR_CODEX_APP_SERVER_PROTOCOL、protocol_identity、AUTH_MAX_BYTES、ToolHost 变体、acquire、request_ / stream_game_creator_agent_codex_app_server。

保留(在役调用点)

  • 中转站路由:mod.rs:2233-2257 构造 → acquire_at_workspace,被 mod.rs:5153 DirectProject 与 mod.rs:5235 home chat 调用;
  • provider-proxy 桥;
  • AppData / 显式自定义 Key 路由;
  • 每回合模型目录捕获 model_catalog::capture(文档点名必须保留);
  • 隔离运行环境。

失去的测试覆盖

  • 8 个用例整体删除:codex_app_server_auth_bridge_snapshot_drives_pool_and_isolated_home、codex_app_server_real_smoke_uses_existing_local_auth(#[ignore])、oauth_cache_requires_current_version_timestamp_and_exact_metadata、auth_bridge_respects_explicit_mode_and_legacy_api_key、oauth_rejects_an_existing_cache_before_starting_a_process、sdk_private_artifact_rejects_hardlinks_before_initializing_ownership、real_oauth_catalog_preserves_remote_metadata_and_rejects_successful_fallback(#[ignore])、auth_handoff.rs 的 4 个轮换用例;
  • 2 个用例裁掉 AuthBridge 半边:remote_control_disable_policy_matches_the_credential_boundary、direct_project_brokers_api_key_auth_without_materializing_auth_json(AppDataKey 半边保留);
  • 约 13 处测试位点从 ToolHost 迁到 DirectHome。

计数

本批计数以 lane C 编译验证完成后的实测值为准,本 PR 不预先断言未复核的数字。

本 PR 内更早的一批(agent/generation 退役链)

  • 范围:agent/generation/{pass_artifacts,draft_validation,draft_writer,trace}.rs 退役运行时 / pass 生成链;agent.rs、generation.rs、redaction.rs、task_lock.rs、direct_events.rs 的无用导入与测试 helper 收敛;
  • 规模:10 文件 +38 / −1303;
  • agent 相关文件 bin 口径:112 → 63;
  • 全 crate 剩余计数以该批的复核报告为准。

两批的 commit 与计数分开记录。

未做 / 待做(同一分支后续 commit)

  • G8 余下 4 文件;
  • G12 codex_cli;
  • runtime_models;
  • thread_manager 的 cfg 收敛。
## 关联 - Issue #649 > 说明:本 PR 的第二批(AuthBridge / OAuth 链路删除)的 commit 尚未 push;本次更新正文时 diff 仍只有第一批(10 文件 +38/−1303)。push 后这行会移除。 ## 认证路线决策(2026-10-06) **不支持用户自有 Codex 的 OAuth 登录态,模型流量统一走我们的中转站。** 与 [Issue #649 评论 6844](http://git.genarrative.world/git/GenarrativeAI/Genarrative/issues/649) 及 PR #650 正文同口径。按 AGC 主方案「OAuth 认证路线的契约冲突与待决边界」决策表第一行执行:删除 AuthBridge reader / variant、OAuth 专属目录分支、轮换链及专属测试,并撤销相关文档承诺;保留中转站(平台代理 / 显式自定义 Key)路由、共享模型目录与隔离运行环境。链路删除后 AuthBridge 3 条 warning 随之归零,门禁清单里唯一的实现层例外关闭。 ## 本批(当前 commit:AuthBridge / OAuth 链路删除) ### 删除范围 1. `CodexAppServerCredential::AuthBridge` 变体及其 `fingerprint()` / `direct_provider_route()` 分支; 2. `GAME_CREATOR_CODEX_AUTH_BRIDGE_API_BASE_URL`; 3. `prepare_isolated_game_creator_codex_home` 里复制 `auth.json` 的桥接体; 4. `OAuthHandoff` 轮换链; 5. `cfg(test)` 限定的 OAuth 专属项:`find_game_creator_codex_auth_path` / `read_game_creator_codex_auth_bridge` / 旧凭据 resolver; 6. `model_catalog.rs` 的 OAuth 专属分支:`CatalogSource::{Bundled,Authenticated}` / `source_for_credential` / `verify_authenticated_source` / `cache` 新鲜度门禁与 `authenticated-fresh-cache` 回执等; 7. `model_catalog/auth_handoff.rs` 整个模块; 8. G11 余下 6 条:`GAME_CREATOR_CODEX_APP_SERVER_PROTOCOL`、`protocol_identity`、`AUTH_MAX_BYTES`、`ToolHost` 变体、`acquire`、`request_` / `stream_game_creator_agent_codex_app_server`。 ### 保留(在役调用点) - 中转站路由:`mod.rs:2233-2257` 构造 → `acquire_at_workspace`,被 `mod.rs:5153` DirectProject 与 `mod.rs:5235` home chat 调用; - provider-proxy 桥; - AppData / 显式自定义 Key 路由; - 每回合模型目录捕获 `model_catalog::capture`(文档点名必须保留); - 隔离运行环境。 ### 失去的测试覆盖 - **8 个用例整体删除**:`codex_app_server_auth_bridge_snapshot_drives_pool_and_isolated_home`、`codex_app_server_real_smoke_uses_existing_local_auth`(`#[ignore]`)、`oauth_cache_requires_current_version_timestamp_and_exact_metadata`、`auth_bridge_respects_explicit_mode_and_legacy_api_key`、`oauth_rejects_an_existing_cache_before_starting_a_process`、`sdk_private_artifact_rejects_hardlinks_before_initializing_ownership`、`real_oauth_catalog_preserves_remote_metadata_and_rejects_successful_fallback`(`#[ignore]`)、`auth_handoff.rs` 的 4 个轮换用例; - **2 个用例裁掉 AuthBridge 半边**:`remote_control_disable_policy_matches_the_credential_boundary`、`direct_project_brokers_api_key_auth_without_materializing_auth_json`(AppDataKey 半边保留); - 约 **13 处**测试位点从 `ToolHost` 迁到 `DirectHome`。 ### 计数 本批计数以 lane C 编译验证完成后的实测值为准,本 PR 不预先断言未复核的数字。 ## 本 PR 内更早的一批(`agent/generation` 退役链) - 范围:`agent/generation/{pass_artifacts,draft_validation,draft_writer,trace}.rs` 退役运行时 / pass 生成链;`agent.rs`、`generation.rs`、`redaction.rs`、`task_lock.rs`、`direct_events.rs` 的无用导入与测试 helper 收敛; - 规模:10 文件 **+38 / −1303**; - agent 相关文件 bin 口径:**112 → 63**; - 全 crate 剩余计数以该批的复核报告为准。 两批的 commit 与计数分开记录。 ## 未做 / 待做(同一分支后续 commit) - G8 余下 4 文件; - G12 `codex_cli`; - `runtime_models`; - `thread_manager` 的 `cfg` 收敛。
suzmii added 1 commit 2026-10-06 16:37:56 +08:00
chore(agc): 清掉 agent 生成链退役实现的 dead_code 与未用导入
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 4m1s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 2m15s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 4m45s
Project CI / Frontend tests (pull_request) Successful in 3m51s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m46s
Project CI / Repository checks (pull_request) Failing after 3m53s
Project CI / Backend tests (pull_request) Successful in 9m2s
Project CI / Native shell tests (pull_request) Successful in 11m6s
22540a874a
- 删除已退役的多 pass 生成链实现:generation/pass_artifacts.rs(保留仍被
  project/memory.rs 使用的 agent_role_memory_relative_path*)、
  generation/draft_writer.rs(整文件)、generation/draft_validation.rs 与
  generation/trace.rs 中已无任何 cfg 引用的实现与其专属测试。
- generation.rs 按新边界收敛 re-export;draft_validation.rs 不再需要 use super::*。
- redaction.rs / task_lock.rs 删除无调用方的 helper;task_lock 的 Mutex/OnceLock
  只在 unix 分支使用,按 cfg 收敛导入。
- direct_events.rs 删除只服务已删实现的测试 helper。
- agent.rs 删除未使用的 BTreeSet/Seek/Atomic* 导入(sha2 仍被子模块经 use super::*
  使用,保留)。
- build_support/codex_bundle.rs:CLI_VERSION 只在发行构建与单测使用,按 cfg 收敛。

无新增 allow,无假引用;AGC 壳 bin 口径(cocos/unity/godot-editor-execute)编译通过。
Author
Member

内容已并入 #650(单 PR 口径:用户要求不再按模块拆分 PR,避免逐分支功能测试)。分支 chore/agc-warnings-agent 保留在远端作为历史,不再单独合并。

内容已并入 #650(单 PR 口径:用户要求不再按模块拆分 PR,避免逐分支功能测试)。分支 `chore/agc-warnings-agent` 保留在远端作为历史,不再单独合并。
suzmii closed this pull request 2026-10-06 16:58:33 +08:00
Some checks are pending
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Failing after 4m1s
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Failing after 2m15s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 4m45s
Project CI / Frontend tests (pull_request) Successful in 3m51s
Project CI / AI game creator shell web tests (pull_request) Successful in 3m46s
Project CI / Repository checks (pull_request) Failing after 3m53s
Project CI / Backend tests (pull_request) Successful in 9m2s
Project CI / Native shell tests (pull_request) Successful in 11m6s

Pull request closed

Sign in to join this conversation.