claude-memory/graph/solutions/refactor-issue-pollersh-replaced-5-of-6-haikumcp-calls-with-436e13.md
2026-03-03 15:26:00 -06:00

2.7 KiB

id type title tags importance confidence created updated relations
436e133f-2c31-488a-9810-fb6ca5b45250 solution Refactor: issue-poller.sh — replaced 5 of 6 Haiku+MCP calls with direct curl+jq Gitea API calls
issue-poller
gitea-api
curl
jq
cost-optimization
automation
claude-scheduled
refactor
0.8 0.8 2026-03-03T21:25:29.636362+00:00 2026-03-03T21:26:00.855903+00:00
target type direction strength edge_id
28217f02-2f47-4231-b785-b2c582ce52ab BUILDS_ON incoming 0.78 22aa2bcd-12a0-411b-b161-00172dabf4c0
target type direction strength edge_id
73646e80-a640-4316-b7c6-54a4330f1b28 RELATED_TO outgoing 0.77 9bf1b5df-ad63-4079-a7d5-83466d92ba0f
target type direction strength edge_id
4321bee8 RELATED_TO outgoing 0.77 11eb9d2c-6d91-48ab-9f5f-13331eb62e3b
target type direction strength edge_id
c1a50fb8-9084-439d-a156-872bedb9013b CAUSES incoming 0.9 b6ee1850-88c1-4860-b757-b07e1d7fb855
target type direction strength edge_id
91e8d0c6-74c0-472f-b123-d30123bfd009 RELATED_TO outgoing 0.8 ee09b1f2-02b3-4773-901e-f9a42c9ff39d
target type direction strength edge_id
cb5e8814-f689-4de0-8854-823358706dec RELATED_TO outgoing 0.75 52d2daa5-df13-4faf-81ea-5058d526fc18

Issue-Poller Refactor: Haiku → curl+jq

Project

claude-scheduled / issue-poller automation

File

~/.config/claude-scheduled/issue-poller.sh

Motivation

  • Haiku spawned for simple CRUD operations was slow (~60-90s discovery phase) and expensive (~$0.80-1.00/run)
  • The MCP wrapper for list_repo_issues was causing an infinite loop (see related bug fix memory)

What Was Replaced (5 of 6 calls)

Old (Haiku+MCP) New (curl+jq) Endpoint
Auth check gitea_get /user GET /api/v1/user
List issues gitea_get /repos/{owner}/{repo}/issues?type=issues GET with type filter
Label race-check gitea_get issue + jq GET issue JSON
Add label gitea_post labels POST /issues/{id}/labels
Post-worker label swap gitea_delete + gitea_post DELETE + POST labels

What Was Kept (1 call)

  • Feasibility check — genuinely needs AI reasoning to determine if an issue is actionable

Helper Functions Added

gitea_get()     # curl GET wrapper with auth
gitea_post()    # curl POST wrapper with JSON body
gitea_delete()  # curl DELETE wrapper
ensure_label()  # search existing labels before creating (prevents duplicates)
add_label()     # add label to issue
remove_label()  # remove label from issue

Token Source

~/.config/claude-scheduled/secrets

Performance Improvement

  • Discovery phase: ~60-90s → ~2s
  • Cost savings: ~$0.80-1.00/run