AOSSIE-Org / AOSSIE-Org/OrgExplorer

[BUG]: runAudit silently swallows rate limit errors — governance page shows incomplete data without any warning

オープン
#81 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
JavaScript
スター
34
フォーク
92
平均マージ
8日 7時間
マージ済み PR(30日)
12

説明

### Bug Description

When GitHub API rate limits are hit during runAudit(), the error is swallowed by fetchIssues(), which catches all exceptions and returns an empty array.

As a result:

1. runAudit() continues execution.
2. Governance/Analytics pages display partial audit results.
3. Users receive no indication that data is incomplete.
4. The behavior differs from explore(), which correctly surfaces rate-limit errors.

Expected Behavior

If a GitHub rate-limit error (HTTP 403) occurs during an audit:

1. The audit should stop or be marked as incomplete.
2. The user should receive a clear notification/error message.
3. Results should not appear as a successful complete audit when data is missing.

Actual Behavior

fetchIssues() returns [] for all errors, including rate-limit failures, causing the audit to proceed silently with incomplete data

### Steps to Reproduce

Prerequisites: No PAT configured (unauthenticated = 60 req/hr limit)

Step 1 — Exhaust your rate limit
Open the app without a PAT set in Settings. Search for 2–3 large organizations. Each explore() call fetches org metadata + up to 500 repos + contributors for top 10 repos per org. This burns through the 60 req/hr unauthenticated limit quickly.

You can verify your limit is near exhaustion by checking the Rate Limit Banner (appears when remaining ≤ 20% of limit) or going to Settings and checking the quota display.

Step 2 — Navigate to Governance page
After the explore completes, go to Governance → Run Audit. runAudit() will begin fetching issues for the top 15 repos in batches of 5.

Step 3 — Observe the silent failure
While the audit is running (or after it finishes), if the rate limit hits mid-batch:

1. The govLoading spinner disappears normally — as if the audit completed successfully
2. The Governance page shows stat cards with counts (e.g., "Dead Issues: 0", "Zombie PRs: 0")
3. The Analytics page shows "No trend data" or flat charts
4. No error message is shown anywhere
5. No banner or warning indicates that some repos returned no data

### Logs and Screenshots

Image

### Environment Details

OS : Windows 11
Browser : Brave
Node.js: 22.18.0

### Impact

Medium - Feature works but has issues

### Code of Conduct

- [x] I have joined the [Discord server](https://discord.gg/hjUhu33uAn) and will post updates there
- [x] I have searched existing issues to avoid duplicates

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Trace runAudit() through fetchIssues() and compare its error handling with explore(), then inspect the Governance and Analytics page states. Reproduce the issue with an exhausted unauthenticated GitHub API limit; done means a rate-limit failure stops or marks the audit incomplete and shows a clear warning instead of presenting partial results as complete.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github, javascript
領域
analytics, api
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
56/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。