ci / test (pull_request) Successful in 2m17s
Why: the final task-sync before merging PR #179 committed its checkpoint row locally (43a1514) but was not pushed before the merge, so the row never reached the archived card. Evidence: row | 同步前验收 |1263e7f7d1|bfc2208cbd| 2026-10-04T12:49:36Z | appended next to the 12:42:58Z row in .task/archive/feature-svc-info.md. Impact: card-archive-only change on this close branch; no code. Refs: PR #179; .task/archive/feature-svc-info.md
4.4 KiB
4.4 KiB
feature/svc-info 任务卡
任务主记录:PR #179 https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/179(merge 5d3a4b3ee3);状态:已完成(回填);owner:weichen
基线与授权
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)=
1263e7f7d1 - 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-svc-info(worktree);分支:feature/svc-info
- 授权与交付终点:实现
scripts/svc.sh info综合信息报告(只读);终点 = PR 合入 main(附 precheck / task-sync / 功能验证三段证据)
目标与非目标
目标:
- 新增全局子命令
scripts/svc.sh info [name] [--tag T] [--reveal],一条命令展示本机现场: 运行中的服务(list 表格 + 运行汇总)、postgres 实例详情(含运行中实例的内部数据库 列表与大小、数据目录/备份体量)、配置文件与内容快照(逐服务 svc.env、全局 .svc.env、 本次 --config、shell 层 SVC_* 变量)、最近事件。 - 敏感值默认掩码(password=、键名含 KEY/PASS/SECRET/TOKEN/DSN、DSN 内密码段),
--reveal才显示;报告整体走 stdout 便于整页保存。 - 同步更新:usage/usage_short/help(lifecycle、model 保留字补全 update/info)、docs/svc.md (新 §6.2,原 6.2-6.4 顺延 6.3-6.5)、Makefile(svc-info 目标 + help)。
非目标:不改 deploy/生命周期/db 运维任何行为;不做 JSON 输出;不涉 Web UI。
实现摘要
info加入保留字(RESERVED_ENVS 与 help model 文档同步补全)。- 复用与抽取:
registered_names(global_list 复用)、history_print_rows(cmd_history 复用); 新增 mask_dsn/mask_kv(掩码)、info_pg_block/info_config_block/info_global_config/ info_names_filtered、cmd_info。 - main() 分派
info子命令;make svc-info。
同步记录
| 节点 | sync_base_sha | tested_head_sha | checked_at |
|---|---|---|---|
| 启动 | 1263e7f7d1 |
1263e7f7d1 |
2026-10-04T12:34:43Z |
结果与验证
- 结果:已实现。
svc.sh info(全景:服务表+汇总/数据库实例+内部库/配置快照/最近事件)、info <name>(单服务深度)、--tag过滤、--reveal显示敏感值;退出码:0 成功、2 用法错误。 - 验证(worktree runtime 内实测,2026-10-04):
bash -n通过(shellcheck 本机不可用);- 空 runtime:五节报告友好空态,exit 0;
- 伪造登记(agent+DSN 密码 / static / postgres 停机 + 备份文件 + .svc.env 含
SVC_TAVILY_KEYS):全景报告正确;掩码实测——exec 内 DSN 密码→
***、password=***、SVC_TAVILY_KEYS=***、非敏感值原样;--reveal显示明文; - 真实 postgres:
db create r-pg --port 18901→ start → 建额外库 orders → db backup → info 数据库节显示"运行中 pid、内部库 postgres/agent/orders 及大小、pgdata 43M、 备份 1 份";rm r-pg --purge回收;测试现场(伪造登记/.svc.env)全部清除; - 回归:
list/history/--help/help lifecycle/make svc-info均正常;infostdout 纯净(stderr 0 字节),可整页重定向; - 正式验收:
make test(task-sync 后运行,tested_head=106ef07ef0)exit 0—— test-boundaries + test-pins + test-libs(agent-intent/native/squad vet+test)+ test-core + test-backend + test-frontend + test-ui(11 文件 79 用例全过)+ test-agentcmd。
- 影响与剩余项:无行为变更(info 只读);剩余项无。
| 同步前验收 |
1263e7f7d1|106ef07ef0| 2026-10-04T12:42:58Z | | 同步前验收 |1263e7f7d1|bfc2208cbd| 2026-10-04T12:49:36Z |
闭合记录(card-autoclose 回填)
- 依据:merge 5d3a4b3ee3e69d9c47eeb2779eb1c7156c42186b(PR #179)已包含于 origin/main,分支成果已落盘;本段为合入后回填。
- 合并主题:Merge pull request 'Add read-only svc.sh info report for services, databases, and config snapshots' (#179) from feature/svc-info into main
- 归档:随闭合移入 .task/archive/;任务执行期的过程证据见原任务记录与 PR。