hermes-agent/tests/plugins/memory
爪爪 5ea3abc3b3 fix(openviking): match tenant-header errors structurally instead of hard-coding strings
The _needs_trusted_identity_retry method was hard-coding specific
server-side error strings to detect when a request failed due to
missing X-OpenViking-Account / X-OpenViking-User headers.  Each new
server-side error variant required another string added to the client.

Replace the string enumeration with a structural match: the error
message mentions one of the tenant headers AND the HTTP status is 400.
This covers all current error variants:

  - "Trusted mode requests must include X-OpenViking-Account and User"
  - "ROOT requests to tenant-scoped APIs must include X-OpenViking-Account"
  - "Trusted mode requests must include X-OpenViking-Account."
  - "Trusted mode requests must include X-OpenViking-User."

The 400 status guard avoids false-positives on 403 errors such as
"USER API keys cannot override X-OpenViking-User", which must not
trigger a retry.

All 176 existing tests pass.

(cherry picked from commit 5a24d6766c)
2026-07-24 13:00:53 +05:30
..
__init__.py fix: mem0 API v2 compat, prefetch context fencing, secret redaction (#5423) 2026-04-05 22:43:33 -07:00
test_byterover_provider.py fix(byterover): honor auto extract config 2026-06-27 04:04:15 -07:00
test_config_schema.py revert(memory): drop the provider actions extension point 2026-07-10 15:41:52 -04:00
test_hindsight_config_schema.py refactor(memory): move provider config schemas into their plugins 2026-07-02 16:55:39 -04:00
test_hindsight_provider.py fix(hindsight): lazy-install cloud client dependency 2026-06-19 07:36:28 -07:00
test_holographic_auto_extract.py fix(memory): preserve genuine pre-delimiter content in merged compaction rows 2026-07-22 06:59:14 -07:00
test_holographic_retrieval.py fix(memory/holographic): sanitize FTS5 queries for natural-language recall 2026-06-30 15:55:11 -07:00
test_holographic_shutdown_closes_db.py fix(memory/holographic): close DB connection on shutdown instead of leaking to GC (#54133) 2026-06-28 02:41:52 -07:00
test_holographic_store.py fix(memory): resolve() the shared-connection registry key; symlink test 2026-07-09 18:17:40 -07:00
test_honcho_config_schema.py refactor(memory): move provider config schemas into their plugins 2026-07-02 16:55:39 -04:00
test_mem0_backend.py fix(mem0): migrate legacy OSS base URL aliases 2026-07-17 13:49:29 -07:00
test_mem0_providers.py feat(mem0): v3 API, OSS mode, update/delete tools, telemetry & review fixes (#15624) 2026-06-22 12:30:47 +00:00
test_mem0_setup.py fix(mem0): migrate legacy OSS base URL aliases 2026-07-17 13:49:29 -07:00
test_mem0_v3.py fix(mem0): prune dead get_all, wire rerank config default, warn on MEM0_HOST env override 2026-07-08 01:57:11 +05:30
test_memory_lazy_install.py fix(memory): lazy-install supermemory + mem0 SDKs like honcho/hindsight 2026-06-29 00:25:36 -07:00
test_openviking_provider.py fix(openviking): match tenant-header errors structurally instead of hard-coding strings 2026-07-24 13:00:53 +05:30
test_openviking_shutdown.py fix(openviking): join runtime-autostart thread on shutdown (SIGABRT-at-exit) 2026-07-24 13:00:53 +05:30
test_retaindb_provider.py fix(memory): guard local uploads against credential reads 2026-07-05 03:14:49 -07:00
test_supermemory_provider.py fix(supermemory): complete self-hosted endpoint routing 2026-07-20 00:40:40 -07:00