tier synthesis: fetch to a third-party absolute URL links to the project's own route with the same path
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- express, node.js, typescript
- 領域
- tooling
調査の方向性
src/resolution/tier-synthesizer.ts の L473-L474 付近から始めてください。ここでは絶対 URL のホストが破棄され、マッチングにはそのパスのみが保持されます。clientPath の導出方法を変更する前に、周辺の cross-tier な fetch-to-route マッチングロジックと、合成された fetch エッジに関する既存のテストを読んでください。完了条件は、https://api.github.com/users/x のようなサードパーティの絶対 URL がプロジェクトのルートエッジを生成しない一方で、プロジェクト自身の baseURL、ループバック、または配信ホスト上の URL は引き続きリンクされることです。そのケースの回帰テストを追加または更新してください。
索引モデルが issue の本文から書いたものです。
説明
The cross-tier pass links a fetch to an absolute URL on another host to a route of the project's own server, because the URL's host is discarded before matching.
// package.json: { "dependencies": { "express": "^4.0.0" } }
// src/server.js
const app = require('express')()
function getUser (req, res) { res.json({}) }
app.get('/users/:id', getUser)
// src/client.js
async function loadGithubProfile (name) { return fetch(`https://api.github.com/users/${name}`) }
async function loadOwn (id) { return fetch(`/users/${id}`) }
edge on main (synthesized) |
expected |
|---|---|
loadOwn → GET /users/:id ✓ |
same |
loadGithubProfile → GET /users/:id ✗ |
none (GitHub's API, not this server) |
Cause. tier-synthesizer.ts#L473-L474: clientPath keeps only the path of an absolute URL (if (absolute) p = absolute[1] ?? '/'), so https://api.github.com/users/x matches like /users/x.
Reproduced on main at 77ee3484 with CODEGRAPH_KERNEL=0. Linux/WSL2, Node 22.23.2.
Expected. An absolute URL with a literal host links to a project route only when that host is the project's own: the configured baseURL, localhost/loopback, or a host the project itself serves. Third-party APIs (api.github.com, api.stripe.com, …) share common REST paths like /users/:id, so every call to them currently lands on the project's handler.
- 主要言語
- C
- スター
- 73.2k
- フォーク
- 4.7k
- 平均マージ
- 3時間 15分
- マージ済み PR(30日)
- 576
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
colbymchenry/codegraph のほかの issue
-
mcp: a projectPath naming a file inside a project returns isError ("Path is not a directory")対応中かも @maxmilian が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
colbymchenry/codegraph#2982 ·
メンテナーはふだん 1 日以内に返信
-
mcp: a non-object tools/call arguments crashes the handler and is reported as an internal error to retry対応中かも @kjgggggg が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
colbymchenry/codegraph#2981 ·
メンテナーはふだん 1 日以内に返信
-
search: FTS special characters are deleted, not separated, so leaf(entry) matches nothing対応中かも @kjgggggg が 2 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
colbymchenry/codegraph#2971 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
colbymchenry/codegraph#2959 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
TypeScript: an import resolves to a same-named method of an exported object literal instead of the exported function対応中かも @inth3shadows が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
colbymchenry/codegraph#2945 ·
メンテナーはふだん 1 日以内に返信
colbymchenry/codegraph の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ly05010419/MacNativeGames#1420 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
JustAResearcher/gpu-unlock-ada#124 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
swoole/swoole-cli#1092 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
inflate: total_in uses plain += on c_ulong (32-bit on Windows), panics in debug for streams > 4 GiBオープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
trifectatechfoundation/zlib-rs#570 · コメント 1 件 ·