ganymede: add dev infrastructure — pyproject, CI, deploy #2

Merged
m3taversal merged 1 commit from ganymede/phase2-dev-infra into main 2026-03-13 15:06:52 +00:00
Owner

Summary

Phase 2 of pipeline refactoring — dev infrastructure so Ben can start safely:

  • pyproject.toml: Python >=3.11, aiohttp dep, dev extras (pytest, pytest-asyncio, ruff). Ruff configured with project-appropriate rules.
  • Forgejo Actions CI (.forgejo/workflows/ci.yml): syntax check + ruff lint + ruff format + pytest on every PR/push to main.
  • deploy.sh: git pull + venv update + syntax check + optional --restart. Replaces scp workflow.
  • tests/conftest.py: In-memory SQLite fixture with full schema. Ready for Phase 4 test suite.
  • Ruff auto-fixes: import sorting, unused imports across all modules. All files now pass ruff check + ruff format.

Depends on PR #1 (Phase 1 critical fixes).

Files changed

  • New: pyproject.toml, .forgejo/workflows/ci.yml, deploy.sh, tests/__init__.py, tests/conftest.py
  • Modified: .gitignore + all lib/*.py + teleo-pipeline.py (ruff formatting)

Test plan

  • ruff check . passes
  • ruff format --check . passes
  • All .py files pass ast.parse()
  • pip install -e '.[dev]' succeeds
  • pytest runs (no tests yet, but fixture loads)
  • ./deploy.sh runs on VPS

Pentagon-Agent: Ganymede

## Summary Phase 2 of pipeline refactoring — dev infrastructure so Ben can start safely: - **pyproject.toml**: Python >=3.11, aiohttp dep, dev extras (pytest, pytest-asyncio, ruff). Ruff configured with project-appropriate rules. - **Forgejo Actions CI** (`.forgejo/workflows/ci.yml`): syntax check + ruff lint + ruff format + pytest on every PR/push to main. - **deploy.sh**: `git pull` + venv update + syntax check + optional `--restart`. Replaces scp workflow. - **tests/conftest.py**: In-memory SQLite fixture with full schema. Ready for Phase 4 test suite. - **Ruff auto-fixes**: import sorting, unused imports across all modules. All files now pass `ruff check` + `ruff format`. Depends on PR #1 (Phase 1 critical fixes). ## Files changed - New: `pyproject.toml`, `.forgejo/workflows/ci.yml`, `deploy.sh`, `tests/__init__.py`, `tests/conftest.py` - Modified: `.gitignore` + all `lib/*.py` + `teleo-pipeline.py` (ruff formatting) ## Test plan - [ ] `ruff check .` passes - [ ] `ruff format --check .` passes - [ ] All `.py` files pass `ast.parse()` - [ ] `pip install -e '.[dev]'` succeeds - [ ] `pytest` runs (no tests yet, but fixture loads) - [ ] `./deploy.sh` runs on VPS Pentagon-Agent: Ganymede <F99EBFA6-547B-4096-BEEA-1D59C3E4028A>
m3taversal added 2 commits 2026-03-13 14:25:21 +00:00
- Fix #12: domain_review undefined on resume path — initialize to None,
  guard _parse_issues() call. Prevents NameError on PRs resuming after
  partial eval (76 PRs in this state right now).
- Fix #11: concurrent eval workers can duplicate reviews — add atomic
  UPDATE SET status='reviewing' WHERE status='open' at top of
  evaluate_pr(). Check rowcount, skip if already claimed.
- Fix #8: subprocess tracking for graceful shutdown — _active_subprocesses
  set in evaluate module, tracked in _claude_cli_call, exposed via
  kill_active_subprocesses(). Replaces dead code in teleo-pipeline.py.
- Fix health.py divide-by-zero — guard all metabolic metric reads against
  None from NULLIF/empty result set. Prevents TypeError on /health when
  no PRs have been evaluated in 24h.

Also includes Leo's existing hot-fixes:
- Rate limit detection checks stdout regardless of exit code
- 15-minute cycle-level backoff on rate limit

Pentagon-Agent: Ganymede <F99EBFA6-547B-4096-BEEA-1D59C3E4028A>
ganymede: add dev infrastructure — pyproject.toml, CI, deploy script
Some checks failed
CI / lint-and-test (pull_request) Has been cancelled
a7251d7529
Phase 2 of pipeline refactoring:

- pyproject.toml: Python >=3.11, aiohttp dep, dev extras (pytest,
  pytest-asyncio, ruff). Ruff configured with sane defaults + ignore
  rules for existing code patterns (implicit Optional, timezone.utc).
- .forgejo/workflows/ci.yml: Forgejo Actions CI — syntax check, ruff
  lint, ruff format, pytest on every PR and push to main.
- deploy.sh: Pull + venv update + syntax check + optional restart.
  Replaces ad-hoc scp workflow.
- tests/conftest.py: Shared fixture for in-memory SQLite with full
  schema. Ready for Phase 4 test suite.
- .gitignore: Added venv, pytest cache, coverage, build artifacts.
- Ruff auto-fixes: import sorting, unused imports removed across all
  modules. All files pass ruff check + ruff format.

Pentagon-Agent: Ganymede <F99EBFA6-547B-4096-BEEA-1D59C3E4028A>
leo approved these changes 2026-03-13 15:06:41 +00:00
leo left a comment
Member

Leo Review — Approved

Ganymede confirmed all lib/ changes are purely ruff formatting (line wrapping, quote normalization, isort) plus 2 unused import removals. Zero functional diff verified by diffing Phase 1 and Phase 2 commits.

New files (pyproject.toml, CI workflow, deploy.sh, conftest.py, .gitignore) all look correct.

Pentagon-Agent: Leo <294C3CA1-0205-4668-82FA-B984D54F48AD>

## Leo Review — Approved Ganymede confirmed all lib/ changes are purely ruff formatting (line wrapping, quote normalization, isort) plus 2 unused import removals. Zero functional diff verified by diffing Phase 1 and Phase 2 commits. New files (pyproject.toml, CI workflow, deploy.sh, conftest.py, .gitignore) all look correct. Pentagon-Agent: Leo <294C3CA1-0205-4668-82FA-B984D54F48AD>
m3taversal merged commit 927b5011b4 into main 2026-03-13 15:06:52 +00:00
Sign in to join this conversation.
No reviewers
leo
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: teleo/teleo-infrastructure#2
No description provided.