Repository navigation
fix(config): generate unique default identifiers - #2201
JiataiWang wants to merge 6 commits into
Conversation
🤖 Open Code ReviewTarget: PR #2201 ✅ OpenCodeReview: Review complete: 0 finding(s) across 4 selected item(s). Generated by cloud-assistant via Open Code Review. |
|
Good catch to check. I reran this with the exact test setup: Pydantic v2 |
|
|
Fixed the CWD dependency in 7e8769c: both tests now resolve the fixture relative to |
✅ Automated Test Results: PASSEDAll tests passed (4/4 executed). memos_python_core/changed-repo-python: 4/4. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-2d018f7ca2c29a15-20260808102020: 61/61 passed — these do NOT affect the PR verdict; review the branch manually. Branch: |
|
Thanks for the approval, @WeiminLee. I noticed the required Python tests workflow is still sitting at |
✅ Automated Test Results: PASSEDAll tests passed (4/4 executed). memos_python_core/changed-repo-python: 4/4. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-a8b5631b96d328da-20260818094438: 43/43 passed — these do NOT affect the PR verdict; review the branch manually. Branch: |
|
Hey, quick routing check: should I leave this on |
✅ Automated Test Results: PASSEDAll tests passed (4/4 executed). memos_python_core/changed-repo-python: 4/4. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-badccebe02e5683f-20260905093853: 74/75 passed, 1 failed — these do NOT affect the PR verdict; review the branch manually. Branch: |
|
Retargeted this to main now that dev-v2.0.30 has been released and is no longer active, then merged current main into the existing branch without changing the four-file PR diff. The prior approval remains in place; all 16 required Python matrix jobs are green, and both reported status checks are passing. Ready to merge. |
✅ Automated Test Results: PASSEDAll tests passed (4/4 executed). memos_python_core/changed-repo-python: 4/4. Duration: 5s [advisory, non-gating] AI-generated tests on branch test/auto-gen-8c07b5f3cc526ee7-20260908172138: 67/67 passed — these do NOT affect the PR verdict; review the branch manually. Branch: |
|
This PR has been automatically marked as stale due to inactivity. |
|
Following up to keep this fix active after the stale notice. The current head is still @WeiminLee, could you please remove the stale status and take another look at merging this when convenient? Please let me know if you need the branch updated to the latest |
Description
MOSConfig.session_idandGeneralMemCubeConfig.cube_idcurrently calluuid.uuid4()when their modules are loaded. Pydantic then treats those generated strings as static defaults, so separate config instances created in the same process reuse the same identifier.This switches both fields to
default_factory. Explicit IDs and existing serialized configs keep the same behavior; only omitted IDs now get a fresh UUID per instance.The PR is now based on
dev-v2.0.30; the bug is still present there and the four-file functional diff is unchanged. No dependencies are added. I couldn't find an existing issue or PR for this, and the contribution guide says small bug fixes can go directly to a PR.Related Issue (Required): N/A
Type of change
How Has This Been Tested?
Verification on the merged
dev-v2.0.30tree:uv run --frozen --with 'pytest==8.3.5' pytest tests/configs/ -q— 39 passeduv run --frozen --extra mem-reader --with 'pytest==8.3.5' pytest tests/mem_os/ -q— 36 passed (3 existing Pydantic serialization warnings)uv run --frozen --with 'poetry>=2,<3' --with 'ruff==0.11.13' make format— Ruff passed; 621 files unchangedgit diff --check origin/dev-v2.0.30...HEAD— passedPython testsmatrix — 16/16 passed across Ubuntu, Windows, macOS 14/15 and Python 3.10–3.13Checklist
@WeiminLee when you have a moment, could you take a look?
Reviewer Checklist