Skip to content

[mgmt] improve mgmt-review workflow - #39870

Closed
ZiWei Chen (kazrael2119) wants to merge 8 commits into
Azure:mainfrom
kazrael2119:improve-mgmt-workflow
Closed

ZiWei Chen (kazrael2119) wants to merge 8 commits into
Azure:mainfrom
kazrael2119:improve-mgmt-workflow

Conversation

@kazrael2119

@kazrael2119 ZiWei Chen (kazrael2119) commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

improve mgmt-review workflow:

improve check logic

  • when the mgmt auto pr created, auto trigger review workflow without mgmt-needed label(still add in-progress and added label),

Management Review Workflow

  • Add checks: read and issues: write permissions.
  • Add wait_for_comilot_review boolean input.
  • When a PR is explicitly dispatched after creation, poll the copilot pull request viewer check:
    • Check every 15 seconds.
    • Check up to 40 times, which is 10 minutes.
  • After completing the Copilot review:
    • Resolve all unresolved review threads containing Copilot comments.
  • Waiting for timeout:
    • Only record warnings.
    • Skip resolve and unassign.
    • Do not let the workflow fail and continue with the management review.
  • Manually tagging or manually dispatching without waiting requirements, still execute resolve/unasign directly.
  • Keep the original mgmt review added → mgmt review in progress tag switch.

Management Review Guidelines

  • The stable/preview channels of package and API version must be consistent in both directions.
  • The first release must be a preview package, but its API version channel is not checked.
  • The stable changelog does not require Comparing with version X.Y.Z.
  • Promise<T>or Promise<T | undefined>becomes Promise<T | void>is not reported.
  • Always report as a public API design issue when deleting client operation group parameters.
  • When Promise<T>becomes PollerLike<OperationState<void>, void>, report .
  • When determining whether CHANGELOG is missing Breaking Changes, compare according to the applicable comparison baseline.
  • The above baseline rules apply to all new versions, including stable and preview.
  • If APIs such as interface, enum, model, operation group, method, property, etc. are marked as new by the intervening changelog after the baseline, their subsequent deletion does not count as breaking changes relative to the baseline.
  • This CHANGELOG judgment will not override specific public API design rules.
  • Add a comment in CHANGELOG to hint reviewer to prepare pipeline when a new package is generated
  • Compare and report breaking change gaps between two major version
  • Add a lint check about unexpected change: import type {} to import {}

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
9 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Comment thread .github/workflows/event-processor.yml Outdated
Copilot AI balanced review requested due to automatic review settings September 14, 2026 07:16

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.

🟡 Changes recommended

The generated workflow is stale, the Copilot author match is incorrect, and the described Event Processor integration is missing.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Improves management SDK reviews by coordinating Copilot review completion and expanding API review guidance.

Changes:

  • Adds optional Copilot review polling and cleanup.
  • Expands versioning and breaking-change rules.
  • Regenerates the executable workflow.
File summaries
File Description
.github/workflows/mgmt-review.md Adds Copilot waiting and cleanup steps.
.github/workflows/mgmt-review.lock.yml Updates generated workflow output.
.github/prompts/mgmt-review-guidelines.md Adds management review rules.
Review details
  • Files reviewed: 2/3 changed files
  • Comments generated: 4
  • Review effort level: Balanced

Comment thread .github/workflows/mgmt-review.lock.yml Outdated
Comment thread .github/workflows/mgmt-review.md
Comment on lines +97 to +99
const hasCopilotComment = thread.comments.nodes.some(
(comment) => comment.author?.login === 'Copilot',
);

For every new package version, whether stable or preview, evaluate missing `Breaking Changes` entries against the applicable CHANGELOG comparison baseline defined above, not against APIs introduced only after that baseline. When any public API symbol or member appears to have been removed, inspect the intervening `CHANGELOG.md` entries after the comparison baseline and before the new version. This applies to operation groups, interfaces, enums, models, methods, properties, and other public API elements. If one of those entries records that the same API was added after the baseline (for example, `Added operation group <name>`, `Added interface <name>`, or `Added enum <name>`), its removal is not a breaking change relative to that baseline. Do not report a missing `Breaking Changes` entry for that removal. This check only determines whether the new changelog entry is missing a breaking-change entry; it does not override any specific public API design rules below.

When the new version is a beta release for a new major version and its latest `CHANGELOG.md` entry contains breaking changes, find the most recent earlier beta release in the same major-version series whose entry also contains breaking changes. For example, compare `4.0.0-beta.3` with `4.0.0-beta.2` or `4.0.0` with `4.0.0-beta.2`, but do not compare beta releases from different major-version series. Compare the two `Breaking Changes` lists and leave an inline comment on the new version line that identifies entries added to or removed from the list. If the lists have no differences, or no earlier beta in the same major-version series contains breaking changes, do not leave this comparison comment.
Copilot AI review requested due to automatic review settings September 15, 2026 09:35

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.

🟡 Changes recommended

The generated workflow is stale, and the new resolution, unassignment, and label-transition paths are incomplete.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (3)

Previously missed (1) — in code that hasn't changed since the last review.

.github/workflows/mgmt-review.md:113

  • This step ends after resolving threads and never removes the copilot-swe-agent[bot] assignee. Once the lock file is correctly regenerated, both completed waits and direct/manual runs will omit the unassign behavior required by the PR description.

.github/workflows/mgmt-review.md:99

  • The GraphQL review-thread author login is copilot-pull-request-reviewer (with an optional [bot] suffix), not Copilot. This exact comparison therefore leaves hasCopilotComment false and prevents the workflow from resolving Copilot threads.
              const hasCopilotComment = thread.comments.nodes.some(
                (comment) => comment.author?.login === 'Copilot',
              );

.github/prompts/mgmt-review-guidelines.md:59

  • The opening condition limits this comparison to beta releases, but the same sentence's example requires comparing a stable 4.0.0 with an earlier beta. An agent can follow the condition and skip the stable case; explicitly include stable releases in the condition.
When the new version is a beta release for a new major version and its latest `CHANGELOG.md` entry contains breaking changes, find the most recent earlier beta release in the same major-version series whose entry also contains breaking changes. For example, compare `4.0.0-beta.3` with `4.0.0-beta.2` or `4.0.0` with `4.0.0-beta.2`, but do not compare beta releases from different major-version series. Compare the two `Breaking Changes` lists and leave an inline comment on the new version line that identifies entries added to or removed from the list. If the lists have no differences, or no earlier beta in the same major-version series contains breaking changes, do not leave this comparison comment.
  • Files reviewed: 2/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

Comment thread .github/workflows/mgmt-review.md Outdated
Copilot AI review requested due to automatic review settings September 18, 2026 08:03

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.

🟡 Changes recommended

Concurrency cancellation, incorrect Copilot identity matching, missing unassignment, and contradictory guidance remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (2)

.github/workflows/mgmt-review.md:191

  • GraphQL exposes Copilot review comments under copilot-pull-request-reviewer (with a possible [bot] suffix on other API surfaces), not Copilot. This predicate therefore stays false and leaves all Copilot threads unresolved. Normalize the suffix and compare against the actual login.
                (comment) => comment.author?.login === 'Copilot',

.github/prompts/mgmt-review-guidelines.md:59

  • The opening condition limits this comparison to beta targets, but the same rule requires comparing a stable 4.0.0 target with an earlier beta. An agent can follow the condition and skip that stable case; explicitly include the first stable release in a new major series.
When the new version is a beta release for a new major version and its latest `CHANGELOG.md` entry contains breaking changes, find the most recent earlier beta release in the same major-version series whose entry also contains breaking changes. For example, compare `4.0.0-beta.3` with `4.0.0-beta.2` or `4.0.0` with `4.0.0-beta.2`, but do not compare beta releases from different major-version series. Compare the two `Breaking Changes` lists and leave an inline comment on the new version line that identifies entries added to or removed from the list. If the lists have no differences, or no earlier beta in the same major-version series contains breaking changes, do not leave this comparison comment.
  • Files reviewed: 3/3 changed files
  • Comments generated: 2
  • Review effort level: Balanced

if: needs.pre_activation.outputs.ready == 'true' && needs.pre_activation.outputs.pr_number != ''
concurrency:
group: "gh-aw-${{ github.workflow }}-${{ github.event.pull_request.number || github.event.inputs.item_number || github.run_id }}-${{ github.event.label.name || '' }}"
group: "gh-aw-${{ github.workflow }}-${{ github.event.check_suite.pull_requests[0].number || github.event.pull_request.number || github.event.inputs.item_number || github.run_id }}"
Comment on lines +205 to +206
cursor = threads.pageInfo.hasNextPage ? threads.pageInfo.endCursor : null;
} while (cursor);
@kazrael2119

Copy link
Copy Markdown
Member Author

close as we will split this pr's changes to several new prs

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.

2 participants