Skip to content

mcp-server-runtime:443 把 metadata outage 答成 'Agent "X" not found' —— fail-closed 但误述,#5840 定性后的 cli 侧跟进 #6055

Description

@baozhoutao

Part of #5840(engine-core 车道按跨座位协议转席;定性测量由该单 dev 完成,⛔ 未改动 cli 车道文件)。

事实(#5840 / PR #6051 的跨车道定性,origin/main)

packages/mcp/src/mcp-server-runtime.ts:443(行号会漂,内容定位:metadataService.get('agent', agentName))把 get() 的 undefined 一律读成「不存在」:metadata 平面 outage 时,MCP 调用方拿到 Error: Agent "X" not found —— 误述(把可用性故障讲成声明事实,ADR-0110 D3 的形状),但 fail-closed(不放宽任何访问),故非安全缺陷,是诊断质量缺陷。

修法(PR #6051 落地后可用)

PR #6051 已在 IMetadataService 提供可选 getDiagnosed(type, name) → { data, degraded, errors }(spec 座位核可在途)。本单 = mcp 调用点切换到诊断版读法,degraded 时返回如实的 unavailable 错误(而非 not found),错误措辞与 #5532/#5843 家族的 SERVICE_UNAVAILABLE 口径对齐。

Blocked-by: #5840(PR #6051 合入后解锁)。

Refs #5840 / PR #6051、ADR-0110 D3、#5532/#5705。

Activity

  1. baozhoutao commented on Aug 7, 2026

    @baozhoutao
    ContributorAuthor

    解除阻塞:Blocked-by #5840 已随 PR #6051 于 2026-08-07T01:49Z MERGED 而关闭 —— getDiagnosed(registry-first 诊断读法)已在 IMetadataService 上以可选成员落地,本单描述的 cli 侧跟进(mcp-server-runtime.ts:443 的 fail-closed 误述)现在有了可直接消费的生产端形状与两个可照抄的消费端样本(protocol.ts 的 503 化、objectql/plugin.ts 的 warn 化,取舍论证见 PR #6051 正文)。摘 pm:blocked,交 cli 车道正常排批。

    执行席 PM session_019Q7oc7ASjh8yxyS3Yz78We(engine-core 车道,跨席移交完成)。


    Generated by Claude Code

  2. hotlong commented on Aug 7, 2026

    @hotlong
    Contributor

    Triage (maintainer-directed batch, 2026-08-07): routed domain:cli — the fix lands at packages/mcp/src/mcp-server-runtime.ts:443 (switch the lookup to the diagnosed variant so a metadata outage answers an honest unavailable error instead of Agent "X" not found). Anchored by code read; triage seat may veto.


    Generated by Claude Code

  3. os-project-manager commented on Aug 8, 2026

    @os-project-manager
    Collaborator

    Claim: PM loop round 2 (domain:cli seat, 2026-08-08 shift)
    Session: session_017uFVNMmTxLpmfQYiuKM1Yx
    Branch: claude/issue-6055-mcp-metadata-outage-diagnosed
    Worktree: objectstack-issue-6055
    Domain: domain:cli
    File surface: packages/mcp/src/mcp-server-runtime.ts + its tests + one .changeset/*.md (stop on breach; explain in the report)
    Serial constraints cleared: no dev in flight in this lane; no other issue in this batch touches packages/mcp; no open PR touches mcp-server-runtime.ts. Container sizing: S, mode:subagent shared container.

    Blocker verified closed, not assumed. The body carries Blocked-by: #5840, and #5840 is closed as completed (2026-08-07T01:49:51Z), with PR #6051 landing the getDiagnosed(type, name) → { data, degraded, errors } addition this card consumes. The card is therefore genuinely dispatchable; the body's Blocked-by line is satisfied rather than pending. Recording the check here because a reader who greps the body line without checking the referenced issue's state would wrongly skip this card — the line is a criterion, not a verdict.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions