refactor: move host_db_path/HOST_DB_FILENAME to db_store (#352)

host_db_path is shared DB infrastructure, not supervise-specific, so its
canonical home is db_store (alongside DbStore). It resolves bot_bottle_root
from supervise_types lazily inside the function — no load-time cycle, and a
monkey-patch of supervise_types.bot_bottle_root still propagates.
supervise_types re-exports both names for the historical import path
(queue_store/audit_store unchanged); the orchestrator registry now imports
from db_store. Drops the now-unused `import sys` from supervise_types.

Behavior-preserving: full unit suite unchanged (only the pre-existing
/bin/sleep sidecar-init errors remain); monkeypatch propagation verified.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WBMWTEtQdJ4W5UrWuLHCck
This commit is contained in:
2026-07-13 13:36:19 -04:00
parent bd964c0278
commit 934c1617b9
3 changed files with 38 additions and 22 deletions
+1 -2
View File
@@ -35,9 +35,8 @@ import time
from dataclasses import dataclass
from pathlib import Path
from ..db_store import DbStore
from ..db_store import DbStore, host_db_path
from ..migrations import TableMigrations
from ..supervise_types import host_db_path
# 256 bits of urandom, URL-safe — unguessable per-bottle identity token.
IDENTITY_TOKEN_BYTES = 32