test: align CI assertions with documented contracts
Two unrelated CI failures on this branch, one fix each: - tests/integration/test_deck_vector_search.py: pass str(card.id) to get_chunk_with_context. The function's contract is doc_id: str (keyword-indexed in Qdrant), and real callers (viz_routes.py URL path, server/semantic.py via str(result.id)) all stringify. The test was the only int caller, hitting the .isdigit() guard added earlier on this branch. - tests/server/login_flow/test_login_flow_integration.py: test_check_status_provisioned now accepts scopes=None as valid. Per ProvisionStatusResponse in models/auth.py, None is the documented sentinel for "all scopes granted" — and the web provisioning path (provision_routes.py, used by Astrolabe's "Enable Semantic Search" flow exercised by the new regression test added on this branch) stores exactly that. The previous is-not-None assertion hid behind test order until that flow ran. - Replace anyio.sleep(0) with anyio.lowlevel.checkpoint() Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
64f0842977
commit
0c14501a2b
@@ -207,10 +207,13 @@ async def test_deck_card_chunk_context(nc_client):
|
||||
|
||||
# Fetch chunk context (simulates viz UI request)
|
||||
# The chunk spans the title, so start=0 and end=len(card_title)
|
||||
# doc_id is str — keyword-indexed in Qdrant payload; the real
|
||||
# callers (viz_routes.py from URL path; server/semantic.py from
|
||||
# str(result.id)) all stringify before reaching this entry point.
|
||||
context = await get_chunk_with_context(
|
||||
nc_client=nc_client,
|
||||
user_id=nc_client.username,
|
||||
doc_id=card.id,
|
||||
doc_id=str(card.id),
|
||||
doc_type="deck_card",
|
||||
chunk_start=0,
|
||||
chunk_end=len(card_title),
|
||||
|
||||
Reference in New Issue
Block a user