Skip to content

stats-wrapper hangs indefinitely when gh API call for one repo stalls #1192

@superdav42

Description

@superdav42

What

stats-health-dashboard.sh iterates repos sequentially in update_health_issues(). When a gh API call for one repo hangs indefinitely (observed: superdav42/tgc.church), all subsequent repos in the loop are blocked — their dashboards never get updated that cycle.

Why

Observed in the investigation of #1190: the stats-wrapper process (PID 821239, 869115) stalled for 7+ minutes on superdav42/tgc.church. Process tree showed gh with 6 threads, no output, indefinite wait:

bash(821239)---bash(859866)---bash(864069)---bash(864852)---gh(864853)-+-{gh}(864854)

Without per-call timeouts, a single slow/unresponsive gh call prevents Ultimate-Multisite/gratis-ai-agent, Ultimate-Multisite/ultimate-multisite, and all other repos from getting their dashboard updates.

How

Wrap individual gh API calls in the health dashboard loop with timeout 30 (or similar).

Target function: _update_health_issue_for_repo in ~/.aidevops/agents/scripts/stats-health-dashboard.sh.

Specifically, the gh issue edit and gh issue list calls within _check_health_issue_activity_guard, _find_health_issue, and _resolve_health_issue_number should be wrapped.

Pattern (existing example in codebase):

timeout 30 gh api ... 2>/dev/null || { echo "[stats] Timeout on gh call for $slug"; return 0; }

Acceptance

  • Individual gh API calls in _update_health_issue_for_repo have a timeout (30s recommended).
  • A stalled gh call on one repo does not block all subsequent repos in the loop.
  • shellcheck passes on the modified file.

Files to modify

  • EDIT: ~/.aidevops/agents/scripts/stats-health-dashboard.sh — wrap gh calls with timeout 30
  • Source: ~/Git/aidevops/.agents/scripts/stats-health-dashboard.sh (the deployed copy is at the path above)

aidevops.sh v3.11.9 plugin for OpenCode v1.3.17 with claude-sonnet-4-6 spent 10m and 15,959 tokens on this as a headless worker.

Metadata

Metadata

Assignees

Labels

consolidatedIssue superseded by a consolidated childneeds-consolidationIssue held from dispatch pending comment consolidationorigin:workerCreated by headless/pulse worker sessionpriority:mediumMedium severity — moderate quality issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions