Files
Agent-System-Dev/.task/archive/feature-svc-env-script.md
T
weichen 4cdeeabfb9
ci / test (pull_request) Failing after 31s
Close the svc-env-script task card and archive it
Why: merged card needs its PR link backfilled and archived per the
no-bookkeeping-debt rule.

Evidence: Dev PR #45 merged; card records the live test matrix.

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

21 lines
1.8 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-env-script 任务卡
任务主记录:https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/45(已合入);状态:已完成;owner:weichen
## 基线与授权
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0 = fcddfee5be45870071c18d921173f58bfab9e851
- 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-svc-env-script;分支:feature/svc-env-script
- 授权与交付终点:用户要求 dev/prod 环境服务脚本(停旧→构建→启动,环境互不影响)→ 实现并实测后自主闭环合入。
## 目标与非目标
- 目标:scripts/svc.sh(deploy/stop/start/restart/status/logs);dev/prod 完全隔离(端口/数据/日志/pidfile);只停自己启动的进程(他人现场不动);make svc 快捷目标。
- 非目标:不做 systemd/容器编排(原生脚本档);不做开机自启。
## 结果与验证
- 结果:scripts/svc.sh + `make svc ENV=dev|prod [ACTION=...]` + runtime/ gitignore。默认 dev 127.0.0.1:8788 / prod 127.0.0.1:8787,SVC_*_ADDR/DATA/DSN/DEV_MOCK/PROD_AUTH 可覆盖;svc.env 落盘实际启动参数供 status 显示。
- 验证(全部实测):dev deploy 全链(停旧→make build→健康检查 200);重部署换新 PID 且数据保留(dev-only 项目仍在);prod(8799 覆盖端口)与 dev 并存,/api/projects 互不可见;端口冲突(prod 抢 8788)拒接并点名占用进程,dev 持续 200;stop 清 pidfile 释放端口。实测抓出并修复 PID 捕获缺陷(复合后台作业写入了包装进程 PID)。
- 影响与剩余项:首次 prod 使用 8787 若与现存手工实例冲突会明确拒接(预期行为,按提示处理);PG 档经 SVC_PROD_DSN 传递未在本环境实测。