Files
pikasTech-unidesk/docs/MDTODO/agentrun-runtime-reliability.md
T
Codex 3b9dc4c3ef
Pipelines as Code CI / hwlab-web-probe-sentinel-nc01- Success
Pipelines as Code CI / platform-infra-gitea-nc01- Success
Pipelines as Code CI / unidesk-host- Success
docs: 跟踪 runner 假活修复与验收
2026-07-12 05:30:34 +02:00

76 lines
6.6 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.
# AgentRun 运行可靠性
来源:[AgentRun #294](https://github.com/pikasTech/agentrun/issues/294)。
范围:长期跟踪 AgentRun admission、dispatch、runner、resource bundle、provider 建立、终态失败可见性与自动交付可靠性。单次故障作为 MDTODO ITEM 纳入,不为每个 issue 新建文件。
## R1 [completed]
依据 [AgentRun #294](https://github.com/pikasTech/agentrun/issues/294) 恢复 Artificer resource-bundle Git 获取与失败可见性,完成任务后将详细报告写入[任务报告](./details/agentrun-resource-bundle-git-fetch/R1_Task_Report.md)。
### R1.1 [completed]
用固定四个 run 单步披露 bundle source、fetch 阶段、脱敏 remote/credential sourceRef 与首个失败分类,完成任务后将详细报告写入[任务报告](./details/agentrun-resource-bundle-git-fetch/R1.1_Task_Report.md)。
### R1.2 [completed]
在 YAML/sourceRef 或 AgentRun runner/resource-bundle 权威路径修复 code 128,并统一 task terminal failure 摘要,完成任务后将详细报告写入[任务报告](./details/agentrun-resource-bundle-git-fetch/R1.2_Task_Report.md)。
### R1.3 [completed]
通过 PR 合并自动 CI/CD 后重派同类 Artificer 任务,验收 bundle materialized、provider established 和业务执行开始,完成任务后将详细报告写入[任务报告](./details/agentrun-resource-bundle-git-fetch/R1.3_Task_Report.md)。
## R2 [completed]
在不改变产品事件、持久化、trace authority 或跨服务职责的前提下,清理 AgentRun/HWLAB 观测诊断 CLI 支线;来源 [UniDesk #1619](https://github.com/pikasTech/unidesk/issues/1619) 与 [UniDesk #1796](https://github.com/pikasTech/unidesk/issues/1796),任何架构变更均跳过,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R2_Task_Report.md)。
### R2.1 [completed]
落实 [UniDesk #1619](https://github.com/pikasTech/unidesk/issues/1619):仅在 CLI 输出层增加有界 plan 默认视图和 observability scoped help,显式 full/raw 保持完整;禁止提高 stdout 阈值、修改 YAML 或运行面,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R2.1_Task_Report.md)。
### R2.2 [completed]
落实 [UniDesk #1796](https://github.com/pikasTech/unidesk/issues/1796):仅修既有诊断层的 lane 选择、commandId 过滤和 missing-command-terminal-span 的 unknown/instrumentation-gap 分类;禁止新增第二事实源或改变 trace authority,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R2.2_Task_Report.md)。
### R2.3 [completed]
由主代理完成架构 diff review、定向 CLI 验收、PR 合并与 issue 收口;只接受局部诊断/可见性修改,rollout 不适用,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R2.3_Task_Report.md)。
### R2.4 [completed]
登记 [UniDesk #1801](https://github.com/pikasTech/unidesk/issues/1801)diagnose 的 command/result 读取会向同一业务 trace 补记 command_result span,使重复读取改变 instrumentation completeness;该问题涉及 trace context 与诊断证据隔离,本轮按架构变更边界跳过,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R2.4_Task_Report.md)。
## R3 [completed]
依据 [AgentRun #307](https://github.com/pikasTech/agentrun/issues/307) 实现 Queue Q5 的同 task 不可变 attempt 历史与显式终态失败 retry,禁止通过重置 task 或复制 task 合同绕过资源语义,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R3_Task_Report.md)。
### R3.1 [completed]
在 AgentRun 增加正式 `agentrun_queue_attempts` 存储、现有 latestAttempt 回填和不可变历史查询;task.latestAttempt 只保留为摘要指针,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R3.1_Task_Report.md)。
### R3.2 [completed]
实现服务端 `POST /api/v1/queue/tasks/:id/retry`:同 task 新 attempt、retry key 幂等、failed/blocked 白名单、completed/cancelled fail closed,并让 dry-run 全校验且零写入,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R3.2_Task_Report.md)。
### R3.3 [completed]
在 UniDesk 受控 CLI 增加 task retry 资源入口,完成内存/PostgreSQL 并发测试、PR 自动交付和固定任务 `qt_5b65a086385a49bdb874cf8f9d191169` 的 bundle/provider/业务启动验收,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R3.3_Task_Report.md)。
## R4 [in_progress]
完善 AgentRun runner 生命周期、claim 释放、容量门禁与 manager 权威回收,使终态一致性、并发安全和有界诊断形成单一可靠合同,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R4_Task_Report.md)。
### R4.1 [in_progress]
解决 [AgentRun #309](https://github.com/pikasTech/agentrun/issues/309):终态 run/command 与终态 Pod 不得因陈旧 runClaimedBy 被判假活并占满 maxRunners;对齐 [AgentRun #280](https://github.com/pikasTech/agentrun/issues/280) 的 retention 边界,由 manager 原子释放 claim、终态化和 CAS 回收,完成并发测试、自动交付及 NC01 受控 CLI 验收,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R4.1_Task_Report.md)。
#### R4.1.1 [in_progress]
解决 [UniDesk #1820](https://github.com/pikasTech/unidesk/issues/1820):对齐 cleanup-runners 只读 observer 与 AgentRun manager retention 的终态 claim 分类,默认有界披露 terminal-run-stale-claim、repairKind 和一致的 candidate/protected 计数;manager 保持唯一回收 authority,禁止增加删除入口或第二事实源,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R4.1.1_Task_Report.md)。
## R5
完善 Artificer AipodSpec、primary workspace、resource bundle 物化与业务 turn admission,使声明式源码快照、能力 bundle 和失败可见性形成单一合同,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R5_Task_Report.md)。
### R5.1
解决 [AgentRun #310](https://github.com/pikasTech/agentrun/issues/310)Artificer 已报告 resource-bundle-materialized 却未物化 primary UniDesk workspace;禁止 agent 自行 clone、借用宿主 worktree 或 trans 源码旁路,修复后保持同一 task identity 重试固定 cadence 与哨兵报告任务并以 Artificer 自身完成作为验收,完成任务后将详细报告写入[任务报告](./details/agentrun-runtime-reliability/R5.1_Task_Report.md)。