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

Evidence: Dev PR #51 merged; card records the env-file test matrix.

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

1.5 KiB
Raw Blame History

feature/svc-envfile 任务卡

任务主记录:https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/51(已合入);状态:已完成;owner:weichen

基线与授权

  • 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0 = 251bd94847
  • 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-svc-envfile;分支:feature/svc-envfile
  • 授权与交付终点:用户要求 --env 指定环境配置文件(如 ./.env.dev)且 --port 等 CLI 参数可覆盖文件配置 → 实现并实测后自主闭环合入。

目标与非目标

  • 目标:--env FILE(任意位置,支持 = 形式);dotenv 安全解析(# 注释、成对引号、export 前缀、仅合法变量名、不执行文件内容);优先级 CLI > --env > .svc.env > 系统环境变量 > 默认;与播种机制贯通。
  • 非目标:不做多文件合并语法;不引入真实 dotenv 依赖。

结果与验证

  • 结果:svc.sh 预扫 --env + load_env_file 安全解析 + help 更新。
  • 验证(全实测):.env.dev(含 export/引号/注释)地址与模型生效并播种(ss 验证 :8830);--port 8831 覆盖文件端口、host 仍取文件(:8831);缺文件快速报错;.svc.env 与 --env 分层(重叠键 --env 赢、非重叠键合并,tavily 保留)。
  • 影响与剩余项:.env.* 文件含密钥需自行 gitignore(.svc.env 已内置,示例文件已在 help 标注建议)。