Skip to content

ops: consolidate deployment entrypoints and remove dead script paths#193

Merged
liujuanjuan1984 merged 9 commits intomainfrom
ops/code-cleanup-dead-code-audit
Mar 17, 2026
Merged

ops: consolidate deployment entrypoints and remove dead script paths#193
liujuanjuan1984 merged 9 commits intomainfrom
ops/code-cleanup-dead-code-audit

Conversation

@liujuanjuan1984
Copy link
Collaborator

概要

本 PR 以代码健康治理和部署入口收口为主,聚焦两件事:

  1. 清理发布/部署重构后遗留的重复、冗余与失效路径
  2. 将用户与贡献者的部署入口重新收口到更清晰的分层模型

整体方向是继续贯彻 release-first:

  • 用户路径默认围绕已发布版本
  • 正式部署只保留 release-based systemd 路径
  • 源码路径降级为 contributor / internal debugging only

模块一:重复、冗余与死代码清理

对应 issue:#191

本模块主要完成:

  • 删除不再具备独立职责的 release 更新 wrapper:scripts/deploy/update_a2a_release.sh
  • 修正文档中已经失效的 deploy_light.sh start/stop/status/restart 旧用法
  • 删除重复的本地运行入口:scripts/start_services.sh 与对应文档
  • 删除已经不再符合产品分层的 scripts/deploy_light.shscripts/deploy_light_readme.md
  • 调整相关测试断言,防止旧入口和旧文档再次回流

结果是:

  • 部署与本地运行入口数量进一步减少
  • 文档暴露的用户入口不再和实际推荐路径冲突
  • 仓库维护面明显收窄

模块二:部署模型与文档入口收口

对应 issue:#192

本模块主要完成:

  • README.md 只保留两条用户主路径:
    • 已发布 CLI + 直接命令自启动
    • release-based systemd 正式部署
  • docs/agent_deploy_sop.md 收口为正式部署 SOP,不再混入轻量脚本路径
  • source-based systemd/bootstrap 文档统一降级为 contributor / internal debugging only
  • scripts/README.mdscripts/uninstall_readme.md 等脚本索引与链接关系同步更新
  • 将重复的 shell truthy helper 收口到共享脚本 scripts/shell_helpers.sh
  • 去掉 deploy_light.sh 对旧动作词的兼容壳,最终进一步整体移除这条路径

结果是:

  • 用户、运维、贡献者三类路径的边界更清晰
  • 用户文档不再默认把用户带到源码或中间态 wrapper
  • 正式部署与已发布版本的关系更加一致

模块三:验证

已执行:

  • uv run pre-commit run --all-files
  • uv run pytest

结果:

  • 177 passed
  • coverage 84.38%

相关 commits

  • b34e7c8 ops: remove redundant release deploy wrapper #191
  • 190ea34 docs: remove stale deploy_light action verbs #191
  • 11974f6 docs: refocus user paths on released deployments #192
  • 05b9a2b ops: remove duplicate local runner entrypoint #192
  • 4246eee docs: downgrade source deploy path to internal use #192
  • 48b2a13 ops: share shell truthy helper across deploy scripts #192
  • 15bb082 ops: remove deploy_light legacy action shim #192
  • c316e65 chore: refresh secrets baseline after script cleanup #192
  • c6efc94 ops: remove deploy_light helper path #192

代码审查结论

本 PR 以删除和收口为主,改动方向合理,没有发现当前需要阻塞合并的实现问题。

重点判断如下:

  • #191:这轮已经完成一批可安全确认的冗余/失效路径清理,范围克制,没有对核心服务逻辑做不必要扰动
  • #192:当前分层已经和设计原则一致,用户路径、正式部署路径、源码调试路径的边界明显比改动前清楚
  • deploy_light.sh 的移除是合理的:它不再承载主机级复杂度,长期价值不足以支撑继续维护

残余风险:

  • source-based systemd 路径仍然保留为 contributor / internal debugging only;这属于刻意保留的内部调试能力,不是本 PR 的目标缺口
  • release-based systemd 路径的真实主机 smoke test checklist 已有,但是否在更多真实主机环境复验,仍取决于后续运维执行

关联关系

Closes #191
Closes #192

@liujuanjuan1984 liujuanjuan1984 marked this pull request as ready for review March 17, 2026 14:05
@liujuanjuan1984 liujuanjuan1984 merged commit b3c483d into main Mar 17, 2026
3 checks passed
@liujuanjuan1984 liujuanjuan1984 deleted the ops/code-cleanup-dead-code-audit branch March 17, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ops] 收敛脚本入口并清理部署文档与 shell helper 冗余 [ops] 审查并清理重复、冗余与死代码

1 participant