fix(honcho): thread registry rides agent.memory_provider.spawn_context_thread

main folded the plugin's contextvars-inheriting thread wrapper into
agent.memory_provider.spawn_context_thread. The registry this stack adds for
join_plugin_threads keeps a thin client.spawn_context_thread that calls the core
spawner and records the thread under its owner; the four spawn sites import it
from client. main's inherit-profile test builds a real provider now that
_spawn_write is an instance method (the owner is what gets joined).
This commit is contained in:
kshitijk4poor
2026-09-13 18:57:27 +05:30
committed by kshitij
parent f1273ed704
commit d14734df1f
5 changed files with 5 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ from agent.coding_context import INTERACTIVE_CODING_PLATFORMS as _LOCAL_PLATFORM
from agent.turn_author import a2a_key
from plugins.memory.honcho.client import HonchoClientConfig, resolve_config_path
from plugins.memory.honcho.client import _host_block, _HostLookup
from plugins.memory.honcho.client import join_plugin_threads
from plugins.memory.honcho.client import join_plugin_threads, spawn_context_thread
from plugins.memory.honcho.dialectic import DialecticMixin
from plugins.memory.honcho.session_peers import assistant_peer_id_for, sanitize_peer_id
from plugins.memory.honcho.session_context import usable_honcho_summary

View File

@@ -7,7 +7,7 @@ import re
import threading
import time
from agent.memory_provider import spawn_context_thread
from plugins.memory.honcho.client import spawn_context_thread
logger = logging.getLogger("plugins.memory.honcho")

View File

@@ -7,7 +7,7 @@ import math
import threading
import time
from agent.memory_provider import spawn_context_thread
from plugins.memory.honcho.client import spawn_context_thread
logger = logging.getLogger("plugins.memory.honcho")

View File

@@ -10,7 +10,7 @@ from dataclasses import dataclass, field
from datetime import datetime
from typing import Any, TYPE_CHECKING
from agent.memory_provider import spawn_context_thread
from plugins.memory.honcho.client import spawn_context_thread
from plugins.memory.honcho.client import get_honcho_client
from plugins.memory.honcho.session_auth import HonchoAuthError, SessionAuthMixin
from plugins.memory.honcho.session_context import SessionContextMixin

View File

@@ -85,7 +85,7 @@ def _hindsight(seen, tmp_path):
def _honcho(seen, tmp_path):
from plugins.memory.honcho import HonchoMemoryProvider
return [HonchoMemoryProvider._spawn_write(_probe_home(seen), "honcho-test", "failed %s")]
return [HonchoMemoryProvider()._spawn_write(_probe_home(seen), "honcho-test", "failed %s")]
_PROVIDERS = {