feat: add guarded State Hub inbox read projection pilot
Assistant: codex Assistant-Model: gpt-6-astra Assistant-Session: 01a06ed7-828d-7ca0-a8d4-0c3e5a0c4102
This commit is contained in:
parent
9724b273a1
commit
6fb5ce285c
6 changed files with 343 additions and 0 deletions
|
|
@ -36,8 +36,12 @@ class RuntimeSettings:
|
|||
v2_write_groups: frozenset[str] = frozenset()
|
||||
legacy_write_groups: frozenset[str] = frozenset()
|
||||
legacy_health: bool = False
|
||||
statehub_inbox_reads: bool = False
|
||||
statehub_inbox_agent: str = "state-hub"
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
if self.statehub_inbox_reads and (self.backend != "postgresql" or not self.api_token):
|
||||
raise ValueError("State Hub inbox reads require PostgreSQL and operator token")
|
||||
if self.repo_manager_timeout_seconds <= 0:
|
||||
raise ValueError("Repo Manager timeout must be positive")
|
||||
if self.repo_projection_refresh_seconds < 0:
|
||||
|
|
@ -81,6 +85,8 @@ class RuntimeSettings:
|
|||
v2_write_groups=_env_set("HUB_CORE_V2_WRITE_GROUPS"),
|
||||
legacy_write_groups=_env_set("CORE_HUB_V2_WRITE_GROUPS"),
|
||||
legacy_health=_env_bool("HUB_CORE_LEGACY_HEALTH", False),
|
||||
statehub_inbox_reads=_env_bool("HUB_CORE_STATEHUB_INBOX_READS", False),
|
||||
statehub_inbox_agent=os.getenv("HUB_CORE_STATEHUB_INBOX_AGENT", "state-hub"),
|
||||
)
|
||||
|
||||
def readiness_checks(self, store_backend: str) -> dict[str, str]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue