Skip to content

CI: Match Known Build Error message arrays on ordered lines - #39231

Merged
kubaflo merged 3 commits into
mainfrom
pureween-maui-kbe-array-parsing
Oct 11, 2026
Merged

kubaflo merged 3 commits into
mainfrom
pureween-maui-kbe-array-parsing

Conversation

@PureWeen

@PureWeen PureWeen commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Fix the existing /review tests Known Build Error consumer's handling of literal ErrorMessage arrays.

Root cause: Get-KnownBuildIssues casts an array to [string], joining its expressions with spaces. Test-KnownIssueMatch then searches for that one contiguous substring. A valid rule whose expressions appear on separate stack frames is missed; a same-line concatenation can incorrectly match.

Get-DeduplicatedFailures also aggregates messages from separate occurrences of the same test/platform. Matching an array against that aggregate can assemble its signature from multiple partial occurrences even though none individually satisfies the rule.

Correction: Preserve valid arrays and require all their literal expressions, in array order, on distinct subsequent lines within one actual occurrence's name + message/errorMessage + separately captured stackTrace text. Keep the rule loop outermost so the first matching rule still wins, even when it matches a later occurrence. Scalar and regex rules continue to use the existing aggregated text. This follows the public Build Analysis array contract, rather than flattening the array or treating its elements as alternative rules. Empty arrays and arrays containing null, blank, non-string, or nested elements are skipped with an explicit warning; invalid elements are not discarded to create a weaker matcher.

AzDO failure records capture the error message and stack trace in separate fields. The occurrence-local array text includes both fields from the same record, so stack-frame signatures can match even when they appear only in stackTrace. Neither stack traces from different occurrences nor a message in one occurrence and a stack trace in another may complete a signature.

The change is limited to three files:

  • Gather-TestFailureContext.ps1: literal-array loading/matching, occurrence-local array evidence, and narrowly corrected hint-only comments.
  • Gather-TestFailureContext.Tests.ps1: 47 real loader-to-matcher cases with mocked issue-list transport, including production deduplication and the actual cross-reference assignments.
  • .github/docs/maui-ci-facts.md: the occurrence-local ordered-line contract and service-parity limitation.

Existing scalar substring matching and scalar/regex aggregated-text composition, case-insensitive literals, scalar regex precedence/fallback/timeout, the 20,000-character cap per matched text, first-matching-rule selection, and attribution gates are unchanged. Partial, unrelated, reversed, same-line, cross-test, and same-test split-occurrence evidence is covered, along with LF/CRLF/CR line endings, single/repeated/three-expression arrays, invalid arrays, and the text-limit boundary.

The split-occurrence defect can cite an unsupported Known Build Error hint; it does not flip the final PR-related/unrelated attribution. Downstream matchesKnownIssue selects known-issue instead of pre-existing-on-base only after the existing exact alsoFailsOnBaseline gate. Those attribution conditions are unchanged.

Validation

Validated on the branch based on upstream main 84b1fb39ad56e22a51d29d4bbf141b03b02e4648, using PowerShell 7.4.5 and Pester 5.7.1. The occurrence-isolation correction was reproduced on e2892b088c61cfd7e43b69c8e715abb6cae99907; the stack-trace correction was reproduced on 7c1ee12b305e83abe996ef042b8ccfdf35466ff7, the original commit bound to the stack-trace review comment.

