Skip to content

hotfix(poller, mcp): drop spurious /master/ branch segment from wiki raw URL (#132, patch)#133

Merged
liplus-lin-lay merged 1 commit into
mainfrom
132-hotfix-wiki-raw-url-has-spurious-branch-segment-causing-404
Apr 26, 2026
Merged

hotfix(poller, mcp): drop spurious /master/ branch segment from wiki raw URL (#132, patch)#133
liplus-lin-lay merged 1 commit into
mainfrom
132-hotfix-wiki-raw-url-has-spurious-branch-segment-causing-404

Conversation

@liplus-lin-lay
Copy link
Copy Markdown
Member

概要

#131 deploy 後の :45 cron 実機観測で wiki ingestion の全 page が 404 で失敗していることが判明。GitHub Wiki raw URL pattern に `/master/` を含めたのが原因。

観測 (literal)

```
Liplus-Project/github-rag-mcp wiki: 6 pages, 0 embedded, 0 unchanged, 6 failed, 0 deleted
No content fetched for Liplus-Project/github-rag-mcp/wiki/installation.ja (all extensions 404)
fetchWikiContent probe md failed for Liplus-Project/liplus-language/e.-...
fetchWikiContent probe markdown failed for Liplus-Project/liplus-language/e.-...
```

`Too many subrequests` は #131 で解消、新たな 404 layer のみ残存。

根本原因

```
raw.githubusercontent.com/wiki/{repo}/master/{page}.md → 404
raw.githubusercontent.com/wiki/{repo}/main/{page}.md → 404
raw.githubusercontent.com/wiki/{repo}/{page}.md → 200
```

GitHub Wiki raw URL は branch segment を取らない仕様。W4 (#129) 実装で `git ls-remote` の `master` ref から類推して `/master/` を URL に入れたのが間違い。git protocol 内部の話で raw routing は branch を含まない。

修正

URL string 1 行を 2 ファイル:

  • `src/poller.ts` `fetchWikiContent` (cron-side ingestion)
  • `src/mcp.ts` `inlineDocContent` (search-time include_content for wiki rows)

加えてコメント 1 箇所を branch-less pattern に更新。

バージョン

patch (v0.8.5 milestone) — #131 と同 hotfix milestone。

関連

…raw URL (#132)

#131 deploy 後の :45 cron 実機観測で発覚:
  Liplus-Project/github-rag-mcp wiki: 6 pages, 0 embedded, 6 failed
  No content fetched for ... (all extensions 404)

raw.githubusercontent.com/wiki/{repo}/master/{page}.md → 404
raw.githubusercontent.com/wiki/{repo}/{page}.md         → 200

GitHub Wiki raw URL は branch segment を取らない仕様。W4 (#129) 実装で
git ls-remote が `master` ref を返すことから類推して `/master/` を URL に
入れていたが、これは git protocol 内部の話で raw routing は branch を
含まない。

修正は URL string 1 行を 2 ファイルで:
- src/poller.ts fetchWikiContent (cron-side ingestion)
- src/mcp.ts inlineDocContent (search-time include_content)

コメント 1 箇所も branch-less URL pattern に更新。

Closes #132
@liplus-lin-lay liplus-lin-lay linked an issue Apr 26, 2026 that may be closed by this pull request
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
github-rag-mcp ba5e1cb Apr 26 2026, 02:00 AM

Copy link
Copy Markdown
Member Author

@liplus-lin-lay liplus-lin-lay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI 自己レビュー (auto, patch hotfix #2)。1 行 × 2 ファイルの URL pattern 修正、tsc / CI / Workers Builds 全 pass。実機観測 (#131 deploy 後 :45 cron) で 404 全 page を確認した直接 fix。gh pr merge --squash で進める。

@liplus-lin-lay liplus-lin-lay merged commit 002ef18 into main Apr 26, 2026
3 checks passed
@liplus-lin-lay liplus-lin-lay deleted the 132-hotfix-wiki-raw-url-has-spurious-branch-segment-causing-404 branch April 26, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hotfix: wiki raw URL has spurious branch segment causing 404

1 participant