Skip to content

test: guard paired configuration and component defaults - #1846

Open
DivyamTalwar wants to merge 1 commit into
MemMachine:mainfrom
DivyamTalwar:test/component-default-parity-1509
Open

DivyamTalwar wants to merge 1 commit into
MemMachine:mainfrom
DivyamTalwar:test/component-default-parity-1509

Conversation

@DivyamTalwar

Copy link
Copy Markdown

Purpose of the change

Configuration models and their component parameter models intentionally duplicate several scalar defaults. A change on only one side can silently make omitted values behave differently. This adds a focused regression guard for those declared pairs.

Description

  • Compare 26 explicit configuration/component pairs, including retry limits, rerankers, short-term capacity, semantic limits, session cache, store settings, and seven Nebula defaults.
  • Compare both exact scalar types and values through Pydantic field metadata or dataclass metadata. Required fields and default factories fail clearly instead of being mistaken for direct defaults.
  • Import components lazily and construct no clients. Skip only the seven Nebula pairs when both its optional distribution and module are absent; an installed but broken SDK still fails.
  • Keep partial/injected defaults and validation constraints outside this manifest. In particular, the separate RRF validation-boundary discrepancy is not changed.

Related issue

Refs #1723. This is the preventive default-parity portion, not a claim to resolve every configuration/component validation difference.

Type of change

  • Project Maintenance (regression coverage; no production behavior change)

How Has This Been Tested?

Linux, Python 3.12.14, the frozen repository base environment:

  • New manifest without the Nebula extra: 19 passed, 7 explicitly named skips.
  • With the locked nebula5-python==5.2.2 installed: focused configuration and RRF suite 184 passed, including all 26 manifest cases.
  • Changed-file Ruff, Ruff formatting, and ty checks passed; git diff --check passed.
  • Controlled mutations of BM25 k1 from 1.5 to 1.75, and Neo4j False to 0, failed their exact cases. Both production files were restored byte-for-byte afterward.

Reproduce the manifest with uv run pytest packages/server/server_tests/memmachine_server/common/configuration/test_component_default_parity.py -q. Install the Nebula extra to exercise its seven entries. The complete optional-dependency and OS/Python CI matrix was not run locally.

  • Unit Test

Checklist

  • I have signed the commit(s) within this pull request
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code
  • I have added unit tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (focused suites above)
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • Confirmed all checks passed
  • Contributor has signed the commit(s)
  • Reviewed the code
  • Run, Tested, and Verified the change(s) work as expected

Further comments

Implementation, code review, and validation were performed with OpenAI Codex on the contributor's authorization. The human self-review box remains unchecked. The commit carries a Signed-off-by trailer and GitHub's verified signature, created through the authenticated commit API. No human review or full CI pass is claimed.

Add an explicit 26-pair scalar default manifest without constructing providers or changing runtime validation.

Refs MemMachine#1723

Implemented and reviewed with OpenAI Codex.

Signed-off-by: Divyam Talwar <divyamtalwar0@gmail.com>

This branch has not been deployed

No deployments
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.

1 participant