fix(#759): Deduplicate entry validation in MemoryManager #806

Open
sleepy wants to merge 0 commits from fix/dedup-validation-759 into main
Owner

Extracts _ensure_defaults() static method that handles field-defaulting (id, timestamp, source, category). Both _validate_entries() and save() now delegate to it instead of duplicating the logic. Closes #759

Extracts _ensure_defaults() static method that handles field-defaulting (id, timestamp, source, category). Both _validate_entries() and save() now delegate to it instead of duplicating the logic. Closes #759
Extract _ensure_defaults() static method that handles field-defaulting
for id, timestamp, source, and category on a single entry. Both
_validate_entries() and save() now delegate to it instead of
duplicating the logic.

The source_default parameter preserves the behavioral difference:
- _validate_entries (load path) defaults source to 'unknown'
- save defaults source to 'user'

Closes #759
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/dedup-validation-759:fix/dedup-validation-759
git switch fix/dedup-validation-759

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff fix/dedup-validation-759
git switch fix/dedup-validation-759
git rebase main
git switch main
git merge --ff-only fix/dedup-validation-759
git switch fix/dedup-validation-759
git rebase main
git switch main
git merge --no-ff fix/dedup-validation-759
git switch main
git merge --squash fix/dedup-validation-759
git switch main
git merge --ff-only fix/dedup-validation-759
git switch main
git merge fix/dedup-validation-759
git push origin main
Sign in to join this conversation.
No description provided.