Skip to content

fix(a2a): preserve permission recovery and session backup ownership - #388

Merged
guima-why merged 1 commit into
mainfrom
codex/normal-permission-cold-recovery
Oct 15, 2026
Merged

guima-why merged 1 commit into
mainfrom
codex/normal-permission-cold-recovery

Conversation

@ruanzhengxin-zhuxing

@ruanzhengxin-zhuxing ruanzhengxin-zhuxing commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Normal 权限挂起时,若后台 agent 或子进程晚于前台清理结束,旧 owner 原本不会补交 durable handoff,新 worker 会被 LIVE_OWNER 拒绝。本变更在 runtime 和业务工作全部排空后自动提交交接,恢复 admission 同时校验 execution identity、revision、boundary generation 和精确共享备份回执。

同时保证会话历史备份与冷恢复的一致性:

  • Direct capture 使用会话修改锁与共享发布锁,避免历史和 sidecar 混合提交。
  • 共享发布中断保留 durable 标记,恢复方拒绝半成品;同一 capture 可安全重试。
  • 初次冷恢复完整复制并校验后原子安装;已有会话刷新中断后,可重试原 capture 或完整已提交的更新 generation。
  • E2E 发布屏障在共享锁内校验成功 state 和 commit,避免把进行中标记误判为发布完成。
  • Linux 普通用户通过严格的内核 NSpid 坐标校验采集 owner 身份,保留 boot、namespace、init/process start identity 隔离,兼容无权读取 root PID 1 namespace 链接的环境。
  • 备份故障注入固定在 session.jsonl 复制后,避免依赖平台文件遍历顺序。

验证:

  • Linux Docker、Python 3.12、nobody 用户的五文件回归:87 passed,覆盖 owner identity、权限重启、共享备份和 AGUI HTTP SSE。
  • Owner identity 离线回归:51 passed;新增用例在修复前复现 7 个失败。
  • macOS Python 3.14 分组覆盖全套 20549 个用例,179 skipped;MCP 文件原始复验 7 passed。
  • make lint:Ruff、ty 通过;独立安全及并发复审无未解决的高置信阻断项。
  • 远端 Python 3.10–3.14、Windows、Skill bridge、CodeQL 与 Desktop 结果见本 CR 的 checks。

本轮未验证 PRE 实际 Sandbox 替换及跨 Pod 存储锁语义;旧格式会话的可信控制面接管仍属后续阶段。暂存模式先可靠捕获再异步发布,直接模式仍等待共享备份完成。全局 context/task 索引需随 A2A persistence 持久化。

- Fence permission handoff and recovery by committed execution ownership
- Publish completed shared backups safely and restore through validated snapshots
- Finalize late background drains so a fresh worker can recover directly
- Capture Linux owner identity without reading root init namespace links
- Cover multi-process recovery, publication failures, and platform ordering
@ruanzhengxin-zhuxing
ruanzhengxin-zhuxing force-pushed the codex/normal-permission-cold-recovery branch from 1020bb0 to 0d907e3 Compare October 15, 2026 07:08
@ruanzhengxin-zhuxing
ruanzhengxin-zhuxing marked this pull request as ready for review October 15, 2026 07:38
@guima-why

guima-why commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

iac-code E2E 报告

提交:0d907e3a35630b838942ce19320370594ca28c2d · 状态:失败

安全分析:按作者白名单免检;改动影响分析、用例选择和 E2E 验收照常执行。

链路阶段进展

时间为 UTC+8;预计完成时间为估算,运行中计数尚未作为通过证据。

