csv_output silently overwrites distinct fields when flattened keys collide
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
pkg/github/csv_output.go、特に appendFlattenedCSVFields と csvColumnName を読み、その後 pkg/github/csv_output_test.go のフラット化テストを確認してください。リテラルのドットを含むキーと、それに相当するネストされたパスを持つ、報告された JSON 行を追加してください。出力が決定的で両方の値を保持するか、その行を損失なしでは表現できないことを明確に報告すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
When csv_output is enabled, list-tool results are converted to CSV by flattening nested objects with .-joined column names. A literal field name containing . can produce the same column name as a nested field. One value is silently overwritten; Go map iteration makes the surviving value unpredictable.
Reproduction (from the current implementation)
Convert a list response containing this JSON row through jsonTextToCSV:
[{"user.login":"literal","user":{"login":"nested"}}]
appendFlattenedCSVFields maps both the top-level user.login and the nested user → login to the same row["user.login"]. The resulting CSV has only one user.login column, containing either literal or nested, depending on map iteration order. The other value is lost.
The conversion is used by withCSVOutput for default list_* tools whenever the csv_output feature flag is enabled (including insiders mode). This is a code-path demonstration, not a claim of a live GitHub API response with these exact fields.
Expected behavior
Distinct JSON fields remain distinguishable in CSV, or the conversion explicitly reports that it cannot represent this row without loss. The chosen output should be deterministic.
Suggested fix
Escape/encode path components when building flattened column names, or detect collisions and use unambiguous names/fail clearly. Add a regression test with both a literal dotted key and an equivalent nested path (and verify neither value is silently dropped).
Source
pkg/github/csv_output.go:appendFlattenedCSVFields,csvColumnName,csvRowsFromArray, andwithCSVOutput.pkg/github/csv_output_test.go: existing flattening tests cover nested objects, but not colliding flattened names.
- 主要言語
- Go
- スター
- 34.4k
- フォーク
- 5.3k
- 平均マージ
- 3日 10時間
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/github-mcp-server のほかの issue
-
update_issue_labels is annotated destructiveHint: false but replaces (removes) existing labels対応中かも @shhhhhhjokerist が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
github/github-mcp-server#3760 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
docs(install-claude): "environment variable" examples put the PAT in argv and the saved config対応中かも @shhhhhhjokerist が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
github/github-mcp-server#3758 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
github/github-mcp-server#3729 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
github/github-mcp-server#3722 ·
メンテナーはふだん 2 日以内に返信
-
Insiders Feedback: PR created UI doesn't link to the PR対応中かも @genius-0963 が 12 日前に担当しました。 オープンbug insiders user-experience
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
github/github-mcp-server#3658 ·
メンテナーはふだん 2 日以内に返信
github/github-mcp-server の issue をすべて見る
似ている issue
-
kind/features
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
TencentBlueKing/bk-nodemgr#4017 ·
メンテナーはふだん 1 日以内に返信
-
ssa: wait errors drop the kstatus message, so health check failures don't say why対応中かも @schdief が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
equinor/radix-operator#2066 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
microsoft/terraform-provider-msgraph#188 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 2 日以内に返信