Files
Agent-System-Dev/.task/archive/feature-svc-cli-args.md
T
weichen 1615eb5996
ci / test (pull_request) Failing after 1m34s
Close the svc-cli-args task card and archive it
Why: merged card needs its PR link backfilled and archived per the
no-bookkeeping-debt rule.

Evidence: Dev PR #47 merged; card records the live flag matrix.

Impact: card archived with link; no code change.
2026-09-30 11:50:41 +00:00

21 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# feature/svc-cli-args 任务卡
任务主记录:https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/47(已合入);状态:已完成;owner:weichen
## 基线与授权
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0 = 1174431ee6953ddc6e319f8fdbd8ecbf18576dbf
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-svc-cli-args;分支:feature/svc-cli-args
- 授权与交付终点:用户要求 svc.sh 支持命令行参数(监听地址/端口/数据库端口等)→ 实现并实测后自主闭环合入。
## 目标与非目标
- 目标:CLI 参数面 --addr/--host/--port/--data/--dsn/--auth/--mock/--plugins/-- 透传;优先级 CLI > SVC_* 环境变量 > 默认;健康探测跟随绑定主机(0.0.0.0→127.0.0.1);make svc ARGS 透传。
- 非目标:数据库端口单独拆参(端口在 DSN 内整体传递,已在 help 说明);不改服务本身。
## 结果与验证
- 结果:scripts/svc.sh 参数化 + Makefile ARGS + help 重写。
- 验证(全实测):--port 8801 ✓;--host 0.0.0.0(ss 验证 *:8812 绑定、健康探测自动映射)✓;--addr 整体 ✓;CLI 覆盖 SVC_DEV_ADDR ✓;--mock 进 cmdline ✓;--dsn 假 DSN → PG 连接尝试日志证明透传 + 优雅失败路径 ✓;`--` 透传 --artifacts ✓;make svc ARGS ✓。实测抓出并修复 set -e 静默退出陷阱(条件语句作为函数末语句)。端口守卫实战:主检出并行启动的 dev 实例被正确拒接并列名,未受影响。
- 影响与剩余项:DSN 含密码建议走 SVC_PROD_DSN 环境变量(避免进 shell 历史),已在 help 标注。