Skip to content

Consolidate TestFramework string escaping - #11446

Merged
Amaury Levé (Evangelink) merged 4 commits into
mainfrom
copilot/duplicate-code-issue-resolution
Sep 23, 2026
Merged

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

Conversation

Copilot AI commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

C#-style string and character escaping was duplicated across DataRow display names, assertion value rendering, and string-difference diagnostics, allowing their implementations to drift.

  • Shared escaping
    • Add an internal StringEscapeHelper as the single source of truth for escape classification, rendering, matching, length calculation, and surrogate detection.
  • Caller migration
    • Route all three assertion paths through the shared helper.
    • Preserve each caller’s existing escape policy, including extended escapes and unpaired-surrogate handling.
  • Regression coverage
    • Cover AssertionValueRenderer string/character surrogate rendering and built-in rendering detection.

Copilot AI balanced review requested due to automatic review settings September 22, 2026 10:58

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.


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 22, 2026 11:12
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor duplicate C#-style string/char escaping logic Consolidate TestFramework string escaping Sep 22, 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.

Copilot review overview

🟡 Changes recommended

Regression coverage does not verify the preserved quote and backslash character policy.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

@microsoft-github-policy-service microsoft-github-policy-service Bot added the state/needs-review Awaiting review from the team. label Sep 22, 2026
@github-actions github-actions Bot removed the state/needs-review Awaiting review from the team. label Sep 22, 2026
@Evangelink
Amaury Levé (Evangelink) marked this pull request as ready for review September 22, 2026 11:41
Add test for rendering quote and backslash characters.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 22, 2026 11:41
@github-actions github-actions Bot added the state/needs-review Awaiting review from the team. label Sep 22, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Sep 22, 2026
@github-actions github-actions Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Sep 22, 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.

Copilot review overview

🟢 Approval recommended

The refactoring preserves each caller’s prior escape policy and adds focused regression coverage.

Review effort: Balanced
Findings: None

Resolved since last review (1)

@microsoft-github-policy-service microsoft-github-policy-service Bot added state/needs-review Awaiting review from the team. and removed state/needs-review Awaiting review from the team. labels Sep 22, 2026
@github-actions github-actions Bot added state/approved Proposal approved; ready for implementation. and removed state/needs-review Awaiting review from the team. labels Sep 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Final test-triage resolution — Azure Pipelines build 1607034

Analysis is final (completed aggregate build).

  • Windows (Debug/Release) and Linux (Release) legs: all 94,594 collected test records across CTRF/TRX reports (MSTest.Analyzers, MSTest.SelfRealExamples, MSTestAdapter.PlatformServices, Microsoft.Testing.Extensions*, Microsoft.Testing.Platform*, MSTest.Acceptance.IntegrationTests, MSTest.SourceGeneration, etc.) are passed or skipped. No failures or retries (failureOrRetryCount: 0).
  • macOS Release leg: the job did not fail due to a test failure. The timeline shows "Job cancelled due to worker timeout" and the agent (Azure Pipelines 94) not responding to cancellation within 5 minutes — an infrastructure/agent-loss issue, not a product or test defect. Notably, the pipeline itself flags this leg as informational only: "macOS is non-blocking for PRs; this failure does not block the merge." No test result artifacts were produced for this leg (candidate/diagnostic counts are 0 for macOS), so there is no test evidence to correlate.
  • No crash/hang diagnostics, no duration-regression signals, and no CTRF flaky/retry metadata anywhere in the evidence.

Conclusion: This build failure is an environmental worker-timeout on the non-blocking macOS leg, not a test-product regression. No durable-issue threshold is met (no repeated signature, no code/test defect evidence). No action beyond a possible pipeline re-run is warranted.

🤖 Automated content by GitHub Copilot. Generated by the Pipeline Test Triage workflow. · copilot · auto · 41.8 AIC · ⌖ 5.2 AIC · ⊞ 8.9K

@Evangelink
Amaury Levé (Evangelink) merged commit 5c0a19e into main Sep 23, 2026
30 of 33 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the copilot/duplicate-code-issue-resolution branch September 23, 2026 12:49
@github-actions github-actions Bot removed the state/approved Proposal approved; ready for implementation. label Sep 23, 2026
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 Detected: C#-style String/Char Escaping Logic Duplicated Across TestFramework Assertions

4 participants