Skip to content

Follow-up to #2954: deepMergeProviders is a recursive assignment-semantics merge over external config keys #4957

Closed

Description

@dezren39

Filed by the Phase 3 closing inventory audit of design #2953 (issue #2954, queue task 7683, PR #4956) as its named deep-merge follow-up.

Finding

bin/provider-catalog-sync.mjs exports deepMergeProviders(base, over) — a recursive merge used to fold the runtime config overlay into the effective provider config (runSync). A recursive merge is assignment semantics at every depth: keys spelled by the overlay file (a file-spelled, external source) are written into the merged object per level, so a __proto__ key at any depth goes through the [[Set]] setter instead of becoming an own property — the exact class design #2953 contracts against.

Why this is a follow-up, not part of PR #4956

The #2953 design doc records deep-merge helpers as an explicit open question: "a recursive merge is assignment semantics at every depth; no in-tree instance is known — Phase 3's audit reports one if it exists rather than this design pre-deciding its shape." This is that report. The fix shape needs its own decision: convert the merge to Map/null-prototype containers per level, or write leaves with define semantics (Object.defineProperty) while recursing — weighing that the merged result feeds config serialization and the catalog-sync guard (assertCatalogOnly) compares parsed before/after configs.

Acceptance

Refs: #2953 (design), #2954 (Phase 3 audit).

Activity

  1. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    state: queued
    Enqueued as task 8074 (small_fix, repo-health-code-pilot) by lane code-j at the close of the #2954 audit (task 7683), so this follow-up has a live next action.

  2. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  3. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  4. added a commit that references this issue on Nov 3, 2026
  5. dezren39 commented on Nov 3, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (merge follow-up)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions