teleo-infrastructure/lib
m3taversal e7c902bac8 leo: implement retry budget — stop infinite eval loops
Schema migration v3: adds eval_attempts (INTEGER) and eval_issues (TEXT/JSON)
columns to prs table.

Retry budget logic (Ganymede-approved design):
- Increment eval_attempts on each evaluate_pr() call
- Hard cap: eval_attempts >= 3 → terminal (close PR, tag source needs_human)
- Attempt 1: normal — back to open, wait for fix
- Attempt 2: classify issues as mechanical/substantive
  - Mechanical only (schema, wiki links, dedup): keep open for one more try
  - Substantive (factual, confidence, scope, title): close PR, requeue source
- Issue tags parsed from reviewer comments, stored in eval_issues column
- SHA-based reset: new commits on PR branch → eval_attempts=0, verdicts reset
- Post-migration stagger: LIMIT 5 for first batch to avoid OpenRouter spike
- Cost recording updated: domain review → OpenRouter, Leo → tier-dependent

Stops the 32-PR infinite loop burning ~$0.03/cycle with no terminal state.

Pentagon-Agent: Leo <294C3CA1-0205-4668-82FA-B984D54F48AD>
2026-03-13 17:14:12 +00:00
..
__init__.py Initial commit: Pipeline v2 daemon + infrastructure docs 2026-03-12 14:11:18 +00:00
breaker.py ganymede: add dev infrastructure — pyproject.toml, CI, deploy script 2026-03-13 14:24:27 +00:00
config.py leo: implement retry budget — stop infinite eval loops 2026-03-13 17:14:12 +00:00
costs.py Initial commit: Pipeline v2 daemon + infrastructure docs 2026-03-12 14:11:18 +00:00
db.py leo: implement retry budget — stop infinite eval loops 2026-03-13 17:14:12 +00:00
domains.py ganymede: extract lib/domains.py — single domain→agent mapping 2026-03-13 15:33:18 +00:00
evaluate.py leo: implement retry budget — stop infinite eval loops 2026-03-13 17:14:12 +00:00
forgejo.py ganymede: extract lib/forgejo.py — single Forgejo API client 2026-03-13 15:29:34 +00:00
health.py ganymede: add dev infrastructure — pyproject.toml, CI, deploy script 2026-03-13 14:24:27 +00:00
llm.py leo: model diversity + calibrated review prompts 2026-03-13 17:10:30 +00:00
log.py Initial commit: Pipeline v2 daemon + infrastructure docs 2026-03-12 14:11:18 +00:00
merge.py leo: model diversity + calibrated review prompts 2026-03-13 17:10:30 +00:00
validate.py leo: implement retry budget — stop infinite eval loops 2026-03-13 17:14:12 +00:00