Add pre-commit hook enforcing 30s test suite time limit (#132)

This commit is contained in:
Alexander Whitestone
2026-03-05 19:45:38 -05:00
committed by GitHub
parent aff3edb06a
commit 2b97da9e9c
65 changed files with 356 additions and 611 deletions

View File

@@ -14,7 +14,6 @@ from brain.client import BrainClient
from brain.worker import DistributedWorker
from brain.embeddings import LocalEmbedder
from brain.memory import UnifiedMemory, get_memory
from brain.identity import get_canonical_identity, get_identity_for_prompt
__all__ = [
"BrainClient",
@@ -22,6 +21,4 @@ __all__ = [
"LocalEmbedder",
"UnifiedMemory",
"get_memory",
"get_canonical_identity",
"get_identity_for_prompt",
]

View File

@@ -36,7 +36,7 @@ class BrainClient:
"""Detect what component is using the brain."""
# Could be 'timmy', 'zeroclaw', 'worker', etc.
# For now, infer from context or env
return os.environ.get("BRAIN_SOURCE", "timmy")
return os.environ.get("BRAIN_SOURCE", "default")
# ──────────────────────────────────────────────────────────────────────────
# Memory Operations

View File

@@ -1,35 +0,0 @@
"""Identity loader — stripped.
The persona/identity system has been removed. These functions remain
as no-op stubs so that call-sites don't break at import time.
"""
from __future__ import annotations
import logging
from typing import Optional
logger = logging.getLogger(__name__)
def get_canonical_identity(force_refresh: bool = False) -> str:
"""Return empty string — identity system removed."""
return ""
def get_identity_section(section_name: str) -> str:
"""Return empty string — identity system removed."""
return ""
def get_identity_for_prompt(include_sections: Optional[list[str]] = None) -> str:
"""Return empty string — identity system removed."""
return ""
def get_agent_roster() -> list[dict[str, str]]:
"""Return empty list — identity system removed."""
return []
_FALLBACK_IDENTITY = ""

View File

@@ -65,7 +65,7 @@ class UnifiedMemory:
def __init__(
self,
db_path: Optional[Path] = None,
source: str = "timmy",
source: str = "default",
use_rqlite: Optional[bool] = None,
):
self.db_path = db_path or _get_db_path()