Files
Momento/.agents/skills/suno-agent-band-manager/scripts/tests/test-check-memory-health.py
Antigravity bd495be965
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 12s
feat: design system overhaul — sidebar, AI chats, settings, brainstorm, color cleanup
- Sidebar: dynamic brand-accent colors, brainstorm section restyled
- AI chat general: popup panel with expand/collapse, hides when contextual AI open
- AI chat contextual: tabs reordered (Actions first), X close button, height fix
- Settings: all tabs restyled, 6 new color presets (sage, terracotta, iron, etc.)
- Global color cleanup: emerald/orange hardcoded → brand-accent dynamic
- Brainstorm page: orange → brand-accent throughout
- PageEntry animation component added to key pages
- Floating AI button: bg-brand-accent instead of hardcoded black
- i18n: all 15 locales updated with new AI/billing keys
- Billing: freemium quota tracking, BYOK, stripe subscription scaffolding
- Admin: integrated into new design
- AGENTS.md + CLAUDE.md project rules added
2026-05-16 12:59:30 +00:00

50 lines
1.4 KiB
Python

#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = ["pytest>=7.0"]
# ///
"""Tests for check-memory-health.py"""
import sys
from pathlib import Path
import pytest
sys.path.insert(0, str(Path(__file__).parent.parent))
from importlib.util import spec_from_file_location, module_from_spec
spec = spec_from_file_location(
"check_memory_health",
Path(__file__).parent.parent / "check-memory-health.py",
)
mod = module_from_spec(spec)
spec.loader.exec_module(mod)
def test_healthy_files(tmp_path):
"""All files under threshold."""
(tmp_path / "index.md").write_text("x" * 100)
(tmp_path / "patterns.md").write_text("x" * 100)
(tmp_path / "chronology.md").write_text("x" * 100)
result = mod.check_health(tmp_path)
assert result["maintenance_recommended"] is False
assert result["needs_pruning"] == []
def test_over_threshold(tmp_path):
"""File over threshold flagged."""
(tmp_path / "index.md").write_text("x" * 5000)
(tmp_path / "patterns.md").write_text("x" * 100)
(tmp_path / "chronology.md").write_text("x" * 100)
result = mod.check_health(tmp_path)
assert result["maintenance_recommended"] is True
assert "index.md" in result["needs_pruning"]
def test_missing_files(tmp_path):
"""Missing files reported correctly."""
result = mod.check_health(tmp_path)
assert result["files"]["index.md"]["exists"] is False