CommandCodeAI / CommandCodeAI/command-code

Dashboard usage records not updating — /internal/usage endpoint returns stale data

オープン
#546 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
言語のデータがありません
スター
4k
フォーク
350
PR マージ指標
30日以内にマージされた PR はありません

説明

Describe the bug
The usage/billing history on the web dashboard (commandcode.ai) hasn't been updating. The /internal/usage API endpoint is returning stale data — the latest record is from July 2nd, even though new API calls have been made in the last 24+ hours.

Balance refresh still works fine, it's specifically the usage records endpoint that's stuck.

To Reproduce

  1. Make a new API call with command-code
  2. Go to commandcode.ai dashboard → usage history
  3. Latest API call not listed
  4. Or directly: curl 'https://api.commandcode.ai/internal/usage?limit=5' with valid session cookie — observe latest createdAt is stuck at July 2nd, no newer records appear

Expected behavior
Usage records should appear within minutes of each API call.

Additional context

  • Balance/credits refresh works normally
  • The API returns HTTP 200 with data, but the data itself is stale
  • This affects both the web dashboard and any third-party apps relying on this endpoint

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

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

/internal/usage エンドポイントのハンドラーを見つけ、使用量レコードの読み取り方法を追跡することから始めます。その経路を、現在も機能している残高更新の経路と比較します。curl リクエストで古いレスポンスを再現し、新しい API 呼び出しが数分以内にエンドポイントとダッシュボードに表示されたら、完了を確認します。

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

評価

領域
api, backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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