docs(ops): record squad missing-target retry closeout and test evidence
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
---
|
||||
title: "智能体小队故障根治(治理死锁 + MISSING_TARGET 纠偏重试)"
|
||||
task_id: squad-missing-target-retry-2026-09-23
|
||||
status: done
|
||||
created: 2026-09-23
|
||||
updated: 2026-09-23
|
||||
owner: Cursor
|
||||
task_type: implementation
|
||||
task_tier: multi_stage
|
||||
policy_revision: "agent-governance-2026-09-21-r1 @ 78c2bcf6"
|
||||
branch: feature/squad-missing-target-retry-2026-09-23
|
||||
worktree: .worktrees/squad-missing-target-retry-2026-09-23
|
||||
base_dev_sha: "78c2bcf6b6881dc9b50f5d0b0e9be31fadb1c681"
|
||||
head_sha: "4830b8ba6d4847cded6463f9c5595b8a6e76967c"
|
||||
write_scope: ["deploy/pi-agent", "internal/agent", "internal/squad", ".doc"]
|
||||
allowed_environments: ["test"]
|
||||
mutex: squad-missing-target-retry
|
||||
review_state: not_required
|
||||
integration_state: merged_local_dev_and_test
|
||||
deployment: test_ok
|
||||
cleanup: pending
|
||||
cleanup_owner: 独立维护者
|
||||
cleanup_trigger: tip 为 local_dev/origin 祖先且无进程占用后 remove
|
||||
remote_sync: not_requested
|
||||
---
|
||||
|
||||
# 智能体小队故障根治
|
||||
|
||||
## 用户目标与授权
|
||||
|
||||
- 用户目标:定位并彻底修复「智能体小队总是出错」。
|
||||
- 授权:env:test 运营解锁 + 代码修复 + 合入 local_dev 并晋升 test;不 push 远端、不动 main。
|
||||
|
||||
## 根因
|
||||
|
||||
1. **R1 治理死锁(运营)**:单人项目无法配齐三职,且 `workflow.allow_author_only_approval=false` → 规划存不下 → 永远无法激活 → 任务 100% `blocked_pending_governance`。
|
||||
2. **R2 MISSING_TARGET(代码)**:PI 正常 settle 但未 write `output.md` 时被判 permanent,零重试直接失败。
|
||||
|
||||
## 结果
|
||||
|
||||
| 项 | 值 |
|
||||
|---|---|
|
||||
| author_only(test) | `true` revision=1(审计 API) |
|
||||
| 代码合入 | `dev` merge `357e4ddb`(candidate) |
|
||||
| test tip | `9984c68d` + tag `rc-v1.1.0-beta.5` |
|
||||
| pinned | `357e4ddb` digest;`:8081` schema 65 |
|
||||
| E2E | project 6012 `bd_intake` `run_1790162579970596047` **completed** |
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] test 开启 author_only → 单人项目 save-plan / preview / activate
|
||||
2. [x] `settled-no-deliverable` → transient + 纠偏 Prompt;settle-policy `retryable=true`
|
||||
3. [x] Go/Node 回归 + arch-check
|
||||
4. [x] integrate → promote + pinned rebuild
|
||||
5. [x] test 真实验收(小队任务 completed)
|
||||
6. [x] 任务记录与测试报告落盘
|
||||
|
||||
## 边界
|
||||
|
||||
- author_only **仅 test** 开启;dev/main 默认关闭。
|
||||
- 纠偏重试受 `MaxTransientStepInvocations=2` 硬上限;不把 trace/聊天正文当交付物落盘。
|
||||
|
||||
## 相关
|
||||
|
||||
- 报告:[../../test-reports/2026-09-23-squad-missing-target-retry-test-report.md](../../test-reports/2026-09-23-squad-missing-target-retry-test-report.md)
|
||||
- 晋升:`promote-squad-missing-target-retry-test-2026-09-23` → `rc-v1.1.0-beta.5`
|
||||
@@ -0,0 +1,61 @@
|
||||
---
|
||||
title: "智能体小队故障根治 — 测试报告"
|
||||
date: 2026-09-23
|
||||
task_id: squad-missing-target-retry-2026-09-23
|
||||
verdict: PASS
|
||||
---
|
||||
|
||||
# 智能体小队故障根治 — 测试报告
|
||||
|
||||
## 结论
|
||||
|
||||
R1(test author_only 解锁)+ R2(settled-no-deliverable 纠偏重试)已落地;local `test@9984c68d` + `rc-v1.1.0-beta.5` pinned 重建后,项目 6012 触发「编写用户初始需求收集表」小队任务 **completed**(不再 `blocked_pending_governance`)。未 push 远端。
|
||||
|
||||
## 版本矩阵
|
||||
|
||||
| 项 | 值 |
|
||||
|---|---|
|
||||
| feature head | `4830b8ba` |
|
||||
| integrate candidate / local_dev tip(合入时) | `357e4ddb` |
|
||||
| local test | `9984c68d` |
|
||||
| rc tag | `rc-v1.1.0-beta.5` → `9984c68d` |
|
||||
| pinned commit | `357e4ddb` |
|
||||
| app digest | `shuimu-agent-app@sha256:038c301cb68f68d2346fe1e8ad9ed67e844f0338556b8fbffbd35dcf1f02d3ef` |
|
||||
| pi-agent digest | `shuimu-pi-agent@sha256:03e6249ab0f5a44128975f63de48557214498a01a8009ab289bc041082826114` |
|
||||
| test health schema | 65 |
|
||||
| author_only | `true` rev=1 |
|
||||
|
||||
## 命令与判定
|
||||
|
||||
| 步骤 | 判定 | 说明 |
|
||||
|---|---|---|
|
||||
| PUT `workflow.allow_author_only_approval` | PASS | CAS revision 0→1 |
|
||||
| save-plan author_only + activate 6012 | PASS | 7 文档兼任;instance active |
|
||||
| `go test -short ./internal/agent ./internal/squad ./internal/stream` | PASS | 含 settled-no-deliverable 单测 |
|
||||
| `node --test deploy/pi-agent/*.test.mjs` | PASS | clean settle+missing → retryable |
|
||||
| `arch-check --mode block` | PASS | |
|
||||
| agentctl validate + integrate | PASS | ff `78c2bcf6`→`357e4ddb` |
|
||||
| promote merge + update-ref + tag | PASS | P1=`c6f0561b` P2=`357e4ddb` |
|
||||
| candidate-images-build/apply + rebuild | PASS | pinned recreate |
|
||||
| E2E `bd_intake` | PASS | `run_1790162579970596047` completed;三步均有 `output.md` |
|
||||
|
||||
## E2E 要点
|
||||
|
||||
- 创建 HTTP 202,`status=running`(非 blocked)
|
||||
- ~6 分钟后 `completed`;workspace `bd_intake_1790162580039623588`
|
||||
- 交付物:`01_organize` / `02_draft` / `03_review` / 根 `output.md` 均非空
|
||||
|
||||
## 资产
|
||||
|
||||
- [assets/2026-09-23-squad-missing-target-retry/](./assets/2026-09-23-squad-missing-target-retry/)
|
||||
- [promotion-receipts/357e4ddb…](./assets/promotion-receipts/357e4ddb0fe62e12cf6d1321382376257b0fe674.json)
|
||||
|
||||
## 状态
|
||||
|
||||
| 字段 | 值 |
|
||||
|---|---|
|
||||
| review_state | not_required |
|
||||
| integration_state | merged_local_dev_and_test |
|
||||
| deployment | test_ok |
|
||||
| remote_sync | not_requested |
|
||||
| cleanup | pending |
|
||||
@@ -0,0 +1,5 @@
|
||||
key | value | revision
|
||||
-------------------------------------+-------+----------
|
||||
workflow.allow_author_only_approval | true | 1
|
||||
(1 row)
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"create_http": 200,
|
||||
"run_id": "run_1790162579970596047",
|
||||
"final": {
|
||||
"run_id": "run_1790162579970596047",
|
||||
"session_id": "sess-p6012-u4-squad-e2e",
|
||||
"project_id": 6012,
|
||||
"user_id": 4,
|
||||
"client_turn_id": "turn-d7affa45251e",
|
||||
"idempotency_key": "turn:sess-p6012-u4-squad-e2e:turn-d7affa45251e",
|
||||
"task_key": "bd_intake",
|
||||
"stage": "",
|
||||
"workflow_instance_id": 1,
|
||||
"stage_instance_id": 1,
|
||||
"workflow_stage_key": "V0.1_triage",
|
||||
"status": "completed",
|
||||
"workspace_id": "/app/data/workspaces/bizdev/bd_intake_1790162580039623588",
|
||||
"assistant_message_id": 246,
|
||||
"worker_id": "",
|
||||
"lease_expires_at": null,
|
||||
"created_at": "2026-09-23T11:22:59.971662338Z",
|
||||
"updated_at": "2026-09-23T11:28:59.203425671Z",
|
||||
"error_message": "",
|
||||
"attempt": 1,
|
||||
"resumable": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"status":"ok","env":"test","agent_backend":"pi-agent","version":"v1.0","shared_kb_port":5432,"kb_ready":true,"database_ready":true,"schema_version":65,"schema_ready":true,"task_store_ready":true}
|
||||
@@ -0,0 +1,4 @@
|
||||
/app/data/workspaces/bizdev/bd_intake_1790162580039623588/tasks/02_draft/output.md
|
||||
/app/data/workspaces/bizdev/bd_intake_1790162580039623588/tasks/03_review/output.md
|
||||
/app/data/workspaces/bizdev/bd_intake_1790162580039623588/tasks/01_organize/output.md
|
||||
/app/data/workspaces/bizdev/bd_intake_1790162580039623588/output.md
|
||||
@@ -0,0 +1,5 @@
|
||||
14218 /app/data/workspaces/bizdev/bd_intake_1790162580039623588/tasks/02_draft/output.md
|
||||
19238 /app/data/workspaces/bizdev/bd_intake_1790162580039623588/tasks/03_review/output.md
|
||||
13821 /app/data/workspaces/bizdev/bd_intake_1790162580039623588/tasks/01_organize/output.md
|
||||
19239 /app/data/workspaces/bizdev/bd_intake_1790162580039623588/output.md
|
||||
66516 total
|
||||
@@ -0,0 +1,5 @@
|
||||
run_id | status | task_key | workspace_id
|
||||
-------------------------+-----------+-----------+-----------------------------------------------------------
|
||||
run_1790162579970596047 | completed | bd_intake | /app/data/workspaces/bizdev/bd_intake_1790162580039623588
|
||||
(1 row)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
dev=5cdcee26
|
||||
test=9984c68d
|
||||
tag=9984c68d
|
||||
code_sha=357e4ddb
|
||||
promote_sha=9984c68d
|
||||
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"workflow_id": "wf_bd_intake_1790162580043670880",
|
||||
"task_key": "bd_intake",
|
||||
"title": "用户初始需求收集表",
|
||||
"planning_mode": "fixed_adaptive",
|
||||
"status": "completed",
|
||||
"current_step_index": 0,
|
||||
"steps": [
|
||||
{
|
||||
"id": "step_01_organize",
|
||||
"role": "organizer",
|
||||
"title": "抽取材料事实并回填字段",
|
||||
"sub_workspace": "tasks/01_organize",
|
||||
"mode": "execute",
|
||||
"parallel": false,
|
||||
"accept": [
|
||||
"抽取材料中的客户身份与产品定义",
|
||||
"回填 fields.json 结构化数据",
|
||||
"向 blackboard 写入 facts 与 gaps"
|
||||
],
|
||||
"status": "completed",
|
||||
"frozen": true,
|
||||
"archived_at": "2026-09-23T11:25:52.244130335Z"
|
||||
},
|
||||
{
|
||||
"id": "step_02_draft",
|
||||
"role": "writer",
|
||||
"title": "撰写用户初始需求收集表初稿",
|
||||
"sub_workspace": "tasks/02_draft",
|
||||
"mode": "execute",
|
||||
"parallel": false,
|
||||
"needs": [
|
||||
"tasks/01_organize/output.md"
|
||||
],
|
||||
"accept": [
|
||||
"按 template.md 各章节严格四段式展开",
|
||||
"正文翔实,各节须实质展开",
|
||||
"文末集中附录字段快照与待确认清单"
|
||||
],
|
||||
"status": "completed",
|
||||
"frozen": true,
|
||||
"archived_at": "2026-09-23T11:27:44.140019845Z"
|
||||
},
|
||||
{
|
||||
"id": "step_03_review",
|
||||
"role": "leader",
|
||||
"title": "审核并定稿交付",
|
||||
"sub_workspace": "tasks/03_review",
|
||||
"mode": "execute",
|
||||
"parallel": false,
|
||||
"needs": [
|
||||
"tasks/02_draft/output.md"
|
||||
],
|
||||
"accept": [
|
||||
"核验全文逻辑一致性与出处标注",
|
||||
"汇编待确认清单并给出下一步建议",
|
||||
"交付终稿 output.md"
|
||||
],
|
||||
"status": "completed",
|
||||
"frozen": true,
|
||||
"archived_at": "2026-09-23T11:28:59.149263421Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"commit": "357e4ddb0fe62e12cf6d1321382376257b0fe674",
|
||||
"source_tree": "c09b36c2f8fbfde8ccd35f3fdf0caa6f32f253ea",
|
||||
"source_context": "git-archive",
|
||||
"recorded_at": "2026-09-23T11:20:50Z",
|
||||
"tags": {
|
||||
"app": "shuimu-agent-app:candidate-357e4ddb0fe6",
|
||||
"events": "shuimu-agent-events:candidate-357e4ddb0fe6",
|
||||
"pi-agent": "shuimu-pi-agent:candidate-357e4ddb0fe6"
|
||||
},
|
||||
"image_ids": {
|
||||
"app": "sha256:038c301cb68f68d2346fe1e8ad9ed67e844f0338556b8fbffbd35dcf1f02d3ef",
|
||||
"events": "sha256:038c301cb68f68d2346fe1e8ad9ed67e844f0338556b8fbffbd35dcf1f02d3ef",
|
||||
"pi-agent": "sha256:03e6249ab0f5a44128975f63de48557214498a01a8009ab289bc041082826114"
|
||||
},
|
||||
"image_digests": {
|
||||
"app": "shuimu-agent-app@sha256:038c301cb68f68d2346fe1e8ad9ed67e844f0338556b8fbffbd35dcf1f02d3ef",
|
||||
"events": "shuimu-agent-app@sha256:038c301cb68f68d2346fe1e8ad9ed67e844f0338556b8fbffbd35dcf1f02d3ef",
|
||||
"pi-agent": "shuimu-pi-agent@sha256:03e6249ab0f5a44128975f63de48557214498a01a8009ab289bc041082826114"
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"verdict": "pass",
|
||||
"commit": "357e4ddb0fe62e12cf6d1321382376257b0fe674",
|
||||
"recorded_at": "2026-09-23T11:21:06Z",
|
||||
"runner_url": "http://127.0.0.1:18865",
|
||||
"model_id": "MiniMax-M2.7-highspeed",
|
||||
"protocol": "typed-result-v1",
|
||||
"image_digests": {
|
||||
"app": "shuimu-agent-app@sha256:038c301cb68f68d2346fe1e8ad9ed67e844f0338556b8fbffbd35dcf1f02d3ef",
|
||||
"events": "shuimu-agent-app@sha256:038c301cb68f68d2346fe1e8ad9ed67e844f0338556b8fbffbd35dcf1f02d3ef",
|
||||
"pi-agent": "shuimu-pi-agent@sha256:03e6249ab0f5a44128975f63de48557214498a01a8009ab289bc041082826114"
|
||||
},
|
||||
"suite": "squad-settled-no-deliverable-unit",
|
||||
"failure_class": "none",
|
||||
"evidence_refs": [
|
||||
"/tmp/squad-r2-images-build.txt"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user