Skip to content

Fix issue_write silently dropped label errors - #3195

Merged
SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums-fix-issue-write-label-errors
Sep 1, 2026
Merged

SamMorrowDrums merged 1 commit into
mainfrom
sammorrowdrums-fix-issue-write-label-errors

Conversation

@SamMorrowDrums

Copy link
Copy Markdown
Collaborator

Summary

Detect when GitHub accepts an issue create or update request but omits requested labels, and return a precise partial-failure result instead of reporting success.

Why

GitHub can silently ignore labels when the caller lacks AddLabelsToLabelable permission while still creating or updating the issue successfully.

Fixes #3160

What changed

  • Compare requested labels with the authoritative label set returned by the existing create/PATCH response, without an additional readback.
  • Return an MCP error containing the issue URL plus requested, applied, missing, and unexpected labels; cover create, update, and failed label clearing with focused tests.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed — issue_write now reports partial failure when requested labels are not applied.
  • New tool added

Prompts tested (tool changes only)

Security / limits

  • No security or limits impact
  • Auth / permissions considered — the error identifies AddLabelsToLabelable as a likely permission boundary without claiming it is the only possible cause.
  • Data exposure, filtering, or token/size limits considered

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed — the input schema is unchanged.
  • Updated (README / docs / examples)

Compare requested labels with the authoritative issue returned by create and update writes, and return a precise partial-failure result when GitHub omits them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@SamMorrowDrums
SamMorrowDrums requested a review from a team as a code owner September 1, 2026 08:18
Copilot AI balanced review requested due to automatic review settings September 1, 2026 08:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation correctly detects label mismatches and includes focused regression coverage.

Review tier: Balanced
Findings: None

What changed in this PR

Adds partial-failure detection when issue_write silently fails to apply requested labels.

Changes:

  • Compares requested and returned label sets.
  • Reports missing/unexpected labels with the issue URL.
  • Adds focused create, update, and label-clearing tests.
File Description
pkg/​github/​issues.go Adds label reconciliation and partial-failure responses.
pkg/​github/​issues_test.go Tests unapplied-label scenarios without readback requests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@SamMorrowDrums
SamMorrowDrums merged commit 7b6646c into main Sep 1, 2026
20 checks passed
@SamMorrowDrums
SamMorrowDrums deleted the sammorrowdrums-fix-issue-write-label-errors branch September 1, 2026 13:15
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
github-mcp-server 1.12.0

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## Highlights

- **New governance tools for agents.** Read and manage repository rulesets and custom properties across repository, organization, and enterprise levels.
- **Faster, safer feature flags.** Functional availability rules evaluate lazily after static filtering, deduplicate checks per request, and preserve precise availability errors.
- **Safer write operations.** Pin merge HEADs, recover file SHAs, use least-privilege public-repository access, and detect silently dropped labels.
- **Richer review and discovery support.** Adds review range coordinates, thread resolution reasons, projected-header preflights, Server Card support, and Agent Plugins.
- **Better content fidelity.** Markdown bodies, titles, release notes, comments, and commit messages preserve visible content while filtering unsafe invisible characters.

## What's Changed
* Remove documentation for unavailable tool-search command by @tommaso-moro in github/github-mcp-server#3162
* Expose Copilot review thread resolution reasons by @cagesellchen in github/github-mcp-server#3123
* fix(repos): give create_or_update_file callers a SHA they can actually get by @dylanpulver in github/github-mcp-server#3131
* fix: allow public_repo for public contribution tools by @paulcakeface in github/github-mcp-server#3140
* Enable feature flags via URL query parameter (?features=) for headerless hosted connections by @CAOShurong in github/github-mcp-server#3146
* Add expectedHeadSha pinning to merge_pull_request by @jcosta1970 in github/github-mcp-server#3182
* Fix e2e harness compilation against go-github v89 and go-sdk v1.7 by @ppoffice in github/github-mcp-server#3187
* Return range coordinates for review comments by @yiheng-kkk in github/github-mcp-server#3193
* Fix issue_write silently dropped label errors by @SamMorrowDrums in github/github-mcp-server#3195
* fix(http): allow projected MCP headers in preflights by @SamMorrowDrums in github/github-mcp-server#3167
* Spell perPage the same way in every paginated tool by @karpovantonme in github/github-mcp-server#3142
* Add MCP Server Card (SEP-2127) types + handler by @SamMorrowDrums in github/github-mcp-server#2768
* Refactor feature flags to use functional availability rules by @SamMorrowDrums in github/github-mcp-server#3166
* feat(governance): add repository ruleset tools with multi-level scope challenge by @SamMorrowDrums in github/github-mcp-server#2991
* feat(governance): add custom properties tools by @SamMorrowDrums in github/github-mcp-server#2992
* Fix HTML entities in sanitized titles by @SamMorrowDrums in github/github-mcp-server#3216
* build(deps): bump fast-uri from 3.1.5 to 3.1.7 in /ui in the npm_and_yarn group across 1 directory by @dependabot[bot] in github/github-mcp-server#3208
* build(deps): bump the npm_and_yarn group across 1 directory with 2 updates by @dependabot[bot] in github/github-mcp-server#3217
* build(deps): bump github/codeql-action from 4.37.4 to 4.37.9 by @dependabot[bot] in github/github-mcp-server#3192
* feat: add Agent Plugins 1.0 package by @777genius in github/github-mcp-server#3169
* fix(sanitize): preserve Markdown body fidelity on read surfaces by @SamMorrowDrums in github/github-mcp-server#3177
* build(deps): bump actions/stale from 10 to 11 by @dependabot[bot] in github/github-mcp-server#3003
* Fix main CI sanitizer integration by @SamMorrowDrums in github/github-mcp-server#3219

## New Contributors
* @cagesellchen made their first contribution in github/github-mcp-server#3123
* @paulcakeface made their first contribution in github/github-mcp-server#3140
* @CAOShurong made their first contribution in github/github-mcp-server#3146
* @jcosta1970 made their first contribution in github/github-mcp-server#3182
* @ppoffice made their first contribution in github/github-mcp-server#3187
* @yiheng-kkk made their first contribution in github/github-mcp-server#3193
* @karpovantonme made their first contribution in github/github-mcp-server#3142
* @777genius made their first contribution in github/github-mcp-server#3169

**Full Changelog**: https://github.com/github/github-mcp-server/compare/v1.11.0...v1.12.0</pre>
  <p>View the full release notes at <a href="https://github.com/github/github-mcp-server/releases/tag/v1.12.0">https://github.com/github/github-mcp-server/releases/tag/v1.12.0</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!18304
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github_issue_write silently drops labels when caller lacks AddLabelsToLabelable permission

2 participants