Commit Graph

18 Commits

Author SHA1 Message Date
Alexander Whitestone
3f06e7231d Improve test coverage from 63.6% to 73.4% and fix test infrastructure (#137) 2026-03-06 13:21:05 -05:00
Alexander Whitestone
2b97da9e9c Add pre-commit hook enforcing 30s test suite time limit (#132) 2026-03-05 19:45:38 -05:00
Alexander Whitestone
e8f1dea3ec Remove unused deps from poetry build, speed test suite to ~16s (#130) 2026-03-05 18:07:59 -05:00
Alexander Whitestone
d7d7a5a80a audit: clean Docker architecture, consolidate test fixtures, add containerized test runner (#94) 2026-02-28 16:11:58 -05:00
Alexander Whitestone
ca0c42398b feat: migrate to Poetry, fix Docker build, and resolve 6 UI/backend bugs (#92)
Migrate from Hatchling to Poetry for dependency management, fixing the
Docker build failure caused by .dockerignore excluding README.md that
Hatchling needed for metadata. Poetry export strategy bypasses this
entirely. Creative extras removed from main build (separate service).

Docker changes:
- Multi-stage builds with poetry export → pip install
- BuildKit cache mounts for faster rebuilds
- All 3 Dockerfiles updated (root, dashboard, agent)

Bug fixes from tester audit:
- TaskStatus/TaskPriority case-insensitive enum parsing
- scrollChat() upgraded to requestAnimationFrame, removed duplicate
- Desktop/mobile nav items synced in base.html
- HTMX pointed to direct htmx.min.js URL
- Removed unused highlight.js and bootstrap.bundle.min.js
- Registered missing escalation/external task handlers in app.py

Co-authored-by: Alexander Payne <apayne@MM.local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 13:12:14 -05:00
Alexander Whitestone
7b967d84b2 fix: restore task processor pipeline and eliminate /ws 403 spam (#91)
The microservices refactoring (PR #88) accidentally dropped handler
registration, zombie reconciliation, and startup drain from app.py.
Every task entering the queue was immediately backlogged with
"No handler for task type" because self._handlers stayed empty.

Restores the three critical blocks from app_backup.py:
- Register handlers for chat_response, thought, internal, bug_report,
  task_request
- Reconcile zombie RUNNING tasks from previous crashes
- Drain all pending tasks on startup before entering steady-state loop
- Re-approve tasks that were backlogged due to missing handlers

Also adds a /ws WebSocket catch-all that accepts stale connections and
closes with code 1008 instead of spamming 403 on every retry, and a
`make fresh` target for clean container rebuilds with no cached state.

Co-authored-by: Alexander Payne <apayne@MM.local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 12:18:18 -05:00
Alexander Whitestone
e5190b248a CI/CD Optimization: Guard Rails, Pre-commit Checks, and Test Fixes (#90)
* CI/CD Optimization: Guard Rails, Black Linting, and Pre-commit Hooks

- Fixed all test collection errors (Selenium imports, fixture paths, syntax)
- Implemented pre-commit hooks with Black formatting and isort
- Created comprehensive Makefile with test targets (unit, integration, functional, e2e)
- Added pytest.ini with marker definitions for test categorization
- Established guard rails to prevent future collection errors
- Wrapped optional dependencies (Selenium, MoviePy) in try-except blocks
- Added conftest_markers for automatic test categorization

This ensures a smooth development stream with:
- Fast feedback loops (pre-commit checks before push)
- Consistent code formatting (Black)
- Reliable CI/CD (no collection errors, proper test isolation)
- Clear test organization (unit, integration, functional, E2E)

* Fix CI/CD test failures:
- Export templates from dashboard.app
- Fix model name assertion in test_agent.py
- Fix platform-agnostic path resolution in test_path_resolution.py
- Skip Docker tests in test_docker_deployment.py if docker not available
- Fix test_model_fallback_chain logic in test_ollama_integration.py

* Add preventative pre-commit checks and Docker test skipif decorators:
- Create pre_commit_checks.py script for common CI failures
- Add skipif decorators to Docker tests
- Improve test robustness for CI environments
2026-02-28 11:36:50 -05:00
Alexander Payne
53f8d0912e fix: purge stale bytecache on make dev to prevent old .pyc errors
The Agno Toolkit API fix (1bc2cdc) wasn't taking effect because
Python was loading stale __pycache__/*.pyc files with the old
add_tool() calls. Now `make nuke` clears all bytecache, and
`make dev` sets PYTHONDONTWRITEBYTECODE=1 to prevent .pyc
creation during development.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 17:18:44 -05:00
Claude
2e7f3d1b29 feat: centralize L402 config, automate Metal install, fix watchdog cleanup
- config.py: add L402_HMAC_SECRET, L402_MACAROON_SECRET, LIGHTNING_BACKEND
  to pydantic-settings with startup warnings for default secrets
- l402_proxy.py, mock_backend.py, factory.py: migrate from os.environ.get()
  to `from config import settings` per project convention
- Makefile: `make install-creative` now auto-installs PyTorch nightly with
  Metal (MPS) support on Apple Silicon instead of just printing a note
- activate_self_tdd.sh: add PID file (.watchdog.pid) and EXIT trap so
  Ctrl-C cleanly stops both the dashboard and the watchdog process
- .gitignore: add .watchdog.pid

https://claude.ai/code/session_01A81E5HMxZEPxzv2acNo35u
2026-02-25 18:19:22 +00:00
Claude
c0ca166d43 fix: improve macOS deployment compatibility and Docker build hygiene
- .gitignore: add missing macOS artifacts (.AppleDouble, .Spotlight-V100, etc.)
- Makefile: fix `make ip` to detect network interfaces on both macOS and Linux
  (adds `ip` command fallback, guards macOS-only `ipconfig` behind uname check)
- Makefile: add `make install-creative` target with Apple Silicon Metal guidance
- Dockerfile: install deps from pyproject.toml instead of duplicating the list,
  eliminating drift between Dockerfile and pyproject.toml
- docker-compose.yml: document data/ directory prerequisite for bind-mount volume

https://claude.ai/code/session_01A81E5HMxZEPxzv2acNo35u
2026-02-25 18:08:57 +00:00
Alexander Payne
127011b898 fix: auto-clean port 8000 and containers before make dev
Adds a `nuke` target that kills stale processes on port 8000 and stops
Docker containers. `make dev` now runs `nuke` first, eliminating the
errno 48 (address already in use) error on restart.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 11:01:11 -05:00
Alexander Payne
29292cfb84 feat: single-command Docker startup, fix UI bugs, add Selenium tests
- Add `make up` / `make up DEV=1` for one-command Docker startup with
  optional hot-reload via docker-compose.dev.yml overlay
- Add `timmy up --dev` / `timmy down` CLI commands
- Fix cross-platform font resolution in creative assembler (7 test failures)
- Fix Ollama host URL not passed to Agno model (container connectivity)
- Fix task panel route shadowing by reordering literal routes before
  parameterized routes in swarm.py
- Fix chat input not clearing after send (hx-on::after-request)
- Fix chat scroll overflow (CSS min-height: 0 on flex children)
- Add Selenium UI smoke tests (17 tests, gated behind SELENIUM_UI=1)
- Install fonts-dejavu-core in Dockerfile for container font support
- Remove obsolete docker-compose version key
- Bump CSS cache-bust to v4

833 unit tests pass, 15 Selenium tests pass (2 skipped).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 07:20:56 -05:00
Claude
78cf91697c feat: add functional Ollama chat tests with containerised LLM
Add an ollama service (behind --profile ollama) to the test compose stack
and a new test suite that verifies real LLM inference end-to-end:

- docker-compose.test.yml: add ollama/ollama service with health check,
  make OLLAMA_URL and OLLAMA_MODEL configurable via env vars
- tests/functional/test_ollama_chat.py: session-scoped fixture that
  brings up Ollama + dashboard, pulls qwen2.5:0.5b (~400MB, CPU-only),
  and runs chat/history/multi-turn tests against the live stack
- Makefile: add `make test-ollama` target

Run with: make test-ollama (or FUNCTIONAL_DOCKER=1 pytest tests/functional/test_ollama_chat.py -v)

https://claude.ai/code/session_01NTEzfRHSZQCfkfypxgyHKk
2026-02-25 02:44:36 +00:00
Claude
b7cfb3b097 feat: one-click cloud deployment — Caddy HTTPS, Ollama, systemd, cloud-init
Add complete production deployment stack so Timmy can be deployed to any
cloud provider (DigitalOcean, AWS, Hetzner, etc.) with a single command.

New files:
- docker-compose.prod.yml: production stack (Caddy auto-HTTPS, Ollama LLM,
  Dashboard, Timmy agent, Watchtower auto-updates)
- deploy/Caddyfile: reverse proxy with security headers and WebSocket support
- deploy/setup.sh: interactive one-click setup script for any Ubuntu/Debian server
- deploy/cloud-init.yaml: paste as User Data when creating a cloud VM
- deploy/timmy.service: systemd unit for auto-start on boot
- deploy/digitalocean/create-droplet.sh: create a DO droplet via doctl CLI

Updated:
- Dockerfile: non-root user, healthcheck, missing deps (GitPython, moviepy, redis)
- Makefile: cloud-deploy, cloud-up/down/logs/status/update/scale targets
- .env.example: DOMAIN setting for HTTPS
- .dockerignore: exclude deploy configs from image

https://claude.ai/code/session_018CduUZoEJzFynBwMsxaP8T
2026-02-24 21:22:56 +00:00
Alexander Payne
ca60483268 feat: pytest-cov configuration and test audit cleanup
Add full pytest-cov configuration with fail_under=60% threshold,
HTML/XML report targets, and proper exclude_lines. Fix websocket
history test to use public broadcast() API instead of manually
manipulating internals. Audit confirmed 491 tests at 71.2% coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 20:42:58 -05:00
Alexander Payne
4020b5222f feat: add Docker-based swarm agent containerization
Add infrastructure for running swarm agents as isolated Docker
containers with HTTP-based coordination, startup recovery, and
enhanced dashboard UI for agent management.

- Dockerfile and docker-compose.yml for multi-service orchestration
- DockerAgentRunner for programmatic container lifecycle management
- Internal HTTP API for container agents to poll tasks and submit bids
- Startup recovery system to reconcile orphaned tasks and stale agents
- Enhanced UI partials for agent panels, chat, and task assignment
- Timmy docker entry point with heartbeat and task polling
- New Makefile targets for Docker workflows
- Tests for swarm recovery

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 16:21:32 -05:00
Claude
abaa04fe3a Fix Mac trackpad scrolling; add make ip for phone testing
overflow: hidden creates a WebKit scroll container that absorbs trackpad
events before they reach scrollable children (.chat-log, .mc-sidebar).
Changed .mc-main and .mc-chat-panel > .card to overflow: clip, which
clips visually but does not create a scroll container, so trackpad events
propagate correctly to the nearest scrollable descendant.

Added min-height: 0 to .mc-sidebar so the flex item can shrink below its
content size and overflow-y: auto actually triggers scrolling.

Added `make ip` target that prints local network URLs the phone can
reach. The server already runs on 0.0.0.0 with --reload, so Python and
template changes auto-reload; CSS/static changes need a manual refresh.

https://claude.ai/code/session_01WFuf8fzKSWjH8ztF6E9jbj
2026-02-22 15:19:51 +00:00
Claude
3a3b03e1e8 docs: development standards, Makefile, GitHub Pages landing page
- Remove stale STATUS.md and DEVELOPMENT_REPORT.md (content superseded)
- Rewrite README.md to reflect v2 state (228 tests, swarm, L402, voice,
  WebSocket, mobile; Makefile commands; updated architecture diagram)
- Add AGENTS.md — per-agent development standards for Claude, Kimi, and
  Manus; coding conventions, architecture patterns, roadmap, file layout
- Add Makefile — install, dev, test, test-cov, watch, lint, clean targets
- Add docs/index.html — GitHub Pages landing page (dark mission-control
  theme, scanline overlay, feature grid, architecture diagram, quickstart
  steps, agent team cards, roadmap, stats bar)

https://claude.ai/code/session_0181LU8dCresHiLzYxjK4vUC
2026-02-22 00:22:04 +00:00