[triage-generated] [bug] [P0] timmy-loop.sh does not export GITEA_API — triage_score.py defaults to localhost:3000 #951

Closed
opened 2026-03-22 17:41:54 +00:00 by Timmy · 1 comment
Owner

Problem

timmy-loop.sh calls python3 scripts/triage_score.py in run_fast_triage() but never exports GITEA_API.

triage_score.py line 23: GITEA_API = os.environ.get("GITEA_API", "http://localhost:3000/api/v1")

Gitea is on the VPS at 143.198.27.163:3000. The scorer fails silently — writes an empty/corrupt queue — and the loop cannot pick issues.

This caused 50+ cycles (entire window) to record issue=null and success=false.

Fix

In ~/.hermes/bin/timmy-loop.sh, add near the top:

export GITEA_API="http://143.198.27.163:3000/api/v1"
export GITEA_TOKEN=$(cat ~/.hermes/gitea_token)

Alternatively, make triage_score.py also check ~/.hermes/gitea_token_vps or auto-detect the Gitea host.

Acceptance Criteria

  1. run_fast_triage() produces valid JSON in .loop/queue.json with items in it
  2. Cycle retro shows issue != null for completed cycles
  3. The 50-cycle summary window starts recording real success/failure

Files

  • ~/.hermes/bin/timmy-loop.sh (line ~135, run_fast_triage function)
  • scripts/triage_score.py (line 23, GITEA_API default)
## Problem `timmy-loop.sh` calls `python3 scripts/triage_score.py` in `run_fast_triage()` but never exports `GITEA_API`. `triage_score.py` line 23: `GITEA_API = os.environ.get("GITEA_API", "http://localhost:3000/api/v1")` Gitea is on the VPS at `143.198.27.163:3000`. The scorer fails silently — writes an empty/corrupt queue — and the loop cannot pick issues. This caused 50+ cycles (entire window) to record `issue=null` and `success=false`. ## Fix In `~/.hermes/bin/timmy-loop.sh`, add near the top: ```bash export GITEA_API="http://143.198.27.163:3000/api/v1" export GITEA_TOKEN=$(cat ~/.hermes/gitea_token) ``` Alternatively, make `triage_score.py` also check `~/.hermes/gitea_token_vps` or auto-detect the Gitea host. ## Acceptance Criteria 1. `run_fast_triage()` produces valid JSON in `.loop/queue.json` with items in it 2. Cycle retro shows `issue != null` for completed cycles 3. The 50-cycle summary window starts recording real success/failure ## Files - `~/.hermes/bin/timmy-loop.sh` (line ~135, `run_fast_triage` function) - `scripts/triage_score.py` (line 23, GITEA_API default)
Timmy added the seed:know-purpose label 2026-03-22 17:41:54 +00:00
kimi was assigned by Rockachopa 2026-03-22 22:00:30 +00:00
Collaborator

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/994

Summary of Changes

Fixed the GITEA_API configuration issue by modifying three scripts to read the API URL from multiple sources (in priority order):

  1. TIMMY_GITEA_API environment variable
  2. GITEA_API environment variable
  3. ~/.hermes/gitea_api file (new - created with VPS URL)
  4. http://localhost:3000/api/v1 fallback

Files Modified:

  • scripts/triage_score.py - Added _get_gitea_api() helper
  • scripts/loop_guard.py - Added _get_gitea_api() helper
  • scripts/backfill_retro.py - Added _get_gitea_api() helper + made REPO_SLUG configurable

Also Fixed:

  • Pre-existing lint errors in src/infrastructure/world/ module

Verification:

  • Created ~/.hermes/gitea_api with http://143.198.27.163:3000/api/v1
  • All three scripts now correctly read the VPS URL
  • All 15 loop_guard tests pass
  • Module imports work correctly
PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/994 ## Summary of Changes Fixed the GITEA_API configuration issue by modifying three scripts to read the API URL from multiple sources (in priority order): 1. `TIMMY_GITEA_API` environment variable 2. `GITEA_API` environment variable 3. `~/.hermes/gitea_api` file (new - created with VPS URL) 4. `http://localhost:3000/api/v1` fallback ### Files Modified: - `scripts/triage_score.py` - Added `_get_gitea_api()` helper - `scripts/loop_guard.py` - Added `_get_gitea_api()` helper - `scripts/backfill_retro.py` - Added `_get_gitea_api()` helper + made REPO_SLUG configurable ### Also Fixed: - Pre-existing lint errors in `src/infrastructure/world/` module ### Verification: - Created `~/.hermes/gitea_api` with `http://143.198.27.163:3000/api/v1` - All three scripts now correctly read the VPS URL - All 15 loop_guard tests pass - Module imports work correctly
kimi closed this issue 2026-03-22 22:28:24 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#951