Repository navigation
feat(ingest): index comments, PR reviews, inline comments (minor) - #107
Merged
Merged
Conversation
…r memory DB
判断履歴の主要容器であるコメント欄を ingest 対象に追加する。issue_comment /
pull_request_review / pull_request_review_comment を新 type として扱い、
bot (`sender.login` が `[bot]` で終わる) と trim 後 10 文字未満の body は ingest
時点で除外する。埋め込み入力は `author\n\n{body}` とし、speaker 文脈を dense
ベクトルに残す。search_issues の type enum に 3 値を追加し、scan mode も新規
recent endpoints を叩いて aggregation する。poller には per-repo 上位 20 parent
issue/PR について comments / reviews / review_comments を backfill する経路を
追加し、API fan-out と embedding 回数を別々に cap する。
Closes #106
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
github-rag-mcp | a132925 | Apr 23 2026, 11:36 AM |
liplus-lin-lay
commented
Apr 23, 2026
liplus-lin-lay
left a comment
Member
Author
There was a problem hiding this comment.
AI セルフレビュー (auto / minor)
Now — なし
Later
- GitHub App "Subscribe to events" で Issue comment / Pull request review / Pull request review comment を有効化 (本 PR merge + Workers Build 自動 deploy 直後にブラウザから実施)
- 判断記録: 記憶 DB 設計 (
docs/f.-*.md) への固定化は merge 後に別 issue で - v0.9.0 release (human-gated)
Accepted
state型をstringに緩和 (review stateAPPROVED等を受容) — 既存 FTS filter enum は据え置き、type filter で十分切り分け可能- bodyHash に
author\n\nstateを title 代わりに使う (PR review) /author\n{path}:{line}(inline review comment) — state 変更 / 行移動を変更検知対象にする設計 MAX_COMMENTS_EMBEDDED_PER_REPO=30を既存MAX_EMBEDDINGS_PER_RUN=50とは独立予算に — Workers AI rate budget を超えない安全側
検証項目
| 項目 | 結果 |
|---|---|
bot filter /\[bot\]$/ regex |
✅ isBotSender helper、3 ingest 関数すべてで呼ばれる |
| 10 文字未満スキップ | ✅ isBodyTooShort helper + MIN_COMMENT_BODY_CHARS 定数 |
embedding input = {author}\n\n{body} |
✅ prepareCommentEmbeddingInput |
webhook 3 case 追加 (issue_comment / pull_request_review / pull_request_review_comment) |
✅ switch 拡張 + 3 handler |
| 削除伝播 (deleted / dismissed) | ✅ IssueStore + Vectorize + FTS5 の 3 面 |
| poller backfill (per-repo 20 parent / 30 comment cap) | ✅ pollComments 新設 |
| type enum 拡張 (3 値追加) | ✅ zod + ScanRow + VectorMetadata |
| scan mode aggregation に 3 type 追加 | ✅ |
| IssueStore 3 新テーブル + 10 endpoint | ✅ |
| README / README.ja type 表分離 + 使用例 | ✅ |
| tsc --noEmit clean | ✅ |
| wrangler deploy --dry-run clean | ✅ |
| PR title ASCII / body 日本語 / Closes #106 | ✅ |
| CI 全 pass (test / CI / Workers Builds) | ✅ |
| mergeable | ✅ CLEAN |
判定
Approve — 記憶 DB (Lin/Lay 外部記憶) としての設計意図 (Master 2026-04-23) に沿い、permission と実装のギャップ (コメント読取不可) を閉じる構造変更。auto / minor のため AI merge で進める。merge 後に Workers Build auto deploy → GitHub App event subscribe flip の順で運用化。
This was referenced Apr 23, 2026
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.
目的
github-rag-mcpを Lin/Lay の記憶 DB として機能させるため、判断履歴の主要容器であるコメント系を ingest 対象に追加した。これまで issue/PR body + commit + release + docs しか入っておらず、コメント欄に残る判断履歴 (Master の指摘、AI 応答、セルフレビューの now/later/accepted 分類) が retrieval から欠落していた状態を解消する。変更概要
新規 ingest 対象
issue_comment(issues + PRs 共通の top-level)issue_commentpull_request_review(submitted / edited / dismissed)pr_reviewpull_request_review_comment(created / edited / deleted)pr_review_commentフィルタ
sender.loginが[bot]で終わる場合は ingest しない (CI bot、dependabot、liplus-rag-mcp[bot] など)body.trim().length < 10は skip (LGTM / +1 / 絵文字のみ等のノイズ排除)pipeline (src/pipeline.ts)
isBotSender(login)/isBodyTooShort(body)/prepareCommentEmbeddingInput(author, body)ingestIssueComment/ingestPRReview/ingestPRReviewComment{author}\n\n{body}で speaker 文脈を dense ベクトルに残すwebhook (src/webhook.ts)
eventTypeswitch に 3 case 追加deleted/dismissedでは IssueStore + Vectorize + D1 FTS5 の 3 面から削除伝播poller (src/poller.ts)
/issues/{N}/comments//pulls/{N}/reviews//pulls/{N}/commentsを backfillstore (src/store.ts)
issue_comments/pr_reviews/pr_review_comments+ 関連 index/upsert-comment//comment//recent-comments/ 同 review / 同 review-commentresetForReEmbedに 3 table も含めるsearch_issues (src/mcp.ts)
typeenum にissue_comment/pr_review/pr_review_commentを追加docs
README.md/README.ja.mdの type 表を新 3 値含む形に拡張テスト
npx tsc --noEmitpassnpx wrangler deploy --dry-runpassリリース後の手動ステップ
merge 後、Master が GitHub App ダッシュボード (https://github.com/settings/apps/liplus-rag-mcp/permissions) の "Subscribe to events" で以下を有効化する必要あり:
poller の next tick で既存 comment は backfill される。webhook による realtime ingest は購読設定後から効く。
Closes #106