Environment
CONTEXTHUB_INTEGRATION=1 pytest \
tests/test_integration_propagation.py \
tests/test_integration_collaboration.py \
tests/test_integration_visibility.py \
tests/test_datalake.py \
-v
Observed behavior
Out of 39 tests, 38 pass and 1 fails: tests/test_datalake.py::test_sql_context_filters_catalog_and_preserves_rank.
Relevant failure trace:
E AttributeError: 'Depends' object has no attribute 'check_read_access'
This happens inside search_sql_context in src/contexthub/api/routers/datalake.py when calling:
decision = await acl.check_read_access(db, uri, ctx)
From the test, search_sql_context is invoked directly with:
resp = await search_sql_context(
SqlContextRequest(query="orders by user", catalog="mock", top_k=2),
ctx=query_agent_ctx,
db=acme_session,
retrieval=_StubRetrieval(),
)
Since the test does not provide acl and masking, the default FastAPI Depends(...) objects are used instead of real ACLService / MaskingService instances, leading to the AttributeError.
Expected behavior
Given the 7b description in the setup guide, running the database integration tests with CONTEXTHUB_INTEGRATION=1 should result in all tests passing. [github](https://github.com/The-AI-Framework-and-Data-Tech-Lab-HK/ContextHub/blob/main/docs/setup/local-setup&end2end-verification-guide-zh.md)
Steps to reproduce
-
Follow docs/setup/local-setup&end2end-verification-guide-zh.md to: [github](https://github.com/The-AI-Framework-and-Data-Tech-Lab-HK/ContextHub/blob/main/docs/setup/local-setup&end2end-verification-guide-zh.md)
- Install PostgreSQL + pgvector
- Create
contexthub database and user
- Set up Python venv and install dependencies (
pip install -e ".[dev]", pip install greenlet, etc.)
- Run migrations (
alembic upgrade head)
- Ensure PostgreSQL is running and health checks pass
-
From repo root, in the activated venv, run: [github](https://github.com/The-AI-Framework-and-Data-Tech-Lab-HK/ContextHub/blob/main/docs/setup/local-setup&end2end-verification-guide-zh.md)
CONTEXTHUB_INTEGRATION=1 pytest \
tests/test_integration_propagation.py \
tests/test_integration_collaboration.py \
tests/test_integration_visibility.py \
tests/test_datalake.py \
-v
-
Observe that only tests/test_datalake.py::test_sql_context_filters_catalog_and_preserves_rank fails with AttributeError: 'Depends' object has no attribute 'check_read_access'.
Environment
The-AI-Framework-and-Data-Tech-Lab-HK/ContextHub(main) [github](https://github.com/The-AI-Framework-and-Data-Tech-Lab-HK/ContextHub/blob/main/docs/setup/local-setup&end2end-verification-guide-zh.md)Observed behavior
Out of 39 tests, 38 pass and 1 fails:
tests/test_datalake.py::test_sql_context_filters_catalog_and_preserves_rank.Relevant failure trace:
This happens inside
search_sql_contextinsrc/contexthub/api/routers/datalake.pywhen calling:From the test,
search_sql_contextis invoked directly with:Since the test does not provide
aclandmasking, the default FastAPIDepends(...)objects are used instead of realACLService/MaskingServiceinstances, leading to theAttributeError.Expected behavior
Given the 7b description in the setup guide, running the database integration tests with
CONTEXTHUB_INTEGRATION=1should result in all tests passing. [github](https://github.com/The-AI-Framework-and-Data-Tech-Lab-HK/ContextHub/blob/main/docs/setup/local-setup&end2end-verification-guide-zh.md)Steps to reproduce
Follow
docs/setup/local-setup&end2end-verification-guide-zh.mdto: [github](https://github.com/The-AI-Framework-and-Data-Tech-Lab-HK/ContextHub/blob/main/docs/setup/local-setup&end2end-verification-guide-zh.md)contexthubdatabase and userpip install -e ".[dev]",pip install greenlet, etc.)alembic upgrade head)From repo root, in the activated venv, run: [github](https://github.com/The-AI-Framework-and-Data-Tech-Lab-HK/ContextHub/blob/main/docs/setup/local-setup&end2end-verification-guide-zh.md)
Observe that only
tests/test_datalake.py::test_sql_context_filters_catalog_and_preserves_rankfails withAttributeError: 'Depends' object has no attribute 'check_read_access'.