Commit 62dfdbf
[ci-scan] Enforce KBE match-count gate; document native-assert array form (#128842)
## Description
Adds a hard pre-emit gate to Branch A of `ci-failure-scan.md`: before
calling `create_issue`, the agent scans the proposed body for the
literal `<!-- ci-scan-match-count: <N> hits in failure.log -->` marker
that KBE-verification check #7 already requires. If absent or `N == 0`,
do not emit; record `skipped: KBE body missing positive match-count
marker` and stop.
## Motivation
Check #7 in `shared/create-kbe.instructions.md` says the marker is
mandatory, but the scanner has emitted KBEs without it. Two recent
examples that BA cannot match and that sit at `0 / 0 / 0` indefinitely:
- #128544 (closed, never matched)
- #128827 (open, will not match either)
Both have the same JSON shape:
```json
{
"ErrorMessage": "Assertion failed '(op3Reg != targetReg) || (op1Reg == targetReg)' in 'System.Runtime.Intrinsics.X86.Avx512F:FusedMultiplyAddNegated",
"ErrorPattern": "",
...
}
```
That substring lives in the corerun.exe stdout dump on a JIT assert,
which is not in the set of logs BA indexes for KBE matching. Without the
match-count marker (which check #7 requires the agent to verify against
the actual failure log it has access to), there is no pre-flight check
that the signature is even findable. The body looks plausible and gets
filed; BA never matches it; the scanner re-files it next scan as a
"recurrence".
The gate is small (one paragraph) and references existing rules rather
than introducing new policy. The body of the change also documents the
native-assert case explicitly so the agent stops reaching for
`ErrorPattern` as a fix. Regex vs substring does not change which logs
BA reads; the array form (xunit anchor + assert anchor) is the lever,
and check #7 already prescribes it.
## Out of scope
- Backfilling #128544 / #128827 with a working signature (separate
manual edit or a one-off cleanup PR).
- Changing what logs BA indexes (out of dotnet/runtime's control).
cc @kg
> [!NOTE]
> This PR was authored with assistance from GitHub Copilot CLI.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent bdf8636 commit 62dfdbf
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| 304 | + | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
| |||
0 commit comments