{
  "topic": "runtime-v2-status",
  "reviewMethod": "Static source and contract review at pinned commits; compare NOTES separate tip-default (work-v1), tip-off (v2.1), and unimplemented Hard Cut. No product runtime tests or production inspection. Latest review: 2026-10-29 GitHub default-branch pinned snapshot; cited-file blob comparison and changed-range semantic review, not deployment verification.",
  "claims": [
    {
      "statement": "chat 入口已不再受理 runtime-v2.1：/api/chat 的 direct 与 routed 提交统一经 ChatSubmissionStore.admit 以 runtimeWork 受理为 runtime-work-v1；durableText 分支与 Worker 的 prepareText 仅作为 runtime-v2.1 存量 Run 的处理代码保留。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/chat-routes.ts",
          "line": 1481,
          "endLine": 1521,
          "symbol": "chatSubmissionStore!.admit"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/chat-routes.ts",
          "line": 1612,
          "endLine": 1619,
          "symbol": "runtimeWork"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/orchestrator-runtime.ts",
          "line": 460,
          "endLine": 490,
          "symbol": "durableText"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/execution/run-execution-attempt.ts",
          "line": 371,
          "endLine": 393,
          "symbol": "RUNTIME_EXECUTION_PROTOCOL"
        }
      ]
    },
    {
      "statement": "RunExecutionWorker 从 PostgreSQL 队列领取并持有执行（独立于 HTTP 订阅者），在 chat role 装配并经 workbenchExecution 驱动 routed Work；Desktop 侧由 RuntimeWorkIpcCoordinator 提交并观察 Work。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/execution/run-execution-worker.ts",
          "line": 72,
          "endLine": 73,
          "symbol": "RunExecutionWorker"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/index.ts",
          "line": 2625,
          "endLine": 2643,
          "symbol": "workbenchExecution"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/agent-loop/register-runtime-work-ipc.ts",
          "line": 485,
          "endLine": 510,
          "symbol": "submitSubmission"
        }
      ]
    },
    {
      "statement": "执行者失去租约后由 decideOwnerLostRecovery 处置：未产生写入提案/来源写入且未发布回复的轮次回到 pending 重新领取（有次数上限），已写入或超限的转 manual_recovery，不盲目重跑。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/execution/run-execution-storage.ts",
          "line": 1009,
          "endLine": 1025,
          "symbol": "decideOwnerLostRecovery"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/execution/run-execution-storage.ts",
          "line": 918,
          "endLine": 939,
          "symbol": "manual_recovery"
        }
      ]
    },
    {
      "statement": "RUNTIME_WORK_PROTOCOL 与 FILE_WORK_PROFILE 定义原 Work 身份；提交 wire 可以是 work-v1 或 skill-v2，不能把原 Work identity 当作全部 HTTP 路由唯一可接受的头。runtime-v2.1 不是新的 chat 提交入口。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/tool-client/src/types/runtime-execution.ts",
          "line": 10,
          "endLine": 50,
          "symbol": "RUNTIME_EXECUTION_PROTOCOL"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/tool-client/src/types/runtime-work-identity.ts",
          "line": 4,
          "endLine": 13,
          "symbol": "RUNTIME_WORK_PROTOCOL"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/tool-client/src/types/runtime-work-identity.ts",
          "line": 18,
          "endLine": 18,
          "symbol": "FILE_WORK_PROFILE"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/chat-work-admission.ts",
          "line": 15,
          "endLine": 24,
          "symbol": "runtimeWorkSubmissionProtocol"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/chat-routes.ts",
          "line": 531,
          "endLine": 535,
          "symbol": "submissionProtocol"
        }
      ]
    },
    {
      "statement": "tip 已把 chat 提交与观察收敛为统一 Work 路径（Agent 87db143e / Desktop 91a25b75、7470e12e），runtime-v2.1 不再是可选入口；但这只是代码收敛，不等于已核实生产全量切流。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/chat-routes.ts",
          "line": 1481,
          "endLine": 1521,
          "symbol": "chatSubmissionStore!.admit"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/chat-work-admission.ts",
          "line": 15,
          "endLine": 24,
          "symbol": "runtimeWorkSubmissionProtocol"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/tool-client/src/types/runtime-work-identity.ts",
          "line": 4,
          "endLine": 13,
          "symbol": "RUNTIME_WORK_PROTOCOL"
        }
      ]
    },
    {
      "statement": "ChatSubmissionStore.admit 是 direct（agentId）与 routed（无 agentId）chat 的共同受理入口：首轮在同一事务内创建 Conversation+Session。runtimeWork 现为必填（9a3e49ec1 删除了已退役的 runtimeExecution / 非 runtimeWork 分支与 CHAT_SUBMISSION_PROTOCOL_CONFLICT），缺 runtimeWork 即 RUNTIME_WORK_PROFILE_UNSUPPORTED；占用检查不再 FOR UPDATE 已有 root（ADR-0094），并排除 background_work.v1 / background 桶。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/session/chat-submission-store.ts",
          "line": 580,
          "endLine": 595,
          "symbol": "async admit"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/session/chat-submission-store.ts",
          "line": 207,
          "endLine": 209,
          "symbol": "runtimeWork"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/session/chat-submission-store.ts",
          "line": 986,
          "endLine": 996,
          "symbol": "quota_bucket <> 'background'"
        }
      ]
    }
  ]
}
