Remove implicit prompt defaults from config#1138
Conversation
PromptConf now leaves org/project prompt categories empty by default. This redcuces behavior change from the semantice set id refacotr.
There was a problem hiding this comment.
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_categoriesanddefault_project_categoriesdefaults to empty lists. - Update sample episodic configs to configure
default_user_categoriesinstead 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.
| def test_prompt_conf_custom_user_categories() -> None: | ||
| conf = PromptConf(default_user_categories=["coding_prompt"]) | ||
|
|
There was a problem hiding this comment.
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.
|
|
||
|
|
There was a problem hiding this comment.
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.
| # 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 |
|
Hi @o-love , great thanks for creating this PR, integration test for this PR failed would you please help to take a look? |
|
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? |
PromptConf now leaves org/project prompt categories empty by default. This redcuces behavior change from the semantice set id refacotr.
fixes #1092