Gateway logs nothing when a Frames call fails, except on 401

オープン 初心者向け
#124 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go

調査の方向性

internal/frames/framesmcp/server.goから始め、issueで挙げられているsession.Connect、session.CallTool、failed、トークンソース、URLエラーの各パスに注目してください。それらのログ出力をmemory.recall_failedの警告と比較し、トークンとリクエストボディをログに含めないようにしてください。各失敗パスが原因と関連するコンテキストを含むWARNを出力し、トークンソースの失敗には個別のメッセージを出すことが完了の条件です。

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

説明

When Frames is down, the gateway logs nothing. An operator has no line to find, and the only sign anything is wrong is an agent telling the person that Frames didn't respond.

I tested this on the powershift demo cluster by scaling Frames to 0 for about nine minutes (v0.4.0). Home chat behaved well: it said Frames didn't respond after several tries, didn't make up an answer, and suggested trying again later. On the gateway side, Tempo shows eight /frames/mcp calls, all HTTP 200 in 1-58 ms, because the forwarder returns the failure as an MCP tool error. The gateway log has no line at all for them.

Memory doesn't have this gap. With mem0 at 0 in the same test, every failed call got a WARN with the cause (memory.recall_failed ... mem0: POST /search: dial tcp ...:8000: connect: connection refused), so it was obvious what was down and why.

On main (e493830), in internal/frames/framesmcp/server.go:

  • When session.Connect or session.CallTool fails (:140, :152), the error is thrown away and failed is called. failed (:160) logs only when Frames answered 401 (frames.token_refused, :165). A connection refused, a timeout, a 5xx or a protocol error all come back as MsgFramesUnavailable with no log line.
  • The token-source failure and the two URL errors (:109, :113, :117) return MsgFramesUnavailable without logging either.

We should log each of these at WARN, the way memory does: a frames.call_failed with the cause, the Frames URL and the tool name, and never the token or body (as frames.token_refused already does). The token-source failure needs its own message so it isn't mistaken for Frames being down.

#119 covers the tool name missing from traces. This is the other half: even without a trace backend, the log should say Frames is unreachable.

主要言語
Go
スター
5
フォーク
0
平均マージ
21時間 13分
マージ済み PR(30日)
53

環境構築

はじめの一歩

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

nebari-dev/tapas のほかの issue

nebari-dev/tapas の issue をすべて見る

似ている issue

Go の issue をもっと見る

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

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