Skip to content

Tracking #1380: MCP settings stub write merged via safeWriteJson (race #1371) #1385

Description

@easonLiangWorldedtech

Tracking issue for upstream PR #1380 (branch fix/mcp-settings-stub-race-1371).

Part of the file-write safety series — plan: easonLiangWorldedtech/Zoo-Code#33, epic: #1375. Related upstream issue: #1371.

Scope

  • McpHub.getMcpSettingsFilePath() now writes the MCP settings stub via safeWriteJson(..., { prettyPrint: true, merge }) so an existing file is read-merged under the advisory lock instead of being blindly overwritten (no lost mcpServers keys on the first stub write).
  • Coverage tests for the merge fallback (codecov patch 100% — all changed lines + BRDA branches).

Acceptance

  • Stub write preserves existing keys via the merge callback
  • CI green (ubuntu unit-test gate)
  • Bot comments resolved

Status

  • PR: OPEN, MERGEABLE — CI green (platform-unit-test ubuntu SUCCESS, codecov/patch SUCCESS, CodeRabbit SUCCESS)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions