Skip to content

Consolidate trailing CancellationToken detection - #12021

Merged
Amaury Levé (Evangelink) merged 2 commits into
mainfrom
copilot/duplicate-code-resolution
Oct 19, 2026
Merged

Amaury Levé (Evangelink) merged 2 commits into
mainfrom
copilot/duplicate-code-resolution

Conversation

Copilot AI commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Trailing CancellationToken detection and explicit-token row checks were duplicated across TestFramework and PlatformServices, risking inconsistent behavior. This change centralizes both rules while preserving the combinatorial value-provider opt-out.

  • Shared helpers: Add parameter counting and explicit-token row detection to TestDataSourceUtilities; use them in combinatorial generation, display-name formatting, and the adapter.
  • Compatibility: Keep the adapter helper as a delegate to the shared implementation.
  • Regression coverage: Add display-name cases for explicit-token and non-token object-array rows.
internal static int GetDataParameterCount(ParameterInfo[] parameters)
    => TestDataSourceUtilities.GetDataParameterCount(parameters);

Copilot AI balanced review requested due to automatic review settings October 19, 2026 18:01

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 wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 18:27

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 wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

Copilot AI changed the title [WIP] Refactor duplicated trailing CancellationToken detection logic Consolidate trailing CancellationToken detection Oct 19, 2026
@Evangelink
Amaury Levé (Evangelink) marked this pull request as ready for review October 19, 2026 18:47
Copilot AI balanced review requested due to automatic review settings October 19, 2026 18:47
@github-actions github-actions Bot added the state/needs-review Awaiting review from the team. label Oct 19, 2026
@Evangelink
Amaury Levé (Evangelink) merged commit 780c775 into main Oct 19, 2026
6 of 12 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the copilot/duplicate-code-resolution branch October 19, 2026 18:47
@github-actions github-actions Bot removed the state/needs-review Awaiting review from the team. label Oct 19, 2026

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

The focused refactor preserves the inspected behavior, with no unresolved blocking findings.

No open issues 🎉

Review effort: Balanced

Amaury Levé (Evangelink) added a commit that referenced this pull request Oct 20, 2026
Resolve the conflict with #12021 by retaining its shared display-name predicate and removing the now-redundant private duplicate. Keep the tuple-row helper extraction without changing its expression or evaluation order.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ba332d0f-f512-4fa7-80b6-9731c87a2c96
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.

[duplicate-code] Duplicate Code: Trailing CancellationToken parameter detection reimplemented in 3 places

3 participants