Skip to content

test: cover mem_feedback basics#1715

Merged
CaralHsi merged 2 commits into
MemTensor:v2.0.16from
snoopuppy582:test/mem-feedback
May 14, 2026
Merged

test: cover mem_feedback basics#1715
CaralHsi merged 2 commits into
MemTensor:v2.0.16from
snoopuppy582:test/mem-feedback

Conversation

@snoopuppy582
Copy link
Copy Markdown

Fixes #1696

Summary

  • Added a dedicated tests/mem_feedback package.
  • Covered the base feedback interface contract and MemFeedbackConfig behavior.
  • Added dependency-free utility tests for token estimation, update filtering, JSON extraction, chunking, and memory item creation.

Tests

  • uv run --python 3.12 --extra mem-reader --with pytest pytest tests/mem_feedback -q
  • uv run --python 3.12 --extra mem-reader --with pytest pytest tests/mem_feedback tests/mem_chat/test_base.py tests/mem_cube/test_base.py -q
  • uv run --python 3.12 --extra mem-reader --with ruff ruff check tests/mem_feedback
  • git diff --check

Notes

  • Kept the tests local-only; no LLM, database, or network service is required.
  • The contributing guide mentions a dev base branch, but this repository currently exposes main as the active/default base branch.

@CaralHsi
Copy link
Copy Markdown
Collaborator

Hi!
Thanks for your contribution!
This is a good start for basic coverage, but it does not yet cover the main MemFeedback.process_feedback workflow. The PR currently tests config parsing, the abstract base class, and a few utility functions, while the core feedback processing path (_validate_feedback_data, _record_feedback, _analyze_feedback) and operation-specific branches remain untested. Could we add at least one mocked workflow test for process_feedback covering a valid feedback input and the expected downstream calls?

@snoopuppy582
Copy link
Copy Markdown
Author

Thanks for the review. I added a mocked process_feedback workflow test that verifies a valid feedback input calls both _generate_answer and process_feedback_core, then returns the downstream memory record.

Verified locally:

  • uv run --with pytest pytest tests/mem_feedback -q -> 16 passed

@CaralHsi CaralHsi changed the base branch from main to v2.0.16 May 14, 2026 02:45
Copy link
Copy Markdown
Collaborator

@CaralHsi CaralHsi left a comment

Choose a reason for hiding this comment

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

Looks good to me 😸

@CaralHsi CaralHsi merged commit 99fb9e6 into MemTensor:v2.0.16 May 14, 2026
16 checks passed
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.

Add unit tests for mem_feedback

2 participants