Skip to content

fork-only: memory_persistence backward compatibility - #2

Merged
clicksingh merged 1 commit into
mainfrom
codex/memory-persistence-backcompat
Mar 12, 2026
Merged

fork-only: memory_persistence backward compatibility#2
clicksingh merged 1 commit into
mainfrom
codex/memory-persistence-backcompat

Conversation

@clicksingh

@clicksingh clicksingh commented Mar 12, 2026

Copy link
Copy Markdown
Owner

fork-only change.\n\nadds backward compatibility for top-level [memory_persistence] while keeping [defaults.memory_persistence] as preferred config location.\n\nno upstream PR for this.

@coderabbitai

coderabbitai Bot commented Mar 12, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The changes introduce support for legacy top-level memory_persistence configuration while encouraging migration to defaults.memory_persistence, add a new channel_recall tool to the prompt, refine memory_recall guidance for recent queries, and include unit tests validating the configuration behavior.

Changes

Cohort / File(s) Summary
Prompt Updates
prompts/en/branch.md.j2, prompts/en/tools/memory_recall_description.md.j2
Adds channel_recall tool for retrieving transcript history from channels and augments memory_recall guidance to prefer "recent" mode for recency-focused queries.
Configuration Schema
src/config/toml_schema.rs
Adds optional memory_persistence field to TomlConfig struct to support top-level configuration of memory persistence settings.
Configuration Loading & Validation
src/config/load.rs
Adds "memory_persistence" to known top-level keys with legacy support, emitting a deprecation warning and merging into defaults.memory_persistence during resolution.
Configuration Tests
src/config.rs
Adds two unit tests verifying that top-level memory_persistence is parsed correctly and that defaults.memory_persistence properly overrides legacy top-level configuration.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A channel to recall, transcripts preserved in time,
Memory modes aligned, recency sublime,
Config backwards-compatible, tests ensure it's sound,
Legacy paths gracefully resolved, new directions found!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title directly and accurately reflects the main objective: adding backward compatibility for the memory_persistence configuration key.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/memory-persistence-backcompat

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d255715fff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/config/load.rs
Comment on lines 1415 to +1416
.memory_persistence
.or(toml.memory_persistence)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Merge legacy memory_persistence fields instead of whole table

Using Option::or here makes [defaults.memory_persistence] win as an all-or-nothing table, so when both locations are present and the new table is only partially populated, values from legacy [memory_persistence] are silently dropped and replaced by hardcoded defaults (for example, message_interval reverts to 50). This breaks backward-compatibility during incremental migrations; precedence should be applied per field (enabled/message_interval) rather than by selecting one entire table.

Useful? React with 👍 / 👎.

@clicksingh clicksingh changed the title memory_persistence backward compatibility fork-only: memory_persistence backward compatibility Mar 12, 2026
@clicksingh clicksingh added the no-upstream fork-only change, do not open upstream PR label Mar 12, 2026
@clicksingh
clicksingh merged commit 2271017 into main Mar 12, 2026
1 check passed
@clicksingh
clicksingh deleted the codex/memory-persistence-backcompat branch March 12, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-upstream fork-only change, do not open upstream PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant