Skip to content

Remove thread_resolution_reason feature flag - #3727

Open
cagesellchen wants to merge 5 commits into
mainfrom
cagesellchen-remove-thread-resolution-reason-ff
Open

cagesellchen wants to merge 5 commits into
mainfrom
cagesellchen-remove-thread-resolution-reason-ff

Conversation

@cagesellchen

@cagesellchen cagesellchen commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes: https://github.com/github/copilot-voyager/issues/1145
Closes: https://github.com/github/copilot-voyager/issues/1154

Summary

Removes the globally enabled thread_resolution_reason feature flag. pull_request_review_write and resolve_review_thread now always accept resolutionReason. GHES is the exception and still omits it.

Why

Fixes https://github.com/github/copilot-voyager/issues/1154 (part of https://github.com/github/copilot-voyager/issues/1145)

The flag is globally enabled on github.com. Deploy ordering: this PR must deploy before the github/github PR that deletes the devportal flag. Until then, the remote server picks the tool variant based on that flag, so the resolution-reason variant would disappear once the flag is deleted.

What changed

  • Removed FeatureFlagThreadResolutionReason and its entry in the AllowedFeatureFlags allowlist.
  • PullRequestReviewWrite(t, opts...) and GranularResolveReviewThread(t, opts...) are now single host-aware constructors.
    • They include resolutionReason unless the host is GHES.
    • They use the plain consolidated and granular feature rules.
  • Removed PullRequestReviewWriteWithResolutionReason and GranularResolveReviewThreadWithResolutionReason. They registered the duplicate flag-gated variants.
  • Replaced the two *_resolution_reason.snap toolsnaps with the base snaps, which are now byte-identical to the old reason variants.
  • Tests now cover dotcom (reason present) and GHES (reason absent) for both the consolidated and granular tools.
  • Regenerated README.md and docs/feature-flags.md.
  • Fixed a bug that predates this PR (from Expose Copilot review thread resolution reasons #3123): ResolveReviewThreadWithReason now sends resolution reasons as GraphQL enum names (addressed becomes ADDRESSED, wont-fix becomes WONT_FIX, invalid becomes INVALID) and treats "" as no reason. Before this, the API rejected the lowercase values.

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed: on non-GHES hosts, resolutionReason is now always present on pull_request_review_write and resolve_review_thread. Previously it only appeared when the flag was on, which is globally the case today.
  • New tool added

Prompts tested (tool changes only)

  • Not tested with live prompts. The schema and handler behavior are covered by unit tests. The tool schemas match the flag-on behavior, and the only runtime change is the enum mapping of resolution reasons described above.

Security / limits

  • No security or limits impact: this removes flag gating and fixes how resolution reasons are sent to the GraphQL API.
  • Auth / permissions considered
  • 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

Note: if you're renaming tools, you must add the tool aliases. For more information on how to do so, please refer to the official docs.

Lint & tests

  • Linted locally with ./script/lint: passed, 0 issues.
  • Tested locally with ./script/test: passed.

Docs

  • Not needed
  • Updated (README / docs / examples): regenerated with script/generate-docs.

The flag is globally enabled, so resolution reasons are now always
available on pull_request_review_write and resolve_review_thread.
GHES still omits the resolutionReason input because it does not
support it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@cagesellchen
cagesellchen marked this pull request as ready for review November 6, 2026 22:37
@cagesellchen
cagesellchen requested a review from a team as a code owner November 6, 2026 22:37
Copilot AI auto review requested due to automatic review settings November 6, 2026 22:37

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.

🟢 Approval recommended

No active review issues remain for the change to enable resolution reasons by default.

No open issues 🎉

What changed in this PR

Removes the globally enabled thread_resolution_reason flag from the GitHub MCP Server. Both review-thread tools now expose resolutionReason by default, while continuing to omit it on GitHub Enterprise Server (GHES).

Changes:

  • Replaces flag-gated variants with single host-aware constructors and simplifies registration.
  • Updates tests to cover default resolution-reason support and GHES omission.
  • Refreshes documentation and base schema snapshots, removing obsolete variant snapshots.
File Description
README.md Documents the default resolutionReason parameter.
pkg/​github/​typed_granular_pull_request_outputs_test.go Adapts granular schema and output tests to host-based behavior.
pkg/​github/​typed_consolidated_pull_request_outputs_test.go Removes duplicate variant setup from consolidated tests.
pkg/​github/​tools.go Registers one host-aware constructor per affected tool.
pkg/​github/​pullrequests.go Enables consolidated resolution reasons except on GHES.
pkg/​github/​pullrequests_test.go Tests default reason forwarding and GHES omission.
pkg/​github/​pullrequests_granular.go Enables granular resolution reasons except on GHES.
pkg/​github/​granular_tools_test.go Updates granular handler tests for host-based behavior.
pkg/​github/​feature_flags.go Removes the flag constant and allowlist entry.
pkg/​github/​feature_flags_test.go Replaces flag-on/off cases with default and GHES cases.
pkg/​github/​__toolsnaps__/​resolve_review_thread.snap Adds the default resolution-reason input.
pkg/​github/​__toolsnaps__/​resolve_review_thread_resolution_reason.snap Deletes the obsolete granular variant snapshot.
pkg/​github/​__toolsnaps__/​pull_request_review_write.snap Adds the default resolution-reason input.
pkg/​github/​__toolsnaps__/​pull_request_review_write_resolution_reason.snap Deletes the obsolete consolidated variant snapshot.
docs/​feature-flags.md Removes the retired flag section and updates granular parameters.

Review effort: Balanced (auto)

Comment thread pkg/github/pullrequests.go Resolved
The resolveReviewThread mutation expects ADDRESSED, WONT_FIX or
INVALID, but the tools forwarded the lowercase input values unchanged.
Map them to enum names and treat an empty reason as none.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
obvioussean
obvioussean previously approved these changes Nov 7, 2026

@scotttesler scotttesler left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The note above the review-write tool's input still says the resolution reason field belongs only to a separate flag-gated version of the tool. That version is gone, and the single tool now decides by host instead. I'd delete those two lines rather than reword them, since the host rule already lives with the tool.

The PR body says "the flag-on behavior is unchanged" and that "this only removes flag gating." The new reason mapping changes what gets sent to GitHub when a reason is given, so those two lines could use an update.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@cagesellchen

cagesellchen commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@scotttesler thanks for the review.

  • I've kept the note above PullRequestReviewWriteInput so this PR stays limited to removing the flag.
  • I updated the PR body so it no longer says the flag-on behavior is unchanged, and it calls out the enum mapping as the one runtime change.

obvioussean
obvioussean previously approved these changes Nov 10, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
obvioussean
obvioussean previously approved these changes Nov 10, 2026
Empty reasons are still accepted and treated as none.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@det det left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm

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.

5 participants