Title: ListLabelsOutput drops every label id from the typed response · Issue #3923 · github/github-mcp-server · GitHub
Open Graph Title: ListLabelsOutput drops every label id from the typed response · Issue #3923 · github/github-mcp-server
X Title: ListLabelsOutput drops every label id from the typed response · Issue #3923 · github/github-mcp-server
Description: ListLabelsOutput drops every label id from the typed response Summary The legacy list_label producer serializes each label's id, but the typed ListLabelsOutput decodes into MinimalLabel, which has no id field. A round-trip through the ty...
Open Graph Description: ListLabelsOutput drops every label id from the typed response Summary The legacy list_label producer serializes each label's id, but the typed ListLabelsOutput decodes into MinimalLabel, which has ...
X Description: ListLabelsOutput drops every label id from the typed response Summary The legacy list_label producer serializes each label's id, but the typed ListLabelsOutput decodes into MinimalLabel, which ...
Opengraph URL: https://github.com/github/github-mcp-server/issues/3923
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ListLabelsOutput drops every label id from the typed response","articleBody":"# `ListLabelsOutput` drops every label id from the typed response\n\n## Summary\n\nThe legacy `list_label` producer serializes each label's `id`, but the typed `ListLabelsOutput` decodes into `MinimalLabel`, which has no `id` field. A round-trip through the typed output therefore removes every label id.\n\n## Location\n\n- Repository: `github/github-mcp-server`\n- File: `pkg/github/typed_governance_outputs.go`\n- Line: 16 (`MinimalLabel`; decode at 461)\n- Revision: `e3809fe91c75`\n\n## Affected code\n\n```go\ntype MinimalLabel struct {\n Name string `json:\"name\"`\n Color string `json:\"color\" jsonschema:\"Hex RGB without leading #.\"`\n Description string `json:\"description\"`\n}\n\ntype ListLabelsOutput struct {\n Labels []MinimalLabel `json:\"labels\"`\n TotalCount int `json:\"totalCount\" jsonschema:\"Total labels in the repository.\"`\n PageInfo MinimalPageInfo `json:\"pageInfo\"`\n}\n```\n\nThe legacy JSON carries `id`, but the typed struct has no destination for it.\n\n## Expected behavior\n\nA typed `ListLabelsOutput` preserves the legacy label identity. Round-tripping:\n\n```json\n{\"labels\":[{\"id\":123,\"name\":\"bug\",\"color\":\"ff0000\",\"description\":\"\"}],\"totalCount\":1,\"pageInfo\":{}}\n```\n\nmust keep `id: 123`, or the typed output must not be used for a lossless interpretation of the legacy response.\n\n## Actual behavior\n\nRunning a round-trip test in Docker:\n\n```sh\ndocker run --rm -v \"$PWD:/app\" -v /tmp/gomod:/go/pkg/mod -v /tmp/gocache:/root/.cache/go-build -w /app -e GOFLAGS=-mod=mod golang:1.26 bash -c 'go mod download && go test ./pkg/github -run TestListLabelsDropsID -v'\n```\n\nObserved:\n\n```text\nroundtrip={\"labels\":[{\"name\":\"bug\",\"color\":\"ff0000\",\"description\":\"\"}],\"totalCount\":1,\"pageInfo\":{\"hasNextPage\":false,\"hasPreviousPage\":false}}\n--- PASS: TestListLabelsDropsID\n```\n\n`id` is gone after the typed decode/encode.\n\n## Root cause\n\n`MinimalLabel` declares only `name`, `color`, and `description`. `encoding/json` silently ignores the legacy `id` field, and re-encoding the typed value emits no `id`.\n\nThe current default branch still has the same `MinimalLabel` definition.\n\n## Suggested fix\n\nAdd the identity field to the typed model:\n\n```go\ntype MinimalLabel struct {\n ID int64 `json:\"id\"`\n Name string `json:\"name\"`\n Color string `json:\"color\" jsonschema:\"Hex RGB without leading #.\"`\n Description string `json:\"description\"`\n}\n```\n\nand include it in the output schema. Add a round-trip test asserting `id` survives.\n","author":{"url":"https://github.com/soarkit","@type":"Person","name":"soarkit"},"datePublished":"2026-11-22T09:11:18Z","url":"https://github.com/github/github-mcp-server/issues/3923"}
| 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:ed4c9c06-4b1b-e3a2-d45f-5c3c617e9a77 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2B8:15F7F4:74DAC9:979EC0:6B06287D |
| html-safe-nonce | 2d6c65f2b970f4437bee0b92e5df054482d6fa7b0d64491cacf6ffe8653a1985 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkI4OjE1RjdGNDo3NERBQzk6OTc5RUMwOjZCMDYyODdEIiwidmlzaXRvcl9pZCI6IjYyOTU0NTM2MTU2MjA3NjE3MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 51bd0df45e15ebf2d268272d9c019cc15735e6b9e8fbf2849b07c853d02796a3 |
| hovercard-subject-tag | issue:6540641698 |
| 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/3923/issue_layout |
| twitter:image | https://opengraph.githubassets.com/27cb3ead79d90ba9c740dcfeac4efc89f38d306cb5a01c0f192c93debbf4d35c/github/github-mcp-server/issues/3923 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/27cb3ead79d90ba9c740dcfeac4efc89f38d306cb5a01c0f192c93debbf4d35c/github/github-mcp-server/issues/3923 |
| og:image:alt | ListLabelsOutput drops every label id from the typed response Summary The legacy list_label producer serializes each label's id, but the typed ListLabelsOutput decodes into MinimalLabel, which has ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | soarkit |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9e10bb0ecc0bd0f8692aa89586ee9b54e498d7ab9f244a44cdb5b93653a125ce |
| 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 | 32e57d5cc2ce6ce92ec6dceb65858344750c27c2 |
| 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