You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The assertions assert "embedding" not in rendered, assert "0.123456" not in rendered, and assert "do-not-log" not in rendered are vacuously true and provide no meaningful test coverage. The summarize_search_results function returns a fixed-shape dict ({"bucket_counts": ..., "item_counts": ..., "total_items": ...}) that never contains the input keys or values, so these assertions would pass even if the function were completely broken and leaked payload. To actually validate that private payload is excluded from the logged output, the test should assert on the absence of the raw input dict's string representation, or use a mock/spy to verify the argument passed to the logger. Alternatively, if a buggy implementation were introduced that passed results directly to the logger instead of log.summarize_search_results(results), the assertion assert "private memory payload" not in rendered and assert "private preference note" not in rendered would catch it, but the "embedding", "0.123456", and "do-not-log" assertions add nothing on top of those.
💡 Suggested Change
Before:
assert "embedding" not in rendered
assert "0.123456" not in rendered
assert "do-not-log" not in rendered
After:
# These values are private inputs that must not appear in the logged summary.
# The assertions below already cover the key privacy guarantees:
assert "private memory payload" not in rendered
assert "private preference note" not in rendered
# Note: "embedding", "0.123456", "do-not-log" would never appear in the summary
# dict regardless of input, so those assertions are redundant and not meaningful.
Generated by cloud-assistant via Open Code Review.
All tests passed (8/8 executed). memos_python_core/changed-repo-python: 8/8. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-d401551f78cdcd5e-20260805163841: 43/43 passed — these do NOT affect the PR verdict; review the branch manually.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
area:coreMOS 编排层 / 框架底座 / 跨模块问题status:readyReady for implementation; waiting for assignee or AI dispatch | 可进入实现,等待认领或派发
3 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #2103.
Supersedes #2110.
Verification