refactor(supervise): fold Supervise into the facade as Supervisor; drop dead flat-fallbacks
tracker-policy-pr / check-pr (pull_request) Successful in 8s
test / integration-docker (pull_request) Successful in 12s
test / unit (pull_request) Successful in 43s
lint / lint (push) Failing after 59s
test / integration-firecracker (pull_request) Successful in 3m16s
test / coverage (pull_request) Successful in 16s
test / publish-infra (pull_request) Has been skipped
tracker-policy-pr / check-pr (pull_request) Successful in 8s
test / integration-docker (pull_request) Successful in 12s
test / unit (pull_request) Successful in 43s
lint / lint (push) Failing after 59s
test / integration-firecracker (pull_request) Successful in 3m16s
test / coverage (pull_request) Successful in 16s
test / publish-infra (pull_request) Has been skipped
Move the `Supervise` lifecycle out of its own `orchestrator/supervisor/ supervise.py` and into the package `__init__`, renaming the class to `Supervisor`. Callers now import it from `bot_bottle.orchestrator.supervisor` alongside the queue surface it belongs with. Remove the dead `try/except ImportError` flat-import fallbacks from the package-only store modules (db_store, audit_store, config_store, queue_store) and image_cache. Those fallbacks existed for when the store files were flat-copied into the gateway; post-PRD-0070 the data plane never opens the DB, so these modules are only ever imported as part of the package. The two gateway data-plane files that may still be loaded flat (egress_addon_core, git_gate_render) keep their fallbacks. Full unit suite green (2251). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,6 @@ tier's private code, importable by `bot_bottle.gateway` **and**
|
||||
status / poll-status constants, and the shared daemon constants.
|
||||
* `plan` — `SupervisePlan`, the launch-time staging DTO.
|
||||
|
||||
The orchestrator-only half (queue I/O, diff rendering, the `Supervise`
|
||||
The orchestrator-only half (queue I/O, diff rendering, the `Supervisor`
|
||||
lifecycle) lives under `bot_bottle.orchestrator.supervisor`.
|
||||
"""
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""`SupervisePlan` — the launch-time supervise staging DTO.
|
||||
|
||||
A pure value type (no store access), so it lives in the neutral package: the
|
||||
backend builds it at launch and the orchestrator's `Supervise.prepare` returns
|
||||
backend builds it at launch and the orchestrator's `Supervisor.prepare` returns
|
||||
it. The behaviour that fills it in — staging the host database — is the
|
||||
orchestrator's, in `bot_bottle.orchestrator.supervisor.supervise`.
|
||||
orchestrator's, in `bot_bottle.orchestrator.supervisor.Supervisor`.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -14,7 +14,7 @@ from pathlib import Path
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class SupervisePlan:
|
||||
"""Output of `Supervise.prepare`; consumed by `.start`.
|
||||
"""Output of `Supervisor.prepare`; consumed by `.start`.
|
||||
|
||||
`db_path` is the host database bind-mounted into the gateway at
|
||||
/run/supervise/bot-bottle.db. `internal_network` is empty at prepare time;
|
||||
|
||||
Reference in New Issue
Block a user