Skip to content

fix: ci test failed #2008

Description

@CarltonXiang

Pre-submission checklist | 提交前检查

  • I have searched existing issues and this hasn't been mentioned before | 我已搜索现有问题,确认此问题尚未被提及
  • I have read the project documentation and confirmed this issue doesn't already exist | 我已阅读项目文档并确认此问题尚未存在
  • This issue is specific to MemOS and not a general software issue | 该问题是针对 MemOS 的,而不是一般软件问题

Bug Description | 问题描述

Title

Fix failing tests caused by timed_with_status exception semantics and Neo4j integration environment leakage

Description

Recent full test runs fail with:

  • FAILED tests/test_utils_timing.py::TestTimedWithStatusRegression::test_failure_logging_no_fallback
  • ERROR tests/graph_dbs/test_neo4j_vector_search.py::TestNeo4jPreFilterIntegration::*

There are two separate causes.

1. timed_with_status test expectation is stale

timed_with_status now re-raises exceptions when no fallback is configured.

This behavior was introduced by:

  • Commit: 8d0c04be
  • Date: 2026-06-04 19:59:18 +0800
  • Message: fix: re-raise exceptions in timed_with_status when no fallback configured

The new regression test tests/test_utils_timing_exception_reraise.py expects this behavior and passes.

However, the older test added in:

  • Commit: f8ab9624
  • Date: 2026-04-17 16:17:45 +0800
  • Message: feat: add stage log (#1486)

still assumes fail_func() does not raise and only logs status: FAILED.

So tests/test_utils_timing.py::test_failure_logging_no_fallback should be updated to expect RuntimeError while still asserting the FAILED log is emitted.

2. Neo4j integration tests run when remote env vars are present

tests/graph_dbs/test_neo4j_vector_search.py::TestNeo4jPreFilterIntegration is enabled whenever all of these environment variables exist:

  • NEO4J_URI
  • NEO4J_USER
  • NEO4J_PASSWORD

When these point to an unavailable remote Neo4j instance, the full test suite fails with neo4j.exceptions.ServiceUnavailable.

These integration tests were added in:

  • Commit: fd2d4c76
  • Date: 2026-03-27 15:46:04 +0800
  • Message: fix: Neo4j vector search pre-filter and metadata handling (#1359)

Expected Behavior

  • Unit test suite should not fail because optional external Neo4j credentials happen to exist.
  • timed_with_status tests should consistently reflect the current behavior: no fallback means re-raise after logging failure.

Suggested Fix

  1. Update test_failure_logging_no_fallback to wrap fail_func() with pytest.raises(RuntimeError).
  2. Gate

How to Reproduce | 如何重现

make test

Environment | 环境信息

make test

Additional Context | 其他信息

No response

Willingness to Implement | 实现意愿

  • I'm willing to implement this myself | 我愿意自己解决
  • I would like someone else to implement this | 我希望其他人来解决

Metadata

Metadata

Assignees

Labels

ai-doneAI task completed successfullybugSomething isn't working | 功能异常good first issueGood for newcomers | 适合新手help wantedExtra attention is needed | 需要社区帮助memosCore MemOS logic (memory, MCP, scheduler, API, database) | 核心模块

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions