Pre-submission checklist | 提交前检查
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
- Update
test_failure_logging_no_fallback to wrap fail_func() with pytest.raises(RuntimeError).
- Gate
How to Reproduce | 如何重现
make test
Environment | 环境信息
make test
Additional Context | 其他信息
No response
Willingness to Implement | 实现意愿
Pre-submission checklist | 提交前检查
Bug Description | 问题描述
Title
Fix failing tests caused by
timed_with_statusexception semantics and Neo4j integration environment leakageDescription
Recent full test runs fail with:
FAILED tests/test_utils_timing.py::TestTimedWithStatusRegression::test_failure_logging_no_fallbackERROR tests/graph_dbs/test_neo4j_vector_search.py::TestNeo4jPreFilterIntegration::*There are two separate causes.
1.
timed_with_statustest expectation is staletimed_with_statusnow re-raises exceptions when nofallbackis configured.This behavior was introduced by:
8d0c04be2026-06-04 19:59:18 +0800fix: re-raise exceptions in timed_with_status when no fallback configuredThe new regression test
tests/test_utils_timing_exception_reraise.pyexpects this behavior and passes.However, the older test added in:
f8ab96242026-04-17 16:17:45 +0800feat: add stage log (#1486)still assumes
fail_func()does not raise and only logsstatus: FAILED.So
tests/test_utils_timing.py::test_failure_logging_no_fallbackshould be updated to expectRuntimeErrorwhile 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::TestNeo4jPreFilterIntegrationis enabled whenever all of these environment variables exist:NEO4J_URINEO4J_USERNEO4J_PASSWORDWhen these point to an unavailable remote Neo4j instance, the full test suite fails with
neo4j.exceptions.ServiceUnavailable.These integration tests were added in:
fd2d4c762026-03-27 15:46:04 +0800fix: Neo4j vector search pre-filter and metadata handling (#1359)Expected Behavior
timed_with_statustests should consistently reflect the current behavior: no fallback means re-raise after logging failure.Suggested Fix
test_failure_logging_no_fallbackto wrapfail_func()withpytest.raises(RuntimeError).How to Reproduce | 如何重现
make test
Environment | 环境信息
make test
Additional Context | 其他信息
No response
Willingness to Implement | 实现意愿