$config = New-PesterConfiguration
$config.Run.Path = '.github/skills/review-test-failures/scripts/Gather-TestFailureContext.Tests.ps1'
$config.Run.PassThru = $true
$config.Output.Verbosity = 'Detailed'
$config.Filter.Tag = 'KnownIssueStackTraces'
Invoke-Pester -Configuration $config
$config.Output.Verbosity = 'Normal'
$config.Filter.Tag = 'KnownBuildIssues'
Invoke-Pester -Configuration $config
$config.Filter.Tag = @()
Invoke-Pester -Configuration $config
  • Focused stack-trace cases: 9 passed, 0 failed.
  • Complete KBE boundary cases: 47 passed, 0 failed, including all 13 original occurrence-isolation cases.
  • Complete collector suite: 237 passed, 0 failed, including all 228 cases from the previous PR head.
  • Before adding each occurrence's stackTrace, the 9 new cases on 7c1ee12b305e83abe996ef042b8ccfdf35466ff7 produced 4 expected assertion failures and 5 passing controls. The tests use production deduplication and the actual caller, including stack-trace-only signatures, an absent message, a message followed by the same occurrence's stack trace, cross-occurrence negatives, unchanged scalar/regex text, and the 20,000-character boundary.
  • Before the focused correction, the 13 new cases on e2892b088c61cfd7e43b69c8e715abb6cae99907 produced 4 expected assertion failures and 9 passing controls, including the real same-test/platform split-occurrence regression through Get-DeduplicatedFailures and the actual cross-reference path.
  • The original parser cases against unfixed pinned-main functions produced 16 expected assertion failures and 9 passing controls; their corrected results remain green.
  • A saved public response for [net11][CoreCLR] Essentials FileSystem_Tests NullReferenceException in FileStream.ReadAsync on iOS/MacCatalyst device tests #36435 was replayed through the exact original/corrected loader and matcher, replacing only issue-list transport. Its published stack changed from no match to issue 36435; a scalar rule through the real loader matched before and after; each partial expression stayed unmatched; the flattened same-line false positive changed from a match to no match.
  • git diff --check: passed.

These are offline parser/matcher-boundary checks, not a full PR-review run or proof of live/deployed Build Analysis/Build Insights parity. No product build, device/UI test, live service match, or CI rerun was performed. No issue enrollment, retry/quarantine/fixer policy, workflow, generated lock, manifest, or ErrorPattern-array behavior is changed. A signature match remains a hint, not causal proof or a confirmed flake verdict.

Issues Fixed

No separate parser-defect issue was filed. #36435 supplies historical public fixture evidence only: this PR does not fix or close that FileSystem product issue, establish that it is currently recurring, or assert its resolution.

Preserve literal ErrorMessage arrays instead of joining their expressions into a contiguous scalar substring. Require ordered matches on distinct subsequent lines in the same failure text and warn when skipping invalid arrays. Preserve scalar, regex, text-limit, selection, and attribution behavior.

Add 25 loader-to-matcher regression cases and document the bounded public Build Analysis contract. All 215 collector cases pass; current-main red/green checks reproduce 16 expected failures and nine controls before the fix.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 876ad450-5f81-4c61-8ec7-e54600c51004
Copilot AI balanced review requested due to automatic review settings October 7, 2026 16:44
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 7, 2026 16:44 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39231

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39231"

@azure-pipelines

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

@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 7, 2026 16:44 — with GitHub Actions Inactive
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool October 7, 2026 16:44 — with GitHub Actions Failure
@PureWeen
PureWeen requested a deployment to skill-evaluation-pat-pool October 7, 2026 16:44 — with GitHub Actions In progress
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 7, 2026 16:45 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 7, 2026 16:47 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 7, 2026 16:49 — with GitHub Actions Inactive
@PureWeen
PureWeen temporarily deployed to copilot-pat-pool October 7, 2026 16:49 — with GitHub Actions Inactive

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 encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

@kubaflo

This comment has been minimized.

@kubaflo

kubaflo commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
3 pipeline(s) were filtered out due to trigger conditions.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15599993 is running for android.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

Evaluate literal ErrorMessage arrays against each actual failure occurrence instead of messages aggregated across occurrences of the same test and platform. Keep scalar and regex aggregation, the 20000-character cap per text, pattern-first selection, and attribution gates unchanged.

Add same-test split-occurrence regression coverage through production deduplication and the actual cross-reference path, plus complete-occurrence, alias, empty-evidence, ordering, scalar/regex, and text-limit controls. All 38 KBE cases and 228 collector cases pass; four new cases reproduce unsupported hints on the prior PR head.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 876ad450-5f81-4c61-8ec7-e54600c51004
Copilot AI balanced review requested due to automatic review settings October 7, 2026 17:24
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool October 7, 2026 17:25 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool October 7, 2026 17:25 — with GitHub Actions Failure
@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Skill Validation Results

@PureWeen — new skill validation results are available based on this last commit: 6379c58.
To request a fresh validation after new comments or commits, comment /evaluate-skills.

Overall Needs attention Static Passed LLM Needs attention Skills 28 Agents 6

⚠️ Skill Validation Results — 6379c58 · CI: Match Known Build Error message arrays on ordered lines · 2026-10-09T20:49:00Z

✅ Static Checks Passed

Skills: 28 | Eval specs linted: 17

Full lint output
── .github/skills/agentic-labeler/tests/eval.vally.yaml
Vally collects pseudonymous usage telemetry (command name, version, outcome, duration, persistent device identifier (when available), and coarse OS/runtime info) to improve the product. No prompts, datasets, file paths, or arguments are collected.
Opt out any time by setting VALLY_TELEMETRY_OPTOUT=1 or DO_NOT_TRACK=1.
Learn more: https://aka.ms/vally/telemetry
✔ .github/skills/agentic-labeler/tests/eval.vally.yaml is valid
── .github/skills/analyze-sessions/tests/eval.vally.yaml
✔ .github/skills/analyze-sessions/tests/eval.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.ownership.vally.yaml
✔ .github/skills/ci-fix/tests/eval.ownership.vally.yaml is valid
── .github/skills/ci-fix/tests/eval.vally.yaml
✔ .github/skills/ci-fix/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/eval.inline-findings.vally.yaml
✔ .github/skills/code-review/tests/eval.inline-findings.vally.yaml is valid
── .github/skills/code-review/tests/eval.producer-trace.vally.yaml
✔ .github/skills/code-review/tests/eval.producer-trace.vally.yaml is valid
── .github/skills/code-review/tests/eval.trim-aot.vally.yaml
✔ .github/skills/code-review/tests/eval.trim-aot.vally.yaml is valid
── .github/skills/code-review/tests/eval.vally.yaml
✔ .github/skills/code-review/tests/eval.vally.yaml is valid
── .github/skills/code-review/tests/hermeticity.vally.yaml
✔ .github/skills/code-review/tests/hermeticity.vally.yaml is valid
── .github/skills/code-review/tests/soak.capability.vally.yaml
✔ .github/skills/code-review/tests/soak.capability.vally.yaml is valid
── .github/skills/evaluate-pr-tests/tests/eval.vally.yaml
✔ .github/skills/evaluate-pr-tests/tests/eval.vally.yaml is valid
── .github/skills/pr-review/tests/eval.gh-auth.vally.yaml
✔ .github/skills/pr-review/tests/eval.gh-auth.vally.yaml is valid
── .github/skills/review-test-failures/tests/eval.vally.yaml
✔ .github/skills/review-test-failures/tests/eval.vally.yaml is valid
── .github/skills/try-fix/tests/eval.restore.vally.yaml
✔ .github/skills/try-fix/tests/eval.restore.vally.yaml is valid
── .github/skills/try-fix/tests/eval.vally.yaml
✔ .github/skills/try-fix/tests/eval.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.protocol.vally.yaml is valid
── .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml
✔ .github/skills/verify-tests-fail-without-fix/tests/eval.vally.yaml is valid

⚠️ LLM Evaluation Incomplete

No valid JUnit suite results were found for: review-test-failures.

🔍 Full results and investigation steps

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

Occurrence matching omits separately stored stack traces, so stack-frame arrays such as issue #36435 still fail at the production call site.

1 open finding

🧠 Review effort: Balanced

@MauiBot

This comment has been minimized.

@MauiBot MauiBot added s/agent-review-incomplete AI review did not complete all expected phases s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) and removed s/agent-review-in-progress AI review is currently running for this PR labels Oct 7, 2026
@MauiBot

This comment has been minimized.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Oct 7, 2026
Append each occurrence’s separately captured stackTrace only to its literal-array matching text. Keep aggregate scalar/regex behavior unchanged and cover real deduplication and cross-reference paths, isolation, and text limits.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 876ad450-5f81-4c61-8ec7-e54600c51004
Copilot AI balanced review requested due to automatic review settings October 9, 2026 20:46
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool October 9, 2026 20:46 — with GitHub Actions Failure
@PureWeen
PureWeen had a problem deploying to skill-evaluation-pat-pool October 9, 2026 20:46 — with GitHub Actions Failure

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.

🔵 Needs a closer look

The shared CI attribution logic is well tested, but live CI and service-parity validation remain unverified.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Oct 9, 2026
@kubaflo

kubaflo commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

/azp run

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Note

🔍 /review started

AzDO build 15636273 is running for android.

The s/agent-review-in-progress label stays on this PR while the run is active. The final recommendation and outcome labels are posted only after Gate, expert review, and Deep UI tests finish.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
3 pipeline(s) were filtered out due to trigger conditions.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AI Review Summary

@PureWeen — new AI review results are available based on commit 6379c58.

Gate No Tests Confidence Low Platform Android


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ SKIPPED

No tests were detected in this PR.

Recommendation: Add tests to verify the fix using the write-tests-agent.


📋 Pre-Flight — Context & Validation

Pre-Flight Context

Scope/evidence boundary: Context only for #39231, using submitted GitHub metadata, the immutable diff, relevant source at base 84b1fb39ad56e22a51d29d4bbf141b03b02e4648 and head 6379c58d9da3d5ba086d7f1a3379913677b82c93, #36435, and the pinned Arcade Known Issues contract. No commands, tests, edits, review workflow, or alternative analysis were performed. This is not an exhaustive review or recommendation.

Reported problem

The local /review tests Known Build Error matcher previously coerced an ErrorMessage array to a single string and searched for one contiguous substring. That diverges from Arcade’s documented array contract: array entries are ordered AND conditions, each matching a separate line, with later entries searched on subsequent lines. The old behavior could therefore:

  • Miss a valid multiline stack-frame signature.
  • Incorrectly match expressions concatenated on one line.
  • Combine partial evidence from separate occurrences after failures with the same test name and platform were deduplicated.

The historical fixture is #36435, whose two literals identify an Essentials FileSystem_Tests stack on iOS and MacCatalyst. That issue remains open, but its comments report the product failure stopped reproducing after #36121 and recommend closure; it is therefore historical evidence rather than a currently reproducible test case.

Changed files and mechanism

The PR changes three infrastructure files, with 405 additions and 14 deletions overall:

  • .github/skills/review-test-failures/scripts/Gather-TestFailureContext.ps1

    • Preserves valid literal ErrorMessage arrays instead of casting them to a scalar.
    • Rejects empty arrays or arrays containing null, blank, non-string, or nested values, emitting a warning rather than weakening the rule.
    • Extends Test-KnownIssueMatch with occurrence-local texts.
    • For arrays, splits LF, CRLF, or CR lines and requires each case-insensitive literal in order on a distinct later line.
    • Keeps the pattern loop outermost, preserving first-matching-rule selection.
    • Builds each occurrence’s array-matching text from that occurrence’s test name, message/errorMessage, and separately captured stackTrace.
    • Retains the 20,000-character cap independently for each occurrence.
    • Leaves scalar and regex matching on the existing aggregated test-name/message text; stack traces are not added to those paths.
    • Leaves final attribution gates unchanged; the submitted code and documentation characterize matchesKnownIssue as a hint rather than causal proof.
  • .github/skills/review-test-failures/scripts/Gather-TestFailureContext.Tests.ps1

    • AST-extracts the affected functions and actual cross-reference assignments while mocking issue transport.
    • Adds submitted cases for line endings, ordering, repeated expressions, literal regex characters, invalid arrays, text limits, first-rule selection, cross-test and cross-occurrence isolation, aliases, stack-trace-only evidence, and unchanged scalar/regex behavior.
    • Exercises production deduplication and uses synthetic platform = 'Android' records in relevant occurrence tests.
  • .github/docs/maui-ci-facts.md

    • Documents ordered, occurrence-local array matching, separate stack-trace capture, unchanged caps and attribution gates, and the explicit limitation that this local matcher does not establish full Build Analysis/Build Insights parity.

A prior automated review identified that occurrence-local matching omitted the separately stored stackTrace. The latest submitted commit adds it; the review thread is marked resolved, and the subsequent automated review reported no open findings while still noting that live CI and service parity were unverified.

Platform-sensitive paths

  • No Android, iOS, MacCatalyst, Windows, handler, or product source files change. The affected path is shared PowerShell CI attribution logic.
  • Platform remains part of the deduplication key, so occurrences from different platforms are not grouped together.
  • The motivating public fixture, #36435, is iOS/MacCatalyst-specific. It does not provide live Android evidence.
  • The added Pester cases include synthetic Android records, but that is parser/call-site coverage rather than an Android device or live AzDO end-to-end validation.
  • The requested platform for later testing is Android. Representative Android validation should preserve the actual AzDO separation between errorMessage and stackTrace and pass through deduplication plus the production cross-reference path.

Validation context and requirements

Gate result: ⚠️ SKIPPED — no tests detected in this PR. The diff does contain a substantial Pester test-file change, so the unresolved question is whether Gate does not recognize this test location/type or whether the suite is not wired into the relevant CI path. Gate was not rerun.

The PR description reports offline PowerShell 7.4.5/Pester 5.7.1 results of 9 focused stack-trace cases, 47 Known Build Error boundary cases, and 237 collector cases, plus pre-fix failure demonstrations and replay of a saved #36435 response. Those results were not independently verified here.

Later validation should establish:

  • Red/green behavior against the immutable base and head for the targeted regressions.
  • Ordered distinct-line matching without same-line, reversed, partial, cross-test, cross-platform, or cross-occurrence assembly.
  • Matching when literals occur only in one Android occurrence’s stack trace, and when one is in its message and another in its stack trace.
  • Preservation of scalar/regex aggregation, first-rule selection, case-insensitive literals, warning behavior, and the 20,000-character boundary.
  • No change to downstream attribution without the existing baseline corroboration.
  • Whether the Pester suite is automatically discovered and executed in PR CI.
  • Ideally, an Android end-to-end gatherer replay or live failure record rather than only synthetic parser fixtures.

Remaining uncertainties

  • Live /review tests behavior, current check-run status, deployed Build Analysis behavior, and Android end-to-end behavior are unknown.
  • The public Arcade contract supports arrays for both ErrorMessage and ErrorPattern; this PR intentionally changes only literal ErrorMessage arrays. The acceptability of that remaining parity gap requires separate review.
  • #36435 no longer reproduces according to its comments, so its usefulness is limited to saved historical data.
  • No product build, device/UI test, live service match, or CI rerun is established by the submitted evidence.
  • Whether all failure producers supply occurrence fields consistently enough for name/message/stack-trace composition remains unverified outside the inspected AzDO test-result path.
  • Additional source and discussion may contain context not covered here; no exhaustive correctness assessment was attempted.

🔬 Code Review — Deep Analysis

Code Review — PR #39231

Independent Assessment

What this changes:

  • Extends Known Build Error parsing/matching in .github/skills/review-test-failures/scripts/Gather-TestFailureContext.ps1 so ErrorMessage arrays are preserved as ordered literal arrays instead of being flattened to one string (Get-KnownBuildIssues, lines 2550-2618).
  • Adds array-aware matching in Test-KnownIssueMatch that requires ordered line-by-line hits inside one occurrence text, while keeping scalar/regex behavior on aggregate text (Test-KnownIssueMatch, lines 2620-2678).
  • Changes the cross-reference call site to build per-occurrence match text from test name + message/errorMessage + stackTrace and pass that into -OccurrenceTexts (lines 4646-4654).
  • Adds extensive Pester coverage for loader→matcher boundary and occurrence-local behavior in .github/skills/review-test-failures/scripts/Gather-TestFailureContext.Tests.ps1.
  • Updates .github/docs/maui-ci-facts.md to document the new array contract and service-parity caveat (lines 409-417 in head).

Inferred motivation:
Prevent false known-issue attribution when array signatures are split across occurrences or frames, while restoring valid stack-frame array matching from one occurrence.

Reconciliation with PR Narrative

Author claims: array flattening caused misses/false positives; matching must be occurrence-local and include stack trace; scalar/regex behavior should remain unchanged.

Agreement/disagreement: Agrees with code evidence. The implemented matcher and tests align with that scope; I found no contradictory behavior in submitted hunks.

Prior Review Reconciliation

Prior ❌ Error Finding Source Status Evidence
None found. n/a n/a Prior inline finding was medium-severity stackTrace omission and is now addressed by occurrence text including stackTrace at .github/skills/review-test-failures/scripts/Gather-TestFailureContext.ps1:4652 plus new stack-trace tests in Gather-TestFailureContext.Tests.ps1 (KnownIssueStackTraces block).

Blast Radius Assessment

  • Runs for all instances: No (only /review tests gather/classification path).
  • Startup impact: No (scripted CI attribution logic, not product startup/runtime UI path).
  • Static/shared state: No new long-lived shared runtime state beyond local function variables.

CI Status

  • Required-check result: undetermined (required-set query unavailable in this environment).
  • Classification: undetermined/tool-unavailable for gh pr checks --required (unauthenticated CLI in this run).
  • Additional observable signal: anonymous commit check-runs show Azure pipeline checks as neutral and several non-required workflow checks failed/skipped, but this does not establish required-gate pass/fail.
  • Action taken: confidence capped to low and verdict not LGTM per policy.

Findings

No concrete blocking code defects found in the submitted diff after validation against changed call sites/tests/docs.

Failure-Mode Probing

  • If array evidence is split across occurrences of same test/platform, does it still match? No — call site now passes per-occurrence text and tests assert split-occurrence non-match.
  • If signatures exist only in stackTrace, can they match? Yes — occurrence text now includes stackTrace; dedicated tests cover stack-trace-only matching.
  • Could scalar/regex behavior regress? Tests explicitly keep scalar/regex precedence and aggregated-text behavior unchanged.
  • Could invalid arrays silently weaken to partial matching? No — invalid arrays are skipped with warning; they are not downgraded to weaker substring alternatives.

External Output Contract

Consumer token/pattern Producer location Producer emission condition Consumer assumption Ordinary negative case Downstream effect
ErrorMessage array literals from Known Build Error issue JSON GitHub issue bodies queried by Invoke-GhJson issue list ... --label "Known Build Error" then parsed in Get-KnownBuildIssues Producer emits arrays as JSON values in issue body code blocks; each element is intended as ordered literal evidence lines Consumer assumes array is ordered AND within a single occurrence text Array elements present but split across multiple occurrences (or same-line concatenation only) New matcher refuses match unless ordered lines occur in one occurrence text, preventing over-broad known-issue hinting
Occurrence-local text (testName + message/errorMessage + stackTrace) AzDO result-detail retrieval in Get-AzDoFailedTestResultsByBuild populates message (errorMessage) and stackTrace fields separately (lines ~553-579), then dedup pipeline stores occurrences Producer may populate message and stack trace independently per failed result Consumer assumes both belong to one occurrence and should be searched together for array signatures Ordinary failed test where message exists but stack frames only in stackTrace Now correctly matchable; previous false negative removed; known-issue hinting improved without changing attribution gate conditions
Scalar/regex known-issue patterns Same Known Build Error issue JSON, ErrorPattern or scalar ErrorMessage Producer provides regex or scalar literals Consumer assumes legacy single-text behavior remains Ordinary single-line failure text Behavior unchanged (regex/scalar still matched against aggregated text with existing cap/timeout)

Verdict: NEEDS_DISCUSSION

Confidence: low
Summary: The submitted code changes appear correct and well-covered for the targeted known-issue array matching defect, including occurrence isolation and stack-trace evidence handling. I found no actionable file-level defects in the diff. However, required-check status could not be authoritatively resolved via gh pr checks --required in this environment, so merge-safety confidence is capped low and verdict remains NEEDS_DISCUSSION rather than LGTM.


🛠️ Try-Fix — Analysis & Comparison

Alternative generation: not requested

Evidence-first mode intentionally omits routine Try-Fix attempts. This is not a failed
attempt, a completed alternative search, or evidence that alternatives have no value.
The expert review may still produce one evidence-backed PR refinement.


🏁 Report — Final Recommendation

⚠️ Final Recommendation: REQUEST CHANGES

Phase Status

Phase Status Notes
Pre-Flight ✅ COMPLETE Trusted evidence-first context captured for submitted base 84b1fb39ad56e22a51d29d4bbf141b03b02e4648 and head 6379c58d9da3d5ba086d7f1a3379913677b82c93.
Code Review NEEDS_DISCUSSION (low) 0 errors, 0 warnings; required-check status remains undetermined.
Gate ⚠️ SKIPPED No tests were detected by Gate; the submitted Pester changes were not independently validated by this run.
Try-Fix not requested Evidence-first mode intentionally omitted alternative generation; this is not a failed or exhausted search.
Refinement NOT GENERATED The expert found no concrete actionable defect or unresolved behavioral mechanism meeting the refinement threshold.
Report ✅ COMPLETE Compared the only real candidate, the submitted pr.

Code Review and Candidate Comparison

Candidate Evidence Regression status Assessment
pr Expert review found no concrete defect in the submitted diff and found the implementation consistent with its stated scope. Unknown in this run: Gate was skipped and required-check status could not be resolved. Selected as the only real candidate, but not demonstrated merge-ready.

No pr-plus-reviewer patch was implemented, and no try-fix-N candidates exist. The submitted fix therefore wins the comparison by default, not because missing validation was treated as a pass.

Summary

The submitted change appears to correctly preserve literal ErrorMessage arrays, match their elements on ordered distinct lines within one failure occurrence, and include that occurrence's separately captured stack trace without changing scalar/regex attribution behavior. The expert review found no actionable code defect or inline finding. Approval is nevertheless blocked because Gate was skipped and authoritative required-check evidence is unavailable; the expert verdict is consequently NEEDS_DISCUSSION with low confidence.

Root Cause

Get-KnownBuildIssues previously coerced a literal ErrorMessage array to one string, while deduplicated failure text could aggregate separate occurrences of the same test/platform. That combination could miss legitimate multiline signatures, accept same-line concatenations, or assemble a signature from unrelated occurrences.

Fix Quality

The submitted implementation is focused and its Pester coverage targets ordered matching, occurrence isolation, stack-trace evidence, invalid arrays, line endings, text limits, and unchanged scalar/regex behavior. Those tests and the reported validation were not independently executed in this review, however, so this run cannot claim regression coverage or merge readiness. Try-Fix was not requested, and the absence of a refinement reflects the expert finding no evidence-backed defect to patch.


🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@MauiBot MauiBot added s/agent-changes-requested AI agent recommends changes - found a better alternative or issues and removed s/agent-review-incomplete AI review did not complete all expected phases s/agent-review-in-progress AI review is currently running for this PR labels Oct 9, 2026
@kubaflo
kubaflo merged commit 4342761 into main Oct 11, 2026
17 of 22 checks passed
@kubaflo
kubaflo deleted the pureween-maui-kbe-array-parsing branch October 11, 2026 14:30
@github-actions github-actions Bot added this to the .NET 10 SR12 milestone Oct 11, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 11, 2026

This branch had an error being deployed

1 failed and 1 inactive (outdated) deployments
skill-evaluation-pat-pool — 6379c58d Deployed Oct 9, 2026 by PureWeen via evaluate (review-test-failures) #26792
copilot-pat-pool — e2892b08 Deployed Oct 7, 2026 by PureWeen via conclusion #2271
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants