Skip to content

fix(config): migrate legacy top-level memorySearch#11656

Merged
vignesh07 merged 3 commits into
mainfrom
codex/migrate-top-level-memorysearch-11278
Feb 10, 2026
Merged

fix(config): migrate legacy top-level memorySearch#11656
vignesh07 merged 3 commits into
mainfrom
codex/migrate-top-level-memorysearch-11278

Conversation

@vignesh07

@vignesh07 vignesh07 commented Feb 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Add legacy migration from top-level memorySearch to agents.defaults.memorySearch.
  • Preserve explicit agents.defaults.memorySearch overrides when both are present.
  • Add migration and snapshot-detection regression tests.

Why

Fixes #11278 and #9143 by addressing a common config footgun where memory search settings are placed at top-level and silently fail modern schema expectations.

Changes

  • src/config/legacy.migrations.part-3.ts
    • Added memorySearch->agents.defaults.memorySearch migration.
  • src/config/legacy.rules.ts
    • Added legacy warning path for top-level memorySearch.
  • src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts
    • Added migration tests for move and merge behavior.
  • src/config/config.legacy-config-detection.accepts-imessage-dmpolicy.test.ts
    • Added snapshot legacy issue detection for top-level memorySearch.
  • docs/concepts/memory.md
    • Clarified canonical config path (agents.defaults.memorySearch).
  • CHANGELOG.md
    • Added #11278/#9143 fix note.

Validation

  • pnpm test src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts src/config/config.legacy-config-detection.accepts-imessage-dmpolicy.test.ts
  • pnpm check

Greptile Overview

Greptile Summary

This PR adds a legacy-config migration to move top-level memorySearch into agents.defaults.memorySearch, plus a legacy detection rule so snapshot validation flags configs still using the old path. It also updates documentation and changelog, and adds regression tests covering both migration and snapshot legacy detection.

The change integrates with the existing legacy migration pipeline (LEGACY_CONFIG_MIGRATIONS_PART_3) and the legacy issue detection mechanism (LEGACY_CONFIG_RULES), ensuring users are warned/blocked on snapshot validation and auto-migrated on load.

Confidence Score: 3/5

  • This PR is likely safe to merge but has one migration-precedence logic ambiguity that should be clarified/fixed.
  • Most changes are straightforward (new legacy rule, tests, docs). The main concern is the merge behavior in the new migration: the current mergeMissing(existing, legacy) direction enforces a specific precedence and may not match the stated intent, which can lead to subtle config outcomes when both paths are present.
  • src/config/legacy.migrations.part-3.ts

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Feb 8, 2026

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread src/config/legacy.migrations.part-3.ts
@vignesh07

Copy link
Copy Markdown
Member Author

Addressed the Greptile migration-precedence concern in ee7332a:

  • Clarified merge semantics in memorySearch -> agents.defaults.memorySearch migration.
  • Merge now clones existing agents.defaults.memorySearch first, then fills only missing fields from legacy top-level config.
  • Updated migration change text to make precedence explicit.
  • Added nested-precedence regression coverage (query.maxResults + nested query.hybrid.*) proving explicit agents.defaults values win while legacy values fill gaps.

Validation:

  • pnpm test src/config/config.legacy-config-detection.rejects-routing-allowfrom.test.ts
  • pnpm check

@thewilloftheshadow thewilloftheshadow added the maintainer Maintainer-authored PR label Feb 10, 2026
@vignesh07 vignesh07 force-pushed the codex/migrate-top-level-memorysearch-11278 branch from 651e672 to 4f20216 Compare February 10, 2026 08:05
@vignesh07 vignesh07 merged commit 8d80212 into main Feb 10, 2026
24 checks passed
@vignesh07 vignesh07 deleted the codex/migrate-top-level-memorysearch-11278 branch February 10, 2026 08:21
@vignesh07

vignesh07 commented Feb 10, 2026

Copy link
Copy Markdown
Member Author

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test
  • Land commit: 395456e
  • Merge commit: 8d80212

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

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memory_search tool ignores memory.backend=qmd, tries cloud embedding providers

2 participants