环节 状态 开始 完成 已耗时 预计完成 最近更新 当前说明
PR 身份与触发条件核对 已完成 10-15 15:48:51 10-15 15:48:52 0s — 10-15 15:48:52 —
改动材料采集 已完成 10-15 15:49:15 10-15 15:56:49 454s — 10-15 16:02:02 完成 23;总数 23
Agent 影响分析(安全免检) 已完成 10-15 16:02:04 10-15 16:02:36 32s — 10-15 16:02:36 完成 23;总数 23
测试计划确定 / 维护者授权 已完成 10-15 16:02:37 10-15 16:02:39 2s — 10-15 16:02:39 —
源码包准备与摘要计算 已完成 10-15 16:02:47 10-15 16:03:43 56s — 10-15 16:05:14 —
源码上传及读回校验 已完成 10-15 16:04:36 10-15 16:05:15 39s — 10-15 16:05:15 —
full 触发与排队 已完成 10-15 16:07:38 10-15 16:09:13 95s — 10-15 16:09:13 —
full 环境准备 已完成 10-15 16:09:13 10-15 16:09:44 31s — 10-15 16:09:44 —
full 用例执行 已完成 10-15 16:09:44 10-15 16:11:35 111s — 10-15 16:13:30 完成 47;总数 47;失败 0;重跑 0
full 结果核验 已完成 10-15 16:13:21 10-15 16:13:31 10s — 10-15 16:13:31 最终证据已核验
live 触发与排队 已完成 10-15 16:14:39 10-15 16:14:46 6s — 10-15 16:14:46 —
live 环境准备 已完成 10-15 16:14:46 10-15 16:15:20 35s — 10-15 16:15:20 —
live 用例执行 已完成 10-15 16:15:20 10-15 16:58:32 2592s — 10-15 17:07:39 完成 109;总数 109;失败 1;重跑 2
资源清理(随用例并行) 已完成 10-15 16:15:20 10-15 16:58:32 2592s — 10-15 17:08:48 清理完成/无需清理 109;清理异常 0;清理尚待确认 0
live 结果核验 已完成 10-15 17:06:26 10-15 17:07:41 74s — 10-15 17:07:41 最终证据已核验
失败复盘 已完成 10-15 17:08:51 10-15 17:13:31 280s — 10-15 17:13:31 —
最终 GitHub 报告发布 已完成 10-15 17:13:32 10-15 17:13:46 14s — 10-15 17:13:46 —
GitHub 卡点回写与请求收尾 已完成 10-15 17:13:32 10-15 17:13:47 14s — 10-15 17:13:47 —

最近网络尝试(仅操作枚举和错误类别,不含请求地址或响应内容):

  • github.comments.list:尝试 4 次,96.83s;timeout、timeout、timeout
  • github.comments.list:尝试 3 次,64.22s;timeout、timeout
  • github.pr.get:尝试 2 次,40.29s;timeout
  • github.comment.read:尝试 1 次,23.69s;timeout
用例集 结果 耗时 重跑 / 重跑通过 清理异常
full 47/47 通过 107.56s 0 / 0 0
live 108/109 通过 2588.73s 2 / 1 0
full 逐例结果(47 条)
用例 结果 秒 模型 尝试次数 清理
a2a-recovery-contract 通过 31.98 — 1 不适用
a2a-handoff-recovery-contract 通过 32.98 — 1 不适用
a2a-success-contract 通过 29.88 — 1 不适用
a2a-cancel-contract 通过 4.37 — 1 不适用
repl-normal-contract 通过 6.08 — 1 不适用
repl-pipeline-contract 通过 65.06 — 1 不适用
web-api-contract 通过 7.33 — 1 不适用
execution-warm-resume-pausing-normal 通过 6.68 — 1 不适用
execution-warm-resume-pausing-pipeline 通过 7.63 — 1 不适用
execution-warm-resume-paused-normal 通过 3.62 — 1 不适用
execution-warm-resume-paused-pipeline 通过 3.62 — 1 不适用
execution-disconnect-timeout-after-operation-id-normal 通过 3.62 — 1 不适用
execution-disconnect-timeout-after-operation-id-pipeline 通过 3.67 — 1 不适用
execution-disconnect-timeout-inflight-sync-call-pipeline 通过 3.67 — 1 不适用
execution-disconnect-timeout-backup-blocked-pipeline 通过 3.27 — 1 不适用
execution-natural-completion-while-pausing-normal 通过 2.67 — 1 不适用
execution-slow-termination-storage-normal 通过 2.62 — 1 不适用
execution-terminate-during-bootstrap-normal 通过 1.57 — 1 不适用
execution-terminate-during-bootstrap-pipeline 通过 1.57 — 1 不适用
execution-terminate-during-bootstrap-disconnected-normal 通过 1.52 — 1 不适用
execution-terminate-during-bootstrap-disconnected-pipeline 通过 1.62 — 1 不适用
execution-disconnect-timeout-during-turn-backup-normal 通过 7.63 — 1 不适用
execution-legacy-cancel-idle-pipeline 通过 3.62 — 1 不适用
execution-slow-rollover-storage-normal 通过 2.27 — 1 不适用
execution-stack-instances-timeout-after-operation-id-normal 通过 3.02 — 1 不适用
execution-stack-instances-terminate-inflight-normal 通过 2.12 — 1 不适用
execution-recovery-during-normal-rollover-normal 通过 2.77 — 1 不适用
permission-agui-generation-fence 通过 6.1 — 1 不适用
permission-staged-generation-fence 通过 4.24 — 1 不适用
permission-sub-pipeline-timeout 通过 3.23 — 1 不适用
permission-normal-allow_once 通过 3.88 — 1 不适用
permission-normal-deny 通过 3.57 — 1 不适用
permission-pipeline-allow_once 通过 2.92 — 1 不适用
permission-pipeline-deny 通过 2.87 — 1 不适用
permission-prompt-supersede-same-process 通过 5.22 — 1 不适用
permission-prompt-supersede-after-restart 通过 6.48 — 1 不适用
permission-confirmation-followup-same-process 通过 3.27 — 1 不适用
permission-confirmation-followup-after-restart 通过 4.72 — 1 不适用
permission-pipeline-candidate-first 通过 2.97 — 1 不适用
permission-solution_planning_and_selection-allow_once 通过 2.92 — 1 不适用
permission-solution_planning_and_selection-deny 通过 2.92 — 1 不适用
permission-materialize_selected_candidate-allow_once 通过 2.92 — 1 不适用
permission-materialize_selected_candidate-deny 通过 2.92 — 1 不适用
permission-deploying-allow_once 通过 2.82 — 1 不适用
permission-deploying-deny 通过 2.82 — 1 不适用
permission-handoff-allow_once 通过 3.67 — 1 不适用
permission-handoff-deny 通过 3.67 — 1 不适用
live 逐例结果(109 条)
用例 结果 秒 模型 尝试次数 清理
ssf-a2a-happy-multi-plan 通过 190.02 deepseek-v4-flash-0731 1 已清理
ssf-a2a-safe-quote-cancel 通过 107.0 glm-5.2-fast-preview 1 已清理
ssf-a2a-step1-clarify 通过 115.61 glm-5.3-prime 1 已清理
ssf-a2a-step1-replan-replace 通过 633.91 deepseek-v4.1-flash 1 已清理
ssf-a2a-step2-required-parameter 通过 154.86 deepseek-v4-flash-0731 1 已清理
ssf-a2a-step2-structured-override 通过 208.17 glm-5.2-fast-preview 1 已清理
ssf-a2a-step2-reselect-new-intent 通过 338.72 glm-5.3-prime 1 已清理
ssf-a2a-non-aliyun-early-exit 通过 21.65 deepseek-v4.1-flash 1 已清理
ssf-a2a-performance-backup-restore 通过 194.84 deepseek-v4.1-flash 1 已清理
ssf-a2a-input-during-backup 通过 214.17 glm-5.2-fast-preview 1 已清理
ssf-a2a-fault-checkpoints 通过 169.18 glm-5.3-prime 1 已清理
ssf-a2a-running-step1 通过 160.88 deepseek-v4-flash-0731 1 已清理
ssf-a2a-running-step2 通过 161.1 deepseek-v4-flash-0731 1 已清理
ssf-a2a-running-step3 通过 167.35 glm-5.2-fast-preview 1 已清理
ssf-a2a-normal-running 通过 162.45 deepseek-v4.1-flash 1 已清理
ssf-a2a-cancel-step1 通过 6.73 glm-5.3-prime 1 已清理
ssf-a2a-cancel-step2 通过 54.75 glm-5.3-prime 1 已清理
ssf-a2a-cancel-step3 通过 150.95 deepseek-v4-flash-0731 1 已清理
ssf-a2a-rollback-recovery-step1 通过 236.8 glm-5.2-fast-preview 1 已清理
ssf-a2a-rollback-recovery-step2 通过 235.55 glm-5.3-prime 1 已清理
ssf-a2a-rollback-recovery-step3 通过 200.73 glm-5.3-prime 1 已清理
ssf-a2a-rollback-stack-cleanup 通过 518.34 deepseek-v4-flash-0731 1 已清理
ssf-a2a-rollback-cleanup-recovery 通过 515.54 deepseek-v4-flash-0731 1 已清理
ssf-a2a-redaction-contract 通过 321.67 glm-5.2-fast-preview 1 已清理
ssf-a2a-image-initial-selection 通过 276.5 qwen3.8-max 1 已清理
ssf-a2a-image-asks-confirmation 通过 289.5 qwen3.8-max-0902 1 已清理
ssf-a2a-image-interrupt-handoff 通过 593.12 qwen3.8-flash 1 已清理
ssf-repl-single-plan-happy 通过 203.16 deepseek-v4.1-flash 1 已清理
ssf-repl-multi-plan-natural-adjust 通过 190.29 deepseek-v4-flash-0731 1 已清理
ssf-repl-step1-clarify-replan 通过 161.59 glm-5.3-prime 1 已清理
ssf-repl-step1-replace-invalid-select 通过 199.96 glm-5.2-fast-preview 1 已清理
ssf-repl-step2-required-parameter 通过 133.77 glm-5.3-prime 1 已清理
ssf-repl-step2-reselect-progress 通过 437.74 deepseek-v4.1-flash 1 已清理
ssf-repl-waiting-resume-all 通过 675.89 deepseek-v4.1-flash 1 已清理
ssf-repl-running-step1 通过 129.16 deepseek-v4-flash-0731 1 已清理
ssf-repl-running-step2 通过 85.4 glm-5.2-fast-preview 1 已清理
ssf-repl-running-step3 通过 153.9 glm-5.3-prime 1 已清理
ssf-repl-normal-running-cancel-resume 通过 137.2 glm-5.3-prime 1 已清理
ssf-repl-interrupt-rollback 通过 307.57 glm-5.2-fast-preview 1 已清理
ssf-repl-rollback-cleanup-recovery 通过 339.35 deepseek-v4-flash-0731 1 已清理
ssf-repl-multimodal-lifecycle 通过 565.91 qwen3.8-omni-flash 1 已清理
ssf-legacy-selling-smoke 通过 144.64 glm-5.2-fast-preview 1 已清理
selector-selected-next-turn 通过 14.59 deepseek-v4-flash-0731 1 无需清理
selector-restart-before-answer 通过 17.62 deepseek-v4-flash-0731 1 无需清理
selector-canceled-next-turn 通过 14.09 deepseek-v4-flash-0731 1 无需清理
selector-empty-list-canceled-next-turn 通过 15.72 deepseek-v4-flash-0731 1 无需清理
selector-sequential-vpc-vswitch 通过 17.22 glm-5.3-prime 1 无需清理
selector-duplicate-and-conflict 通过 14.4 deepseek-v4-flash-0731 1 无需清理
selector-pipeline-handoff-normal 通过 14.48 glm-5.3-prime 1 无需清理
selector-pipeline-stage-selection 通过 11.55 glm-5.3-prime 1 无需清理
agui-selector-normal-selected 通过 12.18 deepseek-v4-flash-0731 1 无需清理
agui-selector-normal-canceled 通过 8.78 glm-5.3-prime 1 无需清理
agui-selector-normal-direct-input 通过 8.6 glm-5.3-prime 1 无需清理
agui-selector-pipeline-selected 通过 95.61 deepseek-v4-flash-0731 1 无需清理
agui-selector-pipeline-canceled 重跑通过 96.38 glm-5.3-prime 2 无需清理
agui-selector-pipeline-direct-input 通过 36.29 glm-5.3-prime 1 无需清理
repl-pipeline-scenario1 通过 121.11 glm-5.3-prime 1 已清理
repl-pipeline-ask-waiting 通过 240.57 glm-5.2-fast-preview 1 已清理
repl-pipeline-ask-waiting-resume 通过 184.96 deepseek-v4-flash-0731 1 已清理
repl-pipeline-image-initial 通过 264.44 qwen3.8-max 1 已清理
repl-pipeline-image-ask-waiting-resume 通过 309.26 qwen3.8-max-0902 1 已清理
repl-pipeline-image-selection-waiting-resume 通过 269.43 qwen3.8-max 1 已清理
repl-pipeline-image-normal-handoff 通过 321.21 qwen3.8-omni-flash 1 已清理
repl-pipeline-image-interrupt 通过 73.93 qwen3.8-flash 1 已清理
repl-pipeline-evaluate-resume 通过 199.4 glm-5.3-prime 1 已清理
repl-pipeline-selection-invalid-then-valid 通过 273.05 deepseek-v4.1-flash 1 已清理
repl-pipeline-selection-waiting-resume 通过 127.7 glm-5.3-prime 1 已清理
repl-pipeline-rollback-step2 通过 16.95 glm-5.2-fast-preview 1 已清理
repl-pipeline-rollback-step3 通过 21.91 glm-5.2-fast-preview 1 已清理
repl-pipeline-rollback-step4-selection 通过 106.46 glm-5.2-fast-preview 1 已清理
repl-pipeline-rollback-step5-cleanup 通过 505.4 deepseek-v4-flash-0731 1 已清理
repl-pipeline-rollback-step5-cleanup-recovery 通过 352.21 deepseek-v4.1-flash 1 已清理
a2a-recovery-redaction-step4 通过 295.2 deepseek-v4-flash-0731 1 无需清理
a2a-recovery-iac-code-web-2c4g-step4 通过 273.94 glm-5.2-fast-preview 1 无需清理
a2a-recovery-contract-graceful-cancel 通过 9.42 glm-5.3-prime 1 已清理
a2a-recovery-contract-graceful-success 通过 110.27 glm-5.3-prime 1 已清理
a2a-recovery-image-ask-waiting 通过 268.75 qwen3.8-max-0902 1 已清理
a2a-recovery-image-initial 通过 245.48 qwen3.8-flash 1 已清理
a2a-recovery-image-interrupt 通过 225.11 qwen3.8-max 1 已清理
a2a-recovery-image-normal-handoff 通过 404.94 qwen3.8-max-0902 1 已清理
a2a-recovery-image-selection-waiting 通过 179.06 qwen3.8-omni-flash 1 已清理
a2a-recovery-scenario1 通过 107.87 glm-5.3-prime 1 已清理
a2a-recovery-scenario1-performance-backup 通过 123.31 glm-5.2-fast-preview 1 已清理
a2a-recovery-selection-during-backup 通过 114.25 glm-5.3-prime 1 已清理
a2a-recovery-normal-running 通过 153.56 deepseek-v4.1-flash 1 已清理
a2a-recovery-ask-waiting 通过 192.69 glm-5.3-prime 1 已清理
a2a-recovery-selection-waiting 通过 120.27 deepseek-v4.1-flash 1 已清理
a2a-recovery-fault-after-snapshot 通过 102.32 glm-5.2-fast-preview 1 已清理
a2a-recovery-rollback-step5-cleanup 通过 185.68 glm-5.3-prime 1 已清理
a2a-recovery-rollback-step5-cleanup-recovery 通过 236.46 deepseek-v4.1-flash 1 已清理
a2a-recovery-step1-running 通过 103.08 glm-5.2-fast-preview 1 已清理
a2a-recovery-step2-running 通过 135.62 glm-5.2-fast-preview 1 已清理
a2a-recovery-step3-running 通过 151.15 deepseek-v4.1-flash 1 已清理
a2a-recovery-step4-running 通过 117.24 deepseek-v4-flash-0731 1 已清理
a2a-recovery-step5-running 通过 110.21 glm-5.3-prime 1 已清理
a2a-recovery-rollback-step1 通过 99.85 glm-5.2-fast-preview 1 已清理
a2a-recovery-rollback-step2 通过 120.48 deepseek-v4-flash-0731 1 已清理
a2a-recovery-rollback-step3 通过 107.18 glm-5.2-fast-preview 1 已清理
a2a-recovery-rollback-step4 通过 119.7 glm-5.3-prime 1 已清理
a2a-recovery-rollback-step5 通过 105.0 glm-5.3-prime 1 已清理
a2a-recovery-cancel-step1 通过 21.12 deepseek-v4.1-flash 1 已清理
a2a-recovery-cancel-step2 通过 24.64 deepseek-v4.1-flash 1 已清理
a2a-recovery-cancel-step3 通过 25.23 glm-5.2-fast-preview 1 已清理
a2a-recovery-cancel-step4 通过 85.51 deepseek-v4.1-flash 1 已清理
a2a-recovery-cancel-step5 通过 110.31 deepseek-v4.1-flash 1 已清理
repl-aliyun-readonly-canary 通过 7.03 glm-5.2-fast-preview 1 无需清理
smoke-a2a-vpc 失败 44.85 glm-5.2-fast-preview 2 无需清理
smoke-acp-vpc 通过 9.82 glm-5.2-fast-preview 1 无需清理
smoke-headless-vpc 通过 26.03 deepseek-v4-flash-0731 1 无需清理
失败详情:smoke-a2a-vpc

失败检查:output contains VPC-related content
;另有 0 项标题未公开。

安全结构化证据:

{
  "0": {
    "kind": "check",
    "value": "output contains VPC-related content"
  },
  "1": {
    "kind": "execution",
    "value": {
      "cleanup": "not-needed",
      "attempts": [
        {
          "cleanup": "not-needed",
          "evidence": {},
          "seconds": 18.32,
          "status": "failed"
        },
        {
          "cleanup": "not-needed",
          "evidence": {},
          "seconds": 26.53,
          "status": "failed"
        }
      ]
    }
  },
  "2": {
    "kind": "diagnostics",
    "value": {}
  }
}

定向复测参数(私有源码传输参数在内部运行记录中取得):

{
  "source_sha": "0d907e3a35630b838942ce19320370594ca28c2d",
  "suite": "live",
  "case": "smoke-a2a-vpc",
  "jobs": 1,
  "retries": 0,
  "case_models": "smoke-a2a-vpc=glm-5.2-fast-preview"
}

失败复盘建议(不改变验收结论)

  • smoke-a2a-vpc:证据不足;补充有界结构化证据后再判断。证据编号:0, 1, 2

说明:每个失败用例最多重跑一次;任一次资源清理失败或未验证均不能判通过。
复盘是待核实建议;报告只展示固定安全字段,不含内部链接或原始云日志。

@guima-why
guima-why merged commit 3b6725a into main Oct 15, 2026
25 of 26 checks passed
@guima-why
guima-why deleted the codex/normal-permission-cold-recovery branch October 15, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants