[kimi] Fix GITEA_API configuration in triage scripts (#951) #994
Reference in New Issue
Block a user
Delete Branch "kimi/issue-951"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #951
Problem
The triage_score.py, loop_guard.py, and backfill_retro.py scripts were hardcoded to use 'http://localhost:3000/api/v1' as the default Gitea API URL. This caused the triage scorer to fail when Gitea is hosted on a remote VPS (143.198.27.163:3000), resulting in 50+ cycles recording issue=null and success=false.
Solution
Added
_get_gitea_api()helper function to all three scripts that checks for configuration in this priority order:TIMMY_GITEA_APIenvironment variable (preferred, consistent with other modules)GITEA_APIenvironment variable (for backward compatibility)~/.hermes/gitea_apifile (new - allows persistent configuration)http://localhost:3000/api/v1fallback (for local development)Additional Changes
REPO_SLUGconfigurable via environment variable in backfill_retro.py (was hardcoded)Verification
~/.hermes/gitea_apifile with VPS URL