Skip to content

fix: scope the dropped-system-message hint to retrieval memories - #91

Merged
JarbasAl merged 1 commit into
devfrom
fix/drop-warning-inject-mode-scope
Oct 20, 2026
Merged

JarbasAl merged 1 commit into
devfrom
fix/drop-warning-inject-mode-scope

Conversation

@openvoiceos-bot

@openvoiceos-bot openvoiceos-bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Auto-generated by Claude Opus 5.5 (claude-opus-5-5) via Claude Code — NOT human-reviewed. Verify before acting.

The warning for a dropped system message ends with advice to set the memory plugin's 'inject_mode'. That advice is wrong for the entity and longterm memories. They have no such setting. It is also incomplete for the retrieval memories.

Only the retrieval memories read 'inject_mode': lexical, local-rag and composite passages (ovos-memory-plugins 1.2.0a3, base.py:91, class BaseRetrievalMemory), and the rag memory in this package (ovos_openai_plugin/rag_memory.py:121). Entity and longterm always send a system message (entity.py:184-188, longterm.py:238). A composite passes their blocks as system messages whatever its own inject_mode is (composite.py:173-186).

A memory 'system_prompt' still goes out as a system message in every mode except 'system_prompt' (base.py:246-249, rag_memory.py:211-212). So 'inject_mode: user' alone keeps the warning. This engine adds its own 'system_prompt' after the drop (chat.py:89-99), so the working fix is to move the prompt there.

The warning now ends: "set 'allow_system_prompts', or, for a retrieval memory (lexical, local-rag, the passages of a composite, or ovos-openai-rag-memory-plugin), set its 'inject_mode' to 'user' and move its 'system_prompt' to this engine's 'system_prompt'."

The new test asserts that text. It fails on the old text and passes on the new text. The full suite gives 81 passed. The README and docs held no copy of the old advice.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c29dd9c-b1fa-48b6-9e74-c1da28066e14
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions github-actions Bot added the fix label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Pardon the interruption, but your automated checks are ready! 🛎️

I've aggregated the results of the automated checks for this PR below.

🔍 Lint

Checking the boxes and crossing the T's. 🖋️

❌ ruff: issues found in 18 file(s) — see job log
✅ actionlint: 9 workflow file(s), no finding

⚖️ License Check

Verifying the source of all binary files. 💾

✅ No license violations found.

Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed.

🔌 Skill Tests (ovoscope)

Checking if the skill meets our quality standards. ✅

✅ 3/3 passed

✅ TestOpenAIPerSessionMemory — 1/1
✅ TestOpenAIPersonaSpeaksThroughPipeline — 2/2

🚌 Bus Coverage

Is the message bus fully covered? Let's see the stats. 📊

⚠️ Bus coverage report unavailable — check the job log.

🔨 Build Tests

I've put your code through the build grinder. ☕

✅ All versions pass

Python Build Install Tests pytest
3.10 ✅ ✅ ✅ 81 passed, 2 warnings in 6.06s
3.11 ✅ ✅ ✅ 81 passed, 2 warnings in 6.07s
3.12 ✅ ✅ ✅ 81 passed, 2 warnings in 5.60s
3.13 ✅ ✅ ✅ 81 passed, 2 warnings in 5.90s
3.14 ✅ ✅ ✅ 81 passed, 2 warnings in 7.87s

📊 Coverage

Scanning for any 'untested' alerts! 🚨

✅ 89.3% total coverage

Per-file coverage (8 files)
File Coverage Missing lines
ovos_openai_plugin/version.py 0.0% 5
ovos_openai_plugin/translate.py 83.3% 7
ovos_openai_plugin/api.py 87.2% 16
ovos_openai_plugin/rag_memory.py 90.3% 11
ovos_openai_plugin/__init__.py 100.0% 0
ovos_openai_plugin/chat.py 100.0% 0
ovos_openai_plugin/dialog_transformers.py 100.0% 0
ovos_openai_plugin/summarizer.py 100.0% 0

Full report: download the coverage-report artifact.


A robot's work is never done... but this PR check is! ⚙️

The drop warning told the user to set the memory plugin's 'inject_mode'
to one this engine keeps. Only the retrieval memories read inject_mode
(BaseRetrievalMemory in ovos-memory-plugins, and the rag memory in this
package). The entity and longterm memories always send a system message
and have no such option, so the advice sent their users to a setting
that does not exist.

The hint now names 'allow_system_prompts' first and limits the
inject_mode advice to retrieval memories, with the value 'user'.

Before the change the new test fails on the old text; after it, all 81
tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JarbasAl
JarbasAl force-pushed the fix/drop-warning-inject-mode-scope branch from dc5716b to 9b29e4c Compare October 20, 2026 17:41
@github-actions github-actions Bot added fix and removed fix labels Oct 20, 2026
@JarbasAl
JarbasAl marked this pull request as ready for review October 20, 2026 17:49
@JarbasAl
JarbasAl merged commit 3810522 into dev Oct 20, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants