Commit Graph

12 Commits

Author SHA1 Message Date
3c10da489b fix: enhance tox dev environment (port, banner, reload) (#386)
All checks were successful
Tests / lint (push) Successful in 3s
Tests / test (push) Successful in 1m9s
Co-authored-by: Kimi Agent <kimi@timmy.local>
Co-committed-by: Kimi Agent <kimi@timmy.local>
2026-03-19 01:08:49 -04:00
2fcaea4d3a fix: exclude slow tests from all tox envs (ci, pre-push, coverage)
Some checks failed
Tests / lint (pull_request) Failing after 6s
Tests / test (pull_request) Has been skipped
2026-03-14 21:14:36 -04:00
Trip T
c7f92f6d7b docs: add error handling patterns and module dependencies to CLAUDE.md
All checks were successful
Tests / lint (push) Successful in 3s
Tests / test (push) Successful in 30s
- Document 3 graceful degradation patterns with code examples
- Add Service Fallback Matrix for optional services
- Add module dependency tree with change impact guide

chore: fix typecheck environment

- Add mypy to dev dependencies in pyproject.toml
- Fix tox.ini typecheck environment to install mypy explicitly
2026-03-11 22:21:07 -04:00
Trip T
f6a6c0f62e feat: upgrade to qwen3.5, self-hosted Gitea CI, optimize Docker image
All checks were successful
Tests / lint (pull_request) Successful in 2s
Tests / test (pull_request) Successful in 32s
Model upgrade:
- qwen2.5:14b → qwen3.5:latest across config, tools, and docs
- Added qwen3.5 to multimodal model registry

Self-hosted Gitea CI:
- .gitea/workflows/tests.yml: lint + test jobs via act_runner
- Unified Dockerfile: pre-baked deps from poetry.lock for fast CI
- sitepackages=true in tox for ~2s dep resolution (was ~40s)
- OLLAMA_URL set to dead port in CI to prevent real LLM calls

Test isolation fixes:
- Smoke test fixture mocks create_timmy (was hitting real Ollama)
- WebSocket sends initial_state before joining broadcast pool (race fix)
- Tests use settings.ollama_model/url instead of hardcoded values
- skip_ci marker for Ollama-dependent tests, excluded in CI tox envs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:36:42 -04:00
Alexander Whitestone
9d78eb31d1 ruff (#169)
* polish: streamline nav, extract inline styles, improve tablet UX

- Restructure desktop nav from 8+ flat links + overflow dropdown into
  5 grouped dropdowns (Core, Agents, Intel, System, More) matching
  the mobile menu structure to reduce decision fatigue
- Extract all inline styles from mission_control.html and base.html
  notification elements into mission-control.css with semantic classes
- Replace JS-built innerHTML with secure DOM construction in
  notification loader and chat history
- Add CONNECTING state to connection indicator (amber) instead of
  showing OFFLINE before WebSocket connects
- Add tablet breakpoint (1024px) with larger touch targets for
  Apple Pencil / stylus use and safe-area padding for iPad toolbar
- Add active-link highlighting in desktop dropdown menus
- Rename "Mission Control" page title to "System Overview" to
  disambiguate from the chat home page
- Add "Home — Timmy Time" page title to index.html

https://claude.ai/code/session_015uPUoKyYa8M2UAcyk5Gt6h

* fix(security): move auth-gate credentials to environment variables

Hardcoded username, password, and HMAC secret in auth-gate.py replaced
with os.environ lookups. Startup now refuses to run if any variable is
unset. Added AUTH_GATE_SECRET/USER/PASS to .env.example.

https://claude.ai/code/session_015uPUoKyYa8M2UAcyk5Gt6h

* refactor(tooling): migrate from black+isort+bandit to ruff

Replace three separate linting/formatting tools with a single ruff
invocation. Updates tox.ini (lint, format, pre-push, pre-commit envs),
.pre-commit-config.yaml, and CI workflow. Fixes all ruff errors
including unused imports, missing raise-from, and undefined names.
Ruff config maps existing bandit skips to equivalent S-rules.

https://claude.ai/code/session_015uPUoKyYa8M2UAcyk5Gt6h

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-11 12:23:35 -04:00
Alexander Whitestone
c41e3e1e15 fix: clean up logging colors, reduce noise, enable Tailscale access (#166)
* fix: reserve red for real errors, reduce log noise, allow Tailscale access

- Add _ColorFormatter: red = ERROR/CRITICAL only, yellow = WARNING, green = INFO
- Override uvicorn's default colors to use our scheme
- Downgrade discord "not installed" from ERROR to WARNING (optional dep)
- Downgrade DuckDuckGo unavailable from INFO to DEBUG
- Stop discord token watcher retry loop when discord.py not installed
- Add configurable trusted_hosts setting; dev mode allows all hosts
- Exclude .claude/ from uvicorn reload watcher (worktree isolation)
- Fix pre-commit hook: use tox -e unit, bump timeout to 60s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* style: auto-format with black

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: pre-commit hook auto-formats with black+isort before testing

Formatting should never block a commit — just fix it automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Trip T <trip@local>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 10:37:20 -04:00
Alexander Whitestone
1191ea2f9a Claude/fix tick engine v16wt (#165)
* fix: wire up tick engine scheduler + add journal + systemd timer

The ThinkingEngine was fully implemented but never called — the background
scheduler was lost during the Celery removal in #133. This commit:

- Add _thinking_scheduler() to dashboard lifespan (5-min cycle)
- Add _write_journal() that appends thoughts to data/journal/YYYY-MM-DD.md
- Add `timmy tick` CLI command for one-shot thinking (systemd-friendly)
- Add deploy/timmy-tick.{service,timer} systemd units

https://claude.ai/code/session_013e7upfJ6negFzu5YNJikge

* Add macOS launchd plist for Timmy tick timer

Equivalent of the existing systemd service/timer for Linux.
Runs `timmy tick` every 5 minutes via launchd on macOS.

https://claude.ai/code/session_013e7upfJ6negFzu5YNJikge

* fix: make macOS launchd timer work with user-local paths

The plist had hardcoded /opt/timmy paths that don't exist on Mac.
Now uses a template with __PROJECT_DIR__ placeholders, a wrapper
script for PATH setup, and an install script that wires it all up.

Usage: ./deploy/install-mac-timer.sh

https://claude.ai/code/session_013e7upfJ6negFzu5YNJikge

* fix: add missing tox pre-commit env + pre-push hook to prevent broken builds

RCA: the pre-commit hook referenced `tox -e pre-commit` which didn't
exist in tox.ini, so commits went unchecked. There was also no
pre-push hook, so broken code could reach GitHub without running
the CI-mirror suite.

- Add [testenv:pre-commit] to tox.ini (format check + unit tests)
- Add .githooks/pre-push that runs `tox -e pre-push` (full CI mirror)

https://claude.ai/code/session_013e7upfJ6negFzu5YNJikge

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-11 10:19:46 -04:00
Alexander Whitestone
622a6a9204 polish: extract inline CSS, add connection status, panel macro, favicon, ollama cache, toast system (#164)
Major:
- Extract all inline <style> blocks from 22 Jinja2 templates into
  static/css/mission-control.css — single cacheable stylesheet
- Add tox lint check that fails on inline <style> in templates

Minor:
1. Connection status indicator in topbar (green/amber/red dot) reflecting
   WebSocket + Ollama reachability, with auto-reconnect
2. Jinja2 {% macro panel(title) %} in macros.html — eliminates repeated
   .card.mc-panel markup; index.html converted as example
3. SVG favicon (purple T + orange dot)
4. 30-second TTL cache on _check_ollama() to avoid blocking the event loop
   on every health poll (asyncio.to_thread was already in place)
5. Toast notification system (McToast.show) for transient status messages —
   wired into connection status for Ollama/WebSocket state changes

Enforcement:
- CLAUDE.md updated with conventions 11-14 (no inline CSS, use panel macro,
  use toasts, never block the event loop)
- tox lint + pre-push environments now fail on inline <style> blocks

https://claude.ai/code/session_014FQ785MQdyJQ4BAXrRSo9w

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-11 09:52:57 -04:00
Alexander Whitestone
6303a77f6e Consolidate test & dev workflows into tox as single source of truth (#160)
* Centralize all Python environments on tox

tox.ini is now the single source of truth for how every Python
environment runs — tests, linting, formatting, dev server, and CI.
No more bare `poetry run` outside of tox.

- Expand tox.ini from 4 to 15 environments (lint, format, typecheck,
  unit, integration, functional, e2e, fast, ollama, ci, coverage,
  coverage-html, pre-commit, dev, all)
- Rewire all Makefile test/lint/format/dev targets to delegate to tox
- Update .githooks/pre-commit to run `tox -e pre-commit`
- Update .pre-commit-config.yaml to use tox instead of poetry run
- Update CI workflow (lint + test jobs) to use `tox -e lint` and
  `tox -e ci` instead of ad-hoc pytest/black/isort invocations
- Update CLAUDE.md to mandate tox usage and document all environments

https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5

* refactor: modernize tox.ini for tox 4.x conventions

- Replace `skipsdist = true` (tox 3 alias) with `no_package = true`
- Use `poetry install --no-root --sync` for faster, cleaner dep installs

https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5

* fix(ci): drop poetry install from lint/format tox envs

Lint and format only need black, isort, and bandit — not the full
project dependency tree. Override commands_pre to empty and use tox
deps instead. Fixes CI failure where poetry is not on PATH.

https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5

* fix(ci): remove poetry run wrapper from all tox commands

Since commands_pre runs poetry install into the tox-managed venv,
all tools (pytest, mypy, black, etc.) are already on the venv PATH.
The poetry run wrapper is redundant and fails in CI where poetry
may not be installed globally.

https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5

* fix(ci): remove poetry dependency, align local and CI processes

- Replace `poetry install` with `pip install -e ".[dev]"` in tox
  commands_pre so all envs work without poetry installed
- Remove Poetry cache from GitHub Actions (only pip cache needed)
- Rename pre-commit env to pre-push: runs lint + full CI suite
  (same checks as GitHub Actions, reports generated locally)
- Update CLAUDE.md to reflect new pre-push workflow

The local `tox -e pre-push` now runs the exact same lint + test +
coverage checks as CI, so failures are caught before pushing.

https://claude.ai/code/session_01MTUpqms1fgezZFrodGA8H5

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-10 15:54:09 -04:00
Alexander Whitestone
ae3bb1cc21 feat: code quality audit + autoresearch integration + infra hardening (#150) 2026-03-08 12:50:44 -04:00
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
87dc5eadfe Wire orchestrator pipe into task runner + pipe-verifying integration tests (#134) 2026-03-06 01:20:14 -05:00