Skip to content

Remove implicit prompt defaults from config#1138

Merged
sscargal merged 3 commits into
mainfrom
semantic-config-change
Feb 25, 2026
Merged

Remove implicit prompt defaults from config#1138
sscargal merged 3 commits into
mainfrom
semantic-config-change

Conversation

@o-love

@o-love o-love commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

PromptConf now leaves org/project prompt categories empty by default. This redcuces behavior change from the semantice set id refacotr.

fixes #1092

PromptConf now leaves org/project prompt categories empty by default.
This redcuces behavior change from the semantice set id refacotr.

Copilot AI 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.

Pull request overview

Updates PromptConf to remove implicit defaults for org/project prompt categories so config behavior is more explicit and less surprising.

Changes:

  • Set default_org_categories and default_project_categories defaults to empty lists.
  • Update sample episodic configs to configure default_user_categories instead of project categories.
  • Remove/adjust tests that previously assumed org/project defaults included profile_prompt.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/memmachine/installation/test_configuration_wizard.py Removes assertions that org/project prompt defaults are implicitly populated.
tests/memmachine/common/configuration/test_prompt_conf.py Removes a test that relied on org/project defaults mirroring user defaults.
src/memmachine/common/configuration/init.py Changes org/project prompt category defaults to empty lists.
sample_configs/episodic_memory_config.gpu.sample Updates sample prompt config to set user categories instead of project categories.
sample_configs/episodic_memory_config.cpu.sample Updates sample prompt config to set user categories instead of project categories.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/memmachine/common/configuration/__init__.py
Comment on lines 5 to 7
def test_prompt_conf_custom_user_categories() -> None:
conf = PromptConf(default_user_categories=["coding_prompt"])

Copilot AI Feb 24, 2026

Copy link

Choose a reason for hiding this comment

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

The test that validated the default behavior was removed, but the PR changes the defaults in a meaningful way (org/project now empty, user still non-empty). Add a new/updated test asserting the new defaults (e.g., org/project resolve to empty lists and user contains profile_prompt) so the intended behavior is locked in.

Copilot uses AI. Check for mistakes.
Comment on lines 63 to 64


Copilot AI Feb 24, 2026

Copy link

Choose a reason for hiding this comment

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

This test previously asserted that config.prompt.default_project_categories / default_org_categories included profile_prompt. Since the defaults changed, consider replacing those removed assertions with explicit checks that org/project categories are empty by default (and that user defaults remain as expected), to keep coverage for the configuration wizard’s resulting prompt config.

Suggested change
# Validate prompt configuration defaults: user keeps profile_prompt,
# while project and org categories are empty by default.
prompt_conf = config.prompt
assert "profile_prompt" in prompt_conf.default_user_categories
assert len(prompt_conf.default_project_categories) == 0
assert len(prompt_conf.default_org_categories) == 0

Copilot uses AI. Check for mistakes.
@jgong

jgong commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Hi @o-love , great thanks for creating this PR, integration test for this PR failed

FAILED tests/memmachine/main/test_memachine.py::test_memmachine_list_search_paginates_semantic[openai_embedder_config-openai-identity_reranker_config] - memmachine.common.errors.CategoryNotFoundError: Category 'profile' does not exist for set_id 'mem_project_set_org_org_pagination_project_project_pagination_0_46b9dd2b0ba8__'. Please create the category before adding features to it.
FAILED tests/memmachine/main/test_memachine.py::test_memmachine_delete_features_removes_semantic_entries[openai_embedder_config-openai-identity_reranker_config] - memmachine.common.errors.CategoryNotFoundError: Category 'profile' does not exist for set_id 'mem_project_set_org_test_org_project_test_proj_0_46b9dd2b0ba8__'. Please create the category before adding features to it.
FAILED tests/memmachine/main/test_memachine.py::test_add_then_get_feature[openai_embedder_config-openai-identity_reranker_config] - memmachine.common.errors.CategoryNotFoundError: Category 'profile' does not exist for set_id 'mem_project_set_org_test_org_project_test_proj_0_46b9dd2b0ba8__'. Please create the category before adding features to it.
FAILED tests/memmachine/main/test_memachine.py::test_add_update_get_feature[openai_embedder_config-openai-identity_reranker_config] - memmachine.common.errors.CategoryNotFoundError: Category 'profile' does not exist for set_id 'mem_project_set_org_test_org_project_test_proj_0_46b9dd2b0ba8__'. Please create the category before adding features to it.
FAILED tests/memmachine/main/test_memmachine_integration.py::TestMemMachineLongMemEval::test_memmachine_smoke_ingests_all_memories[openai_embedder_config-openai-identity_reranker_config] - Failed: Messages were not ingested by semantic memory
= 5 failed, 13 passed, 18 skipped, 42 deselected, 747 warnings in 226.11s (0:03:46) =

would you please help to take a look?

@jgong

jgong commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Hi @o-love, thank you for the change! I noticed that the tests didn't quite pass in this run: https://github.com/MemMachine/MemMachine/actions/runs/22379664640/job/64878202213?pr=1138 , would you please help to take a further look?

@jgong jgong 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.

great thanks!

@sscargal sscargal 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.

LGTM, thanks.

@sscargal sscargal merged commit 3baaa8d into main Feb 25, 2026
48 checks passed
@sscargal sscargal deleted the semantic-config-change branch February 25, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: default values of prompt when install and upgrade

4 participants