Skip to content

[Bug]: legacy web search migration drops unrelated record-valued config #83287

@giodl73-repo

Description

@giodl73-repo

Summary

A local code audit found that legacy web search migration can drop unrelated record-valued keys while migrating known legacy web search provider config.

Affected area

  • src/commands/doctor/shared/legacy-web-search-migrate.ts
  • normalizeLegacyWebSearchConfigRecord
  • migrateLegacyWebSearchConfig

Repro

Run the legacy web search migration on a config where tools.web.search includes a known legacy provider/apiKey plus an unrelated record-valued key. The unrelated record can be omitted from the returned config.

Expected

Only explicitly migrated legacy provider records and known global legacy keys should be removed. Unknown/unrelated config should be preserved unless blocked by prototype-key safety rules.

Suggested fix

In normalizeLegacyWebSearchConfigRecord, omit only keys positively identified as migrated legacy provider records and known migrated globals; preserve other record-valued keys.

Source: local code audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions