honcho/tests/routes
Vineeth Voruganti 3359a3771b fix(scopes): skip semantic retrieval when the embedding precompute failed
Addresses three open review comments.

1. Major — the representation read could embed inside its DB session. The
   route's precompute is suppressed, and both
   `RepresentationManager.get_working_representation` and
   `crud.query_documents` fall back to embedding when a query arrives without
   one, so a failed precompute meant an external call inside the read session
   this branch opens for the scope re-check — the connection-holding rule the
   route's own comment claimed to satisfy. The innermost fallback also only
   catches ValueError, so a provider outage surfaced as a 500. The semantic
   query is now passed only when an embedding exists, degrading to
   derived+recent retrieval. (`crud.query_documents` embedding inside a caller's
   session predates this branch and is left alone.)

2. Minor — `test_resolved_scope_peer_rejected_at_membership_upsert` described a
   race it does not perform. It creates an already-flagged scope and calls crud
   directly; the unflagged → flagged transition is not simulated. Docstring now
   says what the test actually pins.

3. Minor — `test_empty_replacement_preserves_scope_membership` asserted only
   half its docstring. It passed if the empty PUT left every ordinary
   membership intact; now asserts the ordinary peer's left_at is set.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 22:59:53 -04:00
..
__init__.py [0.0.10] Release 2024-07-25 13:45:27 -04:00
test_auth_route_policy.py Fix scoped JWTs (#679) 2026-06-22 17:30:00 -04:00
test_conclusions.py Abigail/conclusions level filter (#851) 2026-07-01 10:48:01 -04:00
test_files.py fix(files): handle empty json uploads safely (#434) 2026-03-18 18:36:34 -04:00
test_keys.py feat: honcho 3.0, sdks 2.0, excise stainless, update v3 docs, changelogs (#331) 2026-01-22 15:16:28 -05:00
test_messages.py feat(llm backend): enable combined tool calling + structured output in the LLM backend transport layer (#907) 2026-07-15 11:47:49 -04:00
test_peers.py feat(dialectic): optional structured outputs with limited schema for Dialectic calls (#896) 2026-07-20 18:46:49 -04:00
test_queue_status.py Refactor clients.py to add modern features and more flexible configuration (#459) 2026-04-20 02:46:37 -04:00
test_scope_route_policy.py fix(scopes): refuse future scopes in observed positions, preserve scope membership 2026-07-29 16:07:52 -04:00
test_scoped_api.py Fix scoped JWTs (#679) 2026-06-22 17:30:00 -04:00
test_scopes.py fix(scopes): skip semantic retrieval when the embedding precompute failed 2026-07-29 22:59:53 -04:00
test_sessions.py feat(api): restore reverse pagination (#685) 2026-05-21 13:40:47 -04:00
test_validation_api.py Align API contract with DB contract for IDs (#684) 2026-05-14 16:37:39 -04:00
test_webhooks.py feat: honcho 3.0, sdks 2.0, excise stainless, update v3 docs, changelogs (#331) 2026-01-22 15:16:28 -05:00
test_workspaces.py Session-purity invariant + card_refresh dream type (DEV-2000) (#883) 2026-07-23 14:22:07 -04:00