Record goals and agent receipts on the svc/surface followups card

Why: the card must state authorization, goals and unit receipts including the failed-unknown and authorized Backend rerun.
Evidence: agent-exec receipts under /tmp/svc-sa-surface-20261021.
Impact: task card only.
Refs: fix/svc-superadmin-envfile-surface-conv.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-21 15:05:22 +00:00
co-authored by Cursor
parent 1edf326448
commit 0194c5d847
@@ -7,7 +7,7 @@
- 分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
- 需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=1c2e2ec0089a4a524959716deb24ea3e48312199979f87e70337c4b40197747b;triage_receipt=/tmp/svc-sa-surface-20261021/triage.json;receipt_sha256=2adcb48f6e44ae1996bb1e0b09ba34860e4e0a2ae3e5b3dce4e0a84a19a6375e
- 授权与交付终点:<本次允许的动作与终点;未授权事项写明>
- 授权与交付终点:用户 2026-10-21「未处理的其他记录也解决修复一下」(svc 不持久化超级管理员凭据;`POST /api/surfaces` 接受空 `conversationId`);Backend 单元 failed-unknown 后用户选择「全新重跑一次」。终点:Backend 与 Dev 经 PR 合入,并以 `AGENT_SYSTEM_ENV_FILE` 重启 prod 一次登记凭据路径。未授权:prod 业务角色配置、高后果 git 操作
- 交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
- 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
- 合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
@@ -15,7 +15,9 @@
## 目标与非目标
<预期结果、受影响入口/模块/契约;明确不做什么。>
- 目标 1(`scripts/svc.sh`):agent 服务新增登记键 `superadmin_envfile=`,只存凭据文件绝对路径。deploy/start/restart 时若环境给出 `AGENT_SYSTEM_ENV_FILE`,先在停旧服务前校验(普通文件、属当前用户、无组/其他权限位),通过后登记;空值清除登记。拉起 serve 时本次环境未显式给超管凭据则转发登记路径,recover/watchdog 的清空环境子进程因此也能拉起认证实例。`status` 显示登记路径;`docs/svc.md` §4.2 补说明;新增 `tests/test_svc_superadmin_envfile.py`。
- 目标 2(Backend):`POST /api/surfaces` 新建页面(无 `surfaceId`)时要求本人存在的 `conversationId`:空值 400,不存在或他人会话 404;修订语义不变。原因:空/未知会话使页面无项目归属,动作接口随之跳过项目生命周期检查。
- 非目标:svc 读取或复制凭据内容;surfacesvc/模型工具路径改动;prod 业务角色配置。
## Agent 实施收据
@@ -23,7 +25,9 @@
| 单元 ID | 预期范围 | 配置摘要 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|---|---|---|---|---|---|---|---|---|---|---|
| 待定义 | — | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | NOT_RUN | — |
| dev-svc-superadmin-envfile-persist | scripts/svc.sh、tests/test_svc_superadmin_envfile.py、docs/svc.md | AGENT-EXECUTION.md | implementation | 按配置 | 1(fresh_session) | cursor | success | apply 快进 0e6453b | 未用 | /tmp/svc-sa-surface-20261021/dev-run.json |
| backend-surface-submit-conversation-required | Backend internal/server/platform_api.go、surface_api_test.go | Backend AGENT-EXECUTION.md | implementation | 按配置 | 1(fresh_session) | pi | failed-unknown(隔离区执行 `git submodule update --init` 致 local_config 变化,违反单元约束;源 worktree 未变,现场保留)→ fail-stop | 无 | 未用 | /tmp/svc-sa-surface-20261021/backend-run-attempt1-failed-unknown.json |
| backend-surface-submit-conversation-required(用户批准全新重跑,单元补子模块初始化与配置逐字节恢复约束) | 同上 | Backend AGENT-EXECUTION.md | implementation | 按配置 | 1(fresh_session) | pi | success | apply 快进 1e73822→954e744(amend 规范提交,tree 不变) | 未用 | /tmp/svc-sa-surface-20261021/backend-run.json |
## 同步记录
@@ -89,3 +93,34 @@
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/ec446f0a238e6f6c64167ff09c23059b47bf08df92852d1ac12ee540348affed.json"
}
```
<!-- Local receipt: SELF. Digests detect corruption; they do not authenticate a reviewer or CI. -->
```json
{
"summary_schema": 1,
"source": "SELF",
"timestamp": "2026-10-21T14:22:12.910602+00:00",
"command": "PYTHONDONTWRITEBYTECODE=1 python3 -m unittest tests.test_svc_superadmin_envfile tests.test_svc_recover tests.test_svc_identity",
"exit_code": 0,
"cwd": "/home/weichen/projects/Agent-System-Dev-wt-fix-svc-superadmin-envfile-surface-conv",
"before_head": "0e6453bd530feedd973ccfb05f587c5d9d9a6ffc",
"after_head": "0e6453bd530feedd973ccfb05f587c5d9d9a6ffc",
"branch": "fix/svc-superadmin-envfile-surface-conv",
"target_branch": "main",
"target_head": "d9e9c0560a2767539f4415b579adbeff86a22ba6",
"root_target": "main",
"immediate_target": "main",
"before_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"after_tracked_diff_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"output_tail": [
"......................................s............",
"----------------------------------------------------------------------",
"Ran 51 tests in 52.867s",
"",
"OK (skipped=1)"
],
"output_sha256": "5cde79b38a542c3831ae872cd4d7a2b9cd0ba84b0b129442ded6d4adea577a27",
"receipt_sha256": "3d71bc9d4f8e5ed81db87aae76cc3e649dd90f09ee17dafc1bb8ab494725a5ce",
"receipt_path": "/home/weichen/.cache/agent-system-dev/evidence/3d71bc9d4f8e5ed81db87aae76cc3e649dd90f09ee17dafc1bb8ab494725a5ce.json"
}
```