Add local dev harness for agentic testing#34
Closed
riccjohn wants to merge 9 commits into
Closed
Conversation
Introduces a full local development environment so Claude can spin up services, run health checks, and verify changes autonomously without the Linux server or Cloudflare DNS. - docker-compose.dev.yml: compose override disabling pihole/jellyfin (Linux-only), Traefik HTTP-only on :8080, all services with native ports exposed, data volumes redirected to .dev/data/ - traefik/traefik.dev.yml: Traefik static config with no ACME, ping endpoint enabled, insecure dashboard for local use - traefik/dynamic.dev/: empty dynamic config dir to avoid cert resolver warnings from production tls.yml/services.yml - scripts/dev.sh: up/down/restart/status/logs subcommands; creates .env.dev and data dirs on first run; down/status work without .env.dev - scripts/health-check.sh: hits each service health endpoint on localhost; exits 1 if any fail; supports single-service filter arg - .env.dev.example: dev-safe template with dummy tokens (readable by Claude; blocked by pre-tool-use hook like .env) - CLAUDE.md: local dev workflow section with agentic test loop pattern - .gitignore: add .env.dev, .dev/, acme.dev.json - pre-tool-use.sh: allow reads of .env.dev.example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Catches drift between docker-compose.yml and docker-compose.dev.yml on every PR — any change that breaks the merged dev config will fail CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Docker Compose concatenates port lists rather than merging by target, so the production sync ports (22000, 21027) were always bound regardless of what the dev override specified. Since syncthing conflicts with a native install on the dev machine anyway, disable it via profiles like pihole and jellyfin. Also removes the dead .dev/data/syncthing directory from ensure_dirs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
api.insecure serves on an internal :8080 entry point, but the dev port mapping is 8080:80 (host→web entry point). Bind ping to the web entry point so localhost:8080/ping works as expected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds SKIP lines for syncthing, jellyfin, and pihole so the full service list is always visible — makes it obvious they're intentionally absent rather than accidentally missing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The local stack was too brittle: 3 of 9 services couldn't run on macOS (host networking, GPU devices, port conflicts), and the real failure modes for this repo happen on the Linux server after deployment. Replace with scripts/collect-logs.sh — captures container status, recent errors, and per-service log tails in a format ready to paste into Claude for diagnosis. Removes: - docker-compose.dev.yml - traefik/traefik.dev.yml - traefik/dynamic.dev/ - .env.dev.example - scripts/dev.sh - scripts/health-check.sh - CI step: Validate docker-compose.dev.yml merge - .gitignore entries for .dev/, .env.dev, acme.dev.json - pre-tool-use.sh exception for .env.dev.example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
.dev/ and .env.dev were created by the local docker stack during testing and not gitignored after removing them from the harness cleanup. Untrack and re-add to .gitignore. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
collect-logs.sh documentation belongs in README for human consumption. CLAUDE.md is for agent instructions only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Owner
Author
|
Not sure if this is actually helpful |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/collect-logs.sh— captures container status, recent errors, and the last 75 lines per service in a format ready to paste into Claude for diagnosisREADME.md— new "Diagnosing issues" section documentingcollect-logs.shCLAUDE.md— lean session init and task tracking instructions only; human-facing docs moved to READMElint-config.shCI validation unchangedWhat changed from the original plan
The PR started as a full local dev harness (local docker stack, health checks, compose override). During testing we found that 3 of 9 services can't run on macOS (Pi-hole host networking, Jellyfin GPU device, Syncthing port conflicts), making the harness too brittle to be useful for autonomous agentic testing. Replaced with a simpler diagnostic script that works against the real server where all services actually run.
Test plan
bash scripts/lint-config.shexits clean./scripts/collect-logs.shruns on the server without error./scripts/collect-logs.sh <service>filters to one service🤖 Generated with Claude Code