honcho/tests
Eugene Eisenstein 786c74f32f fix(mock-provider): strict request booleans, bounded recursion, multipleOf
Second CodeRabbit pass. All four findings reproduced first; none is reachable
from a Honcho response model, but two trace back to the previous commit.

- `include_usage` and `stream` were plain `bool`, which Pydantic coerces from
  "yes"/"on"/"true"/"1". The comment added last commit claimed a string had to
  fail here, and it did not — the test only passed because "definitely" is not
  a recognised bool literal. Both are StrictBool now, matching why `dimensions`
  is StrictInt, and the tests cover the truthy strings that actually coerced.
- `_generate_array` returned the prefix alone when `items` was absent, so
  prefixItems plus a larger minItems undershot its own schema. Absent `items`
  leaves those positions unconstrained rather than disallowed, so the shortfall
  is filled to minItems — a bare `{"type": "array"}` still generates nothing.
- A required, non-nullable recursive $ref hit RecursionError: MAX_DEPTH only
  terminates a cycle that offers a `default` or a nullable branch, and
  `_generate_object` keeps descending into required properties. HARD_MAX_DEPTH
  degrades to an empty container instead, since a mock must not turn its own
  defect into a 500. Bounded, not plumbed into an error response — the
  unreachable path does not justify touching the request path.
- `_bounded_int` ignored `multipleOf` while honouring minimum, maximum and both
  exclusive bounds; 9 of 12 sampled paths produced a non-multiple. Values now
  snap onto a multiple inside the bounds, and an unsatisfiable window keeps the
  bounds. A fractional `multipleOf` is still ignored, as documented.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-03 13:01:53 -04:00
..
alembic feat: make session_name nullable for documents and update related SDKs (#347) 2026-01-26 13:33:11 -05:00
bench telemetry: zero-initialize bounded-label metrics so an absent series means a broken scrape (#927) 2026-08-20 10:24:49 -04:00
crud feat(api): Export deriver backlog as metrics from API endpoint (#1115) 2026-09-02 13:42:48 -04:00
deriver fix(deriver): fix create_documents deadlock (#1033) 2026-09-02 11:07:50 -04:00
dialectic Scopes Phase 2b: `scope` option on chat, representation, context, and search (#897) 2026-08-12 18:34:55 -04:00
dreamer feat(api): Export deriver backlog as metrics from API endpoint (#1115) 2026-09-02 13:42:48 -04:00
integration feat: defer embedding messages (#704) 2026-06-11 10:31:04 -04:00
live_llm fix(openai): fix content normalization in openai backend history adapter (#1064) 2026-08-26 12:14:32 -04:00
llm fix(openai): fix content normalization in openai backend history adapter (#1064) 2026-08-26 12:14:32 -04:00
mock_provider fix(mock-provider): strict request booleans, bounded recursion, multipleOf 2026-09-03 13:01:53 -04:00
reconciler telemetry: zero-initialize bounded-label metrics so an absent series means a broken scrape (#927) 2026-08-20 10:24:49 -04:00
routes feat: Add workspace-level chat (#931) 2026-08-24 15:54:23 -04:00
scripts feat: add new cloudevents for api routes (#637) 2026-05-20 18:25:30 -04:00
sdk feat(sdk): add per-call peer chat timeout (#1098) 2026-09-02 17:31:46 -04:00
sdk_typescript add read db (#773) 2026-06-10 13:28:36 -04:00
startup add read db (#773) 2026-06-10 13:28:36 -04:00
telemetry feat(api): Export deriver backlog as metrics from API endpoint (#1115) 2026-09-02 13:42:48 -04:00
unified feat: Add workspace-level chat (#931) 2026-08-24 15:54:23 -04:00
utils fix(deriver): fix create_documents deadlock (#1033) 2026-09-02 11:07:50 -04:00
vector_store fix: stop top_k=0 from reaching Turbopuffer on message search (#1084) 2026-08-26 17:07:41 -04:00
webhooks Tighten Transaction Scopes (#525) 2026-04-08 11:14:50 -04:00
__init__.py Refactor clients.py to add modern features and more flexible configuration (#459) 2026-04-20 02:46:37 -04:00
conftest.py feat(mock-provider): deterministic OpenAI-compatible endpoint for local and CI use 2026-09-03 11:17:44 -04:00
test_advanced_filters.py fix(filter): make ne on jsonb metadata keys null-safe (#1036) 2026-08-24 09:33:08 -04:00
test_cache_key_namespace.py perf(cache): hash-tag the cache namespace so an instance uses one shard (#1058) 2026-08-25 12:34:42 -04:00
test_cache_redaction.py Scopes Phase 2a: scope-kind peers, guardrails, and scopes CRUD routes (#884) 2026-08-12 16:21:40 -04:00
test_config.py fix(llm): support per-request provider timeouts (#832) 2026-08-04 12:43:00 -04:00
test_datetime_parsing.py Make embeddings configurable (#678) 2026-05-14 15:03:35 -04:00
test_db_resilience.py fix(deriver): increase deriver polling backoff (#1015) 2026-08-14 16:38:20 -04:00
test_dependencies.py add read db (#773) 2026-06-10 13:28:36 -04:00
test_deriver_metrics.py feat(api): Export deriver backlog as metrics from API endpoint (#1115) 2026-09-02 13:42:48 -04:00
test_dialectic_prompts.py fix(dialectic): revamp workspace and pair chat system prompts (#1066) 2026-08-25 12:30:06 -04:00
test_generate_jwt_script.py feat: add generate_jwt.py script for creating scoped JWTs (#757) 2026-06-09 13:49:55 -04:00
test_models_vector_dim.py feat: add new cloudevents for api routes (#637) 2026-05-20 18:25:30 -04:00
test_schema_validations.py fix(deriver): strip NUL bytes from model-generated observations (#1095) 2026-08-31 13:32:43 -04:00
test_search.py fix(crud): preserve joined_at for active session peers (#1059) 2026-08-25 10:51:59 -04:00
test_security.py feat: Add workspace-level chat (#931) 2026-08-24 15:54:23 -04:00
test_session_allowlist.py fix(filter): make the filter DSL reject bad input instead of 500ing, and fix negation over unset fields (#947) 2026-08-13 10:39:19 -04:00
test_workspace_chat.py fix(dialectic): make workspace chat search before it answers (#1120) 2026-09-02 17:27:01 -04:00