perf(hub): cache the names directory, share state builds, retry stations

Concurrent /api/state polls share one build through LiveState for a short TTL, and every POST and PATCH invalidates it, so a write is never followed by a stale view. The names directory is cached, the first transcript scan reads outside the hub lock, the graph timeline starts at the window begin, and unresolved radio stations are retried on a daemon thread every RETRY_SECONDS instead of failing until restart.

🎯 Fix: 85 %
💥 Break: 8 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 78
🚦 Gate: ⛔ fix 85 % < 90, break 8 % > 5

Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 5.5 committed 2026-11-18 19:54:23 +00:00
1 parent 6c63c364bd
commit 96d4d2933c
18 files changed
+299 -32

No files matched your search

+1 -2
View File
@@ -7,7 +7,6 @@ import time
from .council import read_claims
from .errors import Conflict, Missing, ToolError
from .fields import COMMAND_LIMIT, PATH_LIMIT, bounded, decode, expect, visible
from .names import Directory
from .signed import ask_signed, passkey, review_signed, signing, verifier
RULE_KINDS = ("ask", "review", "decision")
@@ -155,7 +154,7 @@ class Rules:
"""
if kind_name != "decision":
return set()
directory = Directory(self.names.listed())
directory = self.names.directory()
holders = {session for session in directory.aliases(record["agent"]) if directory.now(session) == record["agent"]}
return holders if len(holders) == 1 else set()