docs: add CI/CD gotchas and Linux venv path to CLAUDE.md

Added lessons learned: AI tests need ai_enabled mock in CI (#28),
ESLint no-unused-vars lacks argsIgnorePattern (#29). Added Linux venv
activation path and gh CLI commands for CI debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-03-01 14:38:28 -05:00
parent f31058fc3f
commit a1c9675be7

View File

@@ -148,7 +148,8 @@ VITE_API_URL=http://localhost:8000
docker start patherly_postgres
# Backend (from backend/)
.\venv\Scripts\Activate
source venv/bin/activate # Linux/Mac
# .\venv\Scripts\Activate # Windows
uvicorn app.main:app --reload
# Frontend (from frontend/)
@@ -172,6 +173,12 @@ docker exec -it patherly_postgres psql -U postgres -d patherly
# Seed data
cd backend && pip install httpx && python -m scripts.seed_trees
# CI/CD debugging
gh run list --limit 5 # Recent CI runs
gh run view <id> --log-failed # Failed job logs
gh run watch <id> --exit-status # Watch run until complete
gh run view <id> --json jobs --jq '.jobs[] | {name: .name, conclusion: .conclusion}'
```
### URLs
@@ -279,6 +286,10 @@ navigate(`/trees/${newTree.id}/edit`)
**27. Maintenance batch sessions are created all-at-once at launch:** All sessions in a batch exist immediately after `batchLaunchApi.launch()` with `batch_id` + `target_label` set. `started_at` is null until a user begins executing that target — there is no "pending session creation" state.
**28. AI tests in CI need `ai_enabled` mock:** Backend tests that hit AI endpoints must mock `settings.ai_enabled = True` via `PropertyMock` since CI has no `ANTHROPIC_API_KEY`. See `tests/test_ai_chat.py` `_enable_ai` fixture pattern.
**29. ESLint `no-unused-vars` has no `argsIgnorePattern`:** Underscore-prefixed callback params (e.g., `_count`) still trigger errors. Use `// eslint-disable-next-line @typescript-eslint/no-unused-vars` or remove the param if the type signature allows it.
---
## RBAC & Permissions