Title: csv_output silently overwrites distinct fields when flattened keys collide · Issue #3865 · github/github-mcp-server · GitHub
Open Graph Title: csv_output silently overwrites distinct fields when flattened keys collide · Issue #3865 · github/github-mcp-server
X Title: csv_output silently overwrites distinct fields when flattened keys collide · Issue #3865 · github/github-mcp-server
Description: 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 silent...
Open Graph Description: 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 nam...
X Description: 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 nam...
Opengraph URL: https://github.com/github/github-mcp-server/issues/3865
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"csv_output silently overwrites distinct fields when flattened keys collide","articleBody":"### Summary\n\nWhen `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.\n\n### Reproduction (from the current implementation)\n\nConvert a list response containing this JSON row through `jsonTextToCSV`:\n\n```json\n[{\"user.login\":\"literal\",\"user\":{\"login\":\"nested\"}}]\n```\n\n`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.\n\nThe 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.\n\n### Expected behavior\n\nDistinct 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.\n\n### Suggested fix\n\nEscape/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).\n\n### Source\n\n- `pkg/github/csv_output.go`: `appendFlattenedCSVFields`, `csvColumnName`, `csvRowsFromArray`, and `withCSVOutput`.\n- `pkg/github/csv_output_test.go`: existing flattening tests cover nested objects, but not colliding flattened names.\n","author":{"url":"https://github.com/apps/sre-agent-mcp-poc","@type":"Person","name":"sre-agent-mcp-poc"},"datePublished":"2026-11-16T10:47:47Z","url":"https://github.com/github/github-mcp-server/issues/3865"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:57213e63-6b21-a8ff-bbff-e3020330aaa7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BFF2:3C042B:801EA9:A65D03:6B062CF1 |
| html-safe-nonce | bcf84fe126b31804fd33b9222f18e55aa90fdf7228ff2475aec7c4f2066f9e69 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkYyOjNDMDQyQjo4MDFFQTk6QTY1RDAzOjZCMDYyQ0YxIiwidmlzaXRvcl9pZCI6IjM3ODU0NTE2Mzk3NjE2MzY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | a056988970bb3ba781869f3977a11f2d4f0d4eea3ce64096cec1e74e35b6bee8 |
| hovercard-subject-tag | issue:6419538504 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/github/github-mcp-server/3865/issue_layout |
| twitter:image | https://opengraph.githubassets.com/08fa340f62563cf655287b421b1f849761e44cec54425af3ac3ae53bf90510d6/github/github-mcp-server/issues/3865 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/08fa340f62563cf655287b421b1f849761e44cec54425af3ac3ae53bf90510d6/github/github-mcp-server/issues/3865 |
| og:image:alt | 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 nam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sre-agent-mcp-poc[bot] |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| turbo-cache-control | no-preview |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 494ea0bb1e0feef734a83e2628697647755e8864 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width