Repository navigation
Conversation
MinimalLabel dropped the label's id on the typed get_label/list_label round-trip: it declared only name, color and description, so encoding/json silently ignored the legacy id field and re-encoding emitted no id. Add an ID field so the typed output preserves the label's GraphQL id. Fixes github#3923 Co-Authored-By: Claude Code <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported, and the change is supported by projection and round-trip tests plus updated output-schema snapshots.
No open issues 🎉
What changed in this PR
Preserves GraphQL label IDs when legacy get_label and list_label responses are decoded into typed governance outputs and re-encoded.
Changes:
- Added
ID stringtoMinimalLabel. - Added projection and round-trip tests covering retained label IDs.
- Updated
get_labelandlist_labeloutput-schema snapshots.
| File | Description |
|---|---|
| pkg/github/typed_governance_outputs.go | Adds the label ID field to the typed governance output model. |
| pkg/github/typed_governance_outputs_test.go | Verifies label IDs survive typed decoding and re-encoding. |
| pkg/github/__toolsnaps__/list_label.snap | Documents the required id property in the list_label output schema. |
| pkg/github/__toolsnaps__/get_label.snap | Documents the required id property in the get_label output schema. |
Review effort: Lite (adaptive)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve the label's
idon the typedget_label/list_labeloutputs so a round-trip through the typed model no longer drops it.Why
MinimalLabeldeclared onlyname,color, anddescription, soencoding/jsonsilently ignored the legacyidfield and re-encoding emitted noid.Fixes #3923
What changed
ID stringtoMinimalLabel(the legacylist_label/get_labelproducers emit the GraphQL label id as a string).TestListLabelsOutputRetainsIDasserting the id survives a typed decode/re-encode.get_label/list_labeltool-schema snapshots.MCP impact
get_labelandlist_labelnow include the labelidin their typed output and output schema.Prompts tested (tool changes only)
TestListLabelsOutputRetainsIDandTestTypedGovernanceWireOutputs.Security / limits
Tool renaming