feat(server): Retrieval Trace 基盤を追加する - #1111
Draft
owk-owk130 wants to merge 6 commits into
Draft
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018BjNFvQjDzMwF8HaZHnJjP
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018BjNFvQjDzMwF8HaZHnJjP
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018BjNFvQjDzMwF8HaZHnJjP
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018BjNFvQjDzMwF8HaZHnJjP
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018BjNFvQjDzMwF8HaZHnJjP
Contributor
Coverage Report for server
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
Coverage Report for web
File CoverageNo changed files found. |
Contributor
Coverage Report for shared
File CoverageNo changed files found. |
Contributor
Coverage Report for widget
File CoverageNo changed files found. |
retrieval_runs の保持期間削除を repository 経由に揃える Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014kkNoEdkn1kVK4La79XFpc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ナレッジ HIL 基盤(計画:
.brain/plans/knowledge-hil-foundation.md)の PR 1。ナレッジ検索 1 回ごとの実行記録を
retrieval_runsに保存し、「なぜこの回答になったか」を後から再現できるようにする。後続の HIL レビュー画面(質問・回答・根拠 chunk の表示)の観測基盤。変更内容
retrieval_runsテーブルと migration 0028 を追加searchKnowledgeに trace 記録を追加(0 件時も記録、best-effort で応答をブロックしない)createRequestContextがanswerRunIdを払い出し、1 回答内の複数検索を束ねるcontentHashを付与(以後の再 index 分から有効)cloudflare:workersの動的 import + waitUntil をlib/wait-until.tsに共通化設計メモ
@mastra/cloudflare-d1が observability ドメイン未対応(公式 docs 明記)で、対応には ClickHouse 等の新インフラが必要なためretrievalTracePendingで INSERT 完了を待ってから UPDATE する形で解消(codex レビュー指摘)未検証
event.response.uiMessagesの assistant ID が feedback のtargetMessage.idと一致することは型と実装からの推定で、ローカル実機での突合は未実施。不一致でも messageId が NULL に留まるだけで他機能への影響は無い🤖 Generated with Claude Code
https://claude.ai/code/session_018BjNFvQjDzMwF8HaZHnJjP