Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

tier synthesis: fetch to a third-party absolute URL links to the project's own route with the same path

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

メンテナーはふだん 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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

colbymchenry/codegraph のほかの issue

colbymchenry/codegraph の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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