{
  "topic": "write-authority",
  "reviewMethod": "Static source review at pinned commits (agent 2141b561dc97, desktop 236252f2fdc3) of confirmation authorization, write-ahead outcome rows, single-use authority consumption, effect readback, LF fs/change write records, router handles and orphan-run recovery; 2026-10-09 tip re-check (agent 61576cf06699, desktop de6102a5a916) confirmed same line ranges for credential-failure outcome gap and fs/change recovery coverage. GitLab ai/aida-agent #255/#257 read for target scope. No runtime tests. Latest review: 2026-10-29 GitHub default-branch pinned snapshot; cited-file blob comparison and changed-range semantic review, not deployment verification.",
  "claims": [
    {
      "statement": "聊天轮次不授权业务写：ToolCallGate 对写工具在 reject/confirm 之后执行 checkCrossTurn，唯一可执行路径是 Kernel 结算后的 Outbox continuation；委托闸例外仅 desktop approval gate、Plugin、local_file_v4。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/tool-call-gate.ts",
          "line": 178,
          "endLine": 197,
          "symbol": "Kernel authorization"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/tool-call-gate.ts",
          "line": 344,
          "endLine": 421,
          "symbol": "willAwaitConfirm"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/tool-call-gate.ts",
          "line": 601,
          "endLine": 625,
          "symbol": "usesExternalApprovalGate"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/tool-call-gate.ts",
          "line": 678,
          "endLine": 693,
          "symbol": "checkCrossTurn"
        }
      ]
    },
    {
      "statement": "确认卡结算后 registerAuthorization 写授权；businessEffects.start 以 proposalId:payloadHash 哈希为幂等键先落 executing outcome（写前声明），同键重入返回已有行；reconcileUnknown 可回到 safe_to_retry/succeeded/failed/unknown。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-task-continuation.ts",
          "line": 2334,
          "endLine": 2362,
          "symbol": "registerAuthorization"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/interaction-kernel/business-effect.ts",
          "line": 519,
          "endLine": 559,
          "symbol": "start"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/interaction-kernel/business-effect.ts",
          "line": 592,
          "endLine": 632,
          "symbol": "safe_to_retry"
        }
      ]
    },
    {
      "statement": "执行凭据是仅运行时可持有的 VerifiedWriteAuthority；消费时再校验并以 ActionProposal markExecuting（approved→executing 条件 UPDATE，传 requireActiveRun 时同句要求所属 Run 未取消、无 cancel_intent）做一次性 CAS，persistent-target 工具另铸 persistentTargetClaimLease；执行器在派发前消费，连接器凭证在同一函数中先于消费解析。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/interaction-kernel/write-authority.ts",
          "line": 139,
          "endLine": 168,
          "symbol": "VerifiedWriteAuthorityCapability"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/interaction-kernel/write-authority.ts",
          "line": 278,
          "endLine": 322,
          "symbol": "markExecuting"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/session/action-proposal-store.ts",
          "line": 1165,
          "endLine": 1215,
          "symbol": "persistentTargetClaimLease"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/tool-executor.ts",
          "line": 165,
          "endLine": 211,
          "symbol": "ConnectorNotAuthorizedError"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/tool-executor.ts",
          "line": 358,
          "endLine": 410,
          "symbol": "consumeVerifiedWriteAuthority"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-confirmed-execution.ts",
          "line": 551,
          "endLine": 565,
          "symbol": "writeAuthorityOwner.issue"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/connectors/credential-provider.ts",
          "line": 1,
          "endLine": 12,
          "symbol": "Credential boundary"
        }
      ]
    },
    {
      "statement": "有 readback 合同的连接器写，成功响应不足以结案，需只读回查源系统；重启后见 executing proposal 永不再调用，除非读回证明已落地，否则记 unknown；缺凭证等派发前失败（本次尝试没有完成授权 CAS）时，proposal 仍为 pending/approved 则 markFailed(unconsumedOnly)，并把 effect 记为 failed（BUSINESS_EFFECT_NOT_DISPATCHED），不记 unknown。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-task-continuation.ts",
          "line": 1508,
          "endLine": 1526,
          "symbol": "observeCommittedSourceWrite"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/connectors/effect-readback/index.ts",
          "line": 21,
          "endLine": 28,
          "symbol": "observeConnectorCommittedWrite"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-confirmed-execution.ts",
          "line": 266,
          "endLine": 267,
          "symbol": "recovering"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-confirmed-execution.ts",
          "line": 509,
          "endLine": 523,
          "symbol": "effect.status === \"unknown\""
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-confirmed-execution.ts",
          "line": 679,
          "endLine": 709,
          "symbol": "writeAuthorityConsumedHere"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-confirmed-execution.ts",
          "line": 795,
          "endLine": 814,
          "symbol": "recordUnsentBusinessEffect"
        }
      ]
    },
    {
      "statement": "LF fs/change：Agent 一个事务内 markGranted + Operation requested 落账；Desktop 先写 WriteRecordStore 写前记录再 consume 确认记录（consumedAt 单次），逐 action 记 started/completed，不能证明未落地记 unknown/outcome_unknown；启动时 reconcileWriteFacts 物理重读并补交回执；Agent TTL 回收只覆盖读方法。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/local/local-file-change-continuation.ts",
          "line": 220,
          "endLine": 244,
          "symbol": "suspendPendingResumeForRequest"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/change-executor.ts",
          "line": 176,
          "endLine": 207,
          "symbol": "recovery CAS"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/change-executor.ts",
          "line": 631,
          "endLine": 702,
          "symbol": "consumeAuthorization"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/change-executor.ts",
          "line": 407,
          "endLine": 436,
          "symbol": "outcome_unknown"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/confirmation-record-store.ts",
          "line": 211,
          "endLine": 236,
          "symbol": "consumedAt"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/write-recovery.ts",
          "line": 25,
          "endLine": 178,
          "symbol": "reconcileWriteFacts"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/main.ts",
          "line": 4609,
          "endLine": 4620,
          "symbol": "recoverUnterminatedWritesAndReport"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/session/local-file-operation-store.ts",
          "line": 228,
          "endLine": 250,
          "symbol": "listExpiredRequested"
        }
      ]
    },
    {
      "statement": "ExecutionHostRouter 以 callId:bindingDigest singleflight，并用 compareAndSet 认领 not_sent→possibly_sent；钉点上 AgentRun 只为 server-read 建 Router，handle store 缺省 InMemoryExecutionHandleStore（不跨进程）。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/execution-host/router.ts",
          "line": 159,
          "endLine": 191,
          "symbol": "bindingDigest"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/execution-host/router.ts",
          "line": 461,
          "endLine": 480,
          "symbol": "claimDispatch"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/run.ts",
          "line": 677,
          "endLine": 693,
          "symbol": "InMemoryExecutionHandleStore"
        }
      ]
    },
    {
      "statement": "孤儿 Run：recoverExpiredLeaseByConversation 排除受保护 Run、并先关闭只等过期卡的 legacy 树后，lease 过期且仍有 pending/approved/executing ActionProposal 或不可重放 pending checkpoint 的顶层 Run → manual_recovery RUN_ORPHANED，其余 → failed RUN_ORPHANED。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/session/run-store.ts",
          "line": 2039,
          "endLine": 2134,
          "symbol": "RUN_ORPHANED"
        }
      ]
    },
    {
      "statement": "缺连接器凭证时：businessEffects.start 已落 executing 后，toolExecutor 在 CAS 前抛 ConnectorNotAuthorizedError；continuation 判定本次尝试没有消费授权（writeAuthorityConsumedHere 为 false），proposal 仍为 pending/approved 时 markFailed(unconsumedOnly) 并经 recordUnsentBusinessEffect 把 outcome 记为 failed（BUSINESS_EFFECT_NOT_DISPATCHED），然后重抛。outcome 不再停在 executing；但仍没有独立的「已授权、待补凭证」状态。",
      "status": "verified",
      "limit": "#257 要的「授权闸 / 凭证闸分开命名、待补凭证态」仍未实现；勿画成已有待补凭证态。静态读码，本轮未运行测试。",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-task-continuation.ts",
          "line": 2413,
          "endLine": 2418,
          "symbol": "businessEffects.start"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/tool-executor.ts",
          "line": 188,
          "endLine": 192,
          "symbol": "ConnectorNotAuthorizedError"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-confirmed-execution.ts",
          "line": 679,
          "endLine": 709,
          "symbol": "writeAuthorityConsumedHere"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-confirmed-execution.ts",
          "line": 795,
          "endLine": 814,
          "symbol": "BUSINESS_EFFECT_NOT_DISPATCHED"
        }
      ]
    },
    {
      "statement": "fs/change 写回收：Desktop 启动 recoverUnterminatedWritesAndReport→reconcileWriteFacts 覆盖本机未完成写记录；Agent listExpiredRequested 仅 method IN (fs/list|fs/search|fs/read)，不盖 fs/change。长期离线等待写回执的 Operation 无 Agent TTL 自动过期；Run 层或走 orphan/manual_recovery，不等于写权限链回收 Operation。",
      "status": "verified",
      "limit": "Desktop 本机回收已覆盖；Agent TTL 对 fs/change 已核实未实现。属 #255 相关缺口。",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/session/local-file-operation-store.ts",
          "line": 228,
          "endLine": 249,
          "symbol": "listExpiredRequested"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/main.ts",
          "line": 4609,
          "endLine": 4620,
          "symbol": "recoverUnterminatedWritesAndReport"
        },
        {
          "repo": "aida-desktop",
          "commit": "4346d79eb36402355e51118df0edf1f98586880c",
          "path": "apps/desktop/electron/local-files-v4/write-recovery.ts",
          "line": 25,
          "endLine": 38,
          "symbol": "reconcileWriteFacts"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/session/run-store.ts",
          "line": 2039,
          "endLine": 2120,
          "symbol": "RUN_ORPHANED"
        }
      ]
    },
    {
      "statement": "确认后写入的自动重试收窄：isConfirmedWriteRetryableError 只对「确定没发出去」的情况重试——全新连接上的 not_sent 连接错误（ECONNREFUSED / ENOTFOUND 等）与无业务报文的网关 503；502、504、超时、连接重置都可能发生在业务已提交之后，按结果未知只尝试一次，executeConfirmedWrite 默认用这个判定。结果分类上，网关无报文（errorBody=none）的 UPSTREAM_ERROR 与幂等守卫 WRITE_OUTCOME_UNKNOWN 保持不确定（走源回读 / unknown），IDEMPOTENCY_STORE_UNAVAILABLE 视为确定未执行。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/confirmation/lifecycle.ts",
          "line": 1887,
          "endLine": 1947,
          "symbol": "isConfirmedWriteRetryableError"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/confirmation/lifecycle.ts",
          "line": 1972,
          "endLine": 1976,
          "symbol": "isConfirmedWriteRetryableError"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-confirmed-execution.ts",
          "line": 1626,
          "endLine": 1657,
          "symbol": "WRITE_OUTCOME_UNKNOWN_CODE"
        }
      ],
      "limit": "静态读码；本轮未运行 write-authority / lifecycle 测试。"
    },
    {
      "statement": "Run 停止与写消费的竞争：写授权消费调用 markExecuting 时传 requireActiveRun:true，CAS 同一句 UPDATE 检查所属 agent_runs 未 cancelled 且无 cancel_intent；停止先提交则消费失败、不发送，消费先提交则停止排在其后并结算已认领的写。",
      "status": "verified",
      "limit": "静态读码；本轮未运行测试。TLA+ 模型 NoConsumeAfterCancel 覆盖此性质（见下一条）。",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/interaction-kernel/write-authority.ts",
          "line": 281,
          "endLine": 325,
          "symbol": "requireActiveRun: true"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/session/action-proposal-store.ts",
          "line": 1120,
          "endLine": 1170,
          "symbol": "requireActiveRun"
        }
      ]
    },
    {
      "statement": "租约丢失后的 business_effect 恢复从 index.ts 移入 continuation 的 settleInterruptedBusinessEffect：恢复从不写源系统；已结案的直接收口；未派发的（无 outcome / executing / failed BUSINESS_EFFECT_NOT_DISPATCHED）先尝试按未发送收口；被用户重试复活的批次归重试 owner；批次成员 fence 与父结算都绑定所拥有的代际（batchRetryKey），陈旧恢复写不动新代际。",
      "status": "verified",
      "limit": "静态读码；本轮未运行测试。",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-task-continuation.ts",
          "line": 1671,
          "endLine": 1700,
          "symbol": "settleInterruptedBusinessEffect"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/business-effect-confirmed-batch.ts",
          "line": 237,
          "endLine": 250,
          "symbol": "batchRetryKey"
        }
      ]
    },
    {
      "statement": "仓内新增 TLA+ 设计模型：specs/tla/confirmed-write 建模单个确认写（AtMostOnce、NoConsumeAfterCancel、UnknownOnlyIfConsumed、NoApprovedLimbo、UnsentWriteFreesConversation 等性质，baseline 全部 PASS，Bug*.cfg 变体证明检查会失败），specs/tla/confirmed-batch 建模确认批次。它们是协议设计检查，不是代码测试。",
      "status": "verified",
      "limit": "本轮未运行 TLC；结果取自仓内提交的 results/summary.txt。",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "specs/tla/confirmed-write/README.md",
          "line": 1,
          "endLine": 7,
          "symbol": "design check"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "specs/tla/confirmed-write/results/summary.txt",
          "line": 4,
          "endLine": 16,
          "symbol": "NoConsumeAfterCancel"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "specs/tla/confirmed-batch/README.md",
          "line": 1,
          "endLine": 9,
          "symbol": "ConfirmedBatch.tla"
        }
      ]
    },
    {
      "statement": "审批职责分离 sourceSeparationOfDuty 收窄：能识别当前操作人时，只有操作人既是审批人又是发起人才判 violated；识别不了操作人时，发起人与审批人重叠只在源数据只给出单一审批人时判 violated，多审批人节点返回 undetermined，交给平台 / 源系统规则兜底，不再误拒其他审批人。",
      "status": "verified",
      "limit": "静态读码；本轮未运行测试。",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/capability-policy/verticals/admin-bypass-approval.ts",
          "line": 156,
          "endLine": 234,
          "symbol": "sourceSeparationOfDuty"
        }
      ]
    },
    {
      "statement": "确认时重读 VMS 表单描述（18af40288 / efd2255b4 / 71c5bc8c2）：create_vms_supplier / create_vms_project_draft / create_vms_project_position 的确认写入前，assertConfirmationSourceCurrent 调 assertVmsFormDescriptorEvidenceCurrent：提案 tenant/user 必须是当前确认人；确认卡必须带 formDescriptorForm、formValidationVersion=2 与 64 位 formDescriptorDigest，并以确认人的身份（tenantId/userId/run/invocation）重读当前描述，摘要不同即 BUSINESS_REJECT 要求重新准备；只有描述工具未挂载时，旧卡或显式 unavailable 证据才保留标准兼容。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/vms-form-descriptor-confirmation-guard.ts",
          "line": 22,
          "endLine": 29,
          "symbol": "VMS_FORM_DESCRIPTOR_GUARDED_TOOLS"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/vms-form-descriptor-confirmation-guard.ts",
          "line": 40,
          "endLine": 150,
          "symbol": "assertVmsFormDescriptorEvidenceCurrent"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/runtime/continuation/operation-confirmation-source-guard.ts",
          "line": 62,
          "endLine": 102,
          "symbol": "assertVmsFormDescriptorEvidenceCurrent"
        }
      ]
    },
    {
      "statement": "准备阶段的必填字段合同（formValidationVersion 2）：只有 origin=standard 且后台认证 extraFieldsWritable=true 的字段可自动填写；自定义 / 继承、选项不可得的 Dict/Enum、非 String/Text 的类型在提问前就阻断并给出恢复路径。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/capability-policy/verticals/vms-form-extra-fields.ts",
          "line": 9,
          "endLine": 10,
          "symbol": "VMS_FORM_VALIDATION_VERSION"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/orchestrator/capability-policy/verticals/vms-form-extra-fields.ts",
          "line": 92,
          "endLine": 101,
          "symbol": "extraFieldsWritable"
        }
      ]
    },
    {
      "statement": "describe_vms_form 的挂载来源：钉点里只有 202 增量配置脚本与在线 Skill 种子脚本把它写进 VMS Skill 的工具清单；仓库里没有这两个脚本对各租户的执行记录。",
      "status": "unverified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/scripts/apply-202-vms-closure-config.ts",
          "line": 569,
          "endLine": 599,
          "symbol": "describe_vms_form"
        },
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/scripts/lib/seed-online-skills.ts",
          "line": 199,
          "endLine": 202,
          "symbol": "describe_vms_form"
        }
      ],
      "limit": "各租户 Config DB 的 skills.tool_names 读不到，挂载与否未核。"
    },
    {
      "statement": "历史/业务确认预览签发权威前须匹配 proposal：interaction.businessEffect.targetRef 为 proposal:id，且 tenantId/interactionId/scopeDigest(=payloadHash) 一致，否则返回 business_proposal_unavailable（503），不签发。",
      "status": "verified",
      "sources": [
        {
          "repo": "aida-agent",
          "commit": "7f2e519936b57902d4907ed8026fe1ecdd146e82",
          "path": "packages/agent/src/gateway/api-conversation-interactions.ts",
          "line": 783,
          "endLine": 791,
          "symbol": "business_proposal_unavailable"
        }
      ]
    }
  ],
  "gaps": [
    {
      "issue": "ai/aida-agent#255",
      "state": "opened",
      "statement": "无统一『效应类型→声明落点→重放规则』总合同；Router handle 声明缺省为内存态。",
      "status": "not_implemented"
    },
    {
      "issue": "ai/aida-agent#257",
      "state": "opened",
      "statement": "凭证闸与授权闸未分开命名，凭证先于授权消费解析；缺凭证无独立分支；无显式执行队列概念。",
      "status": "not_implemented"
    },
    {
      "issue": "ai/aida-agent#257",
      "state": "opened",
      "statement": "缺凭证分支不 recordOutcome：已 start=executing 的 outcome 无收尾；无独立「已授权待补凭证」态。",
      "status": "not_implemented"
    },
    {
      "issue": "ai/aida-agent#255",
      "state": "opened",
      "statement": "Agent TTL listExpiredRequested 不盖 fs/change；长期离线写回执等待无写权限链主动回收 Operation。",
      "status": "not_implemented"
    }
  ]
}
