mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-06 07:06:54 +01:00
Revert evaluation harness change for multiple articles per domain
The harness intentionally evaluates one paired article per domain. Keep it as designed; how the retention pairs join privacy evaluation is left to the maintainers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
07a171386d
commit
f9333addcd
3 changed files with 15 additions and 44 deletions
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
.DESCRIPTION
|
||||
CI uses the static validation path to prove every registered AL review leaf
|
||||
has at least one positive and one clean control, every fixture/reference exists, and
|
||||
has one positive and one clean control, every fixture/reference exists, and
|
||||
the manifest remains internally consistent.
|
||||
|
||||
For an actual model run, -PrepareDirectory copies inputs to neutral names and
|
||||
|
|
@ -226,49 +226,24 @@ foreach ($domain in $leafDomains) {
|
|||
continue
|
||||
}
|
||||
|
||||
# The primary article keeps the domain-level case IDs; additionalArticles add
|
||||
# further paired cases keyed by slug so existing case hashes stay stable.
|
||||
$selections = [System.Collections.Generic.List[object]]::new()
|
||||
$selections.Add([pscustomobject]@{ Article = $selectedArticle; IdPrefix = $domain }) | Out-Null
|
||||
if ($override -and ($override.PSObject.Properties.Name -contains 'additionalArticles')) {
|
||||
foreach ($additionalName in @($override.additionalArticles)) {
|
||||
$additionalName = [string]$additionalName
|
||||
if ($additionalName.EndsWith('.md')) {
|
||||
$additionalName = [System.IO.Path]::GetFileNameWithoutExtension($additionalName)
|
||||
}
|
||||
if (@($selections | Where-Object { $_.Article.BaseName -eq $additionalName }).Count) {
|
||||
$problems.Add("${domain}: additional article is already selected: $additionalName.md") | Out-Null
|
||||
continue
|
||||
}
|
||||
$additionalArticle = $articles | Where-Object BaseName -eq $additionalName | Select-Object -First 1
|
||||
if (-not $additionalArticle) {
|
||||
$problems.Add("${domain}: additional article does not exist or lacks .good.al and .bad.al companion samples: $additionalName.md") | Out-Null
|
||||
continue
|
||||
}
|
||||
$selections.Add([pscustomobject]@{ Article = $additionalArticle; IdPrefix = "$domain-$additionalName" }) | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
$articlePath = [string]$selectedArticle.ArticlePath
|
||||
$sampleDirectory = (Split-Path -Parent $articlePath).Replace('\', '/')
|
||||
$context = if ($override -and ($override.PSObject.Properties.Name -contains 'context')) {
|
||||
[string]$override.context
|
||||
} else {
|
||||
$null
|
||||
}
|
||||
foreach ($selection in $selections) {
|
||||
$articlePath = [string]$selection.Article.ArticlePath
|
||||
$sampleDirectory = (Split-Path -Parent $articlePath).Replace('\', '/')
|
||||
foreach ($kind in 'bad', 'good') {
|
||||
$case = [pscustomobject]@{
|
||||
id = "$($selection.IdPrefix)-$kind"
|
||||
domain = $domain
|
||||
input = "$sampleDirectory/$($selection.Article.BaseName).$kind.al"
|
||||
expected = if ($kind -eq 'bad') { @($articlePath) } else { @() }
|
||||
}
|
||||
if ($context) {
|
||||
$case | Add-Member -NotePropertyName context -NotePropertyValue $context
|
||||
}
|
||||
$caseList.Add($case) | Out-Null
|
||||
foreach ($kind in 'bad', 'good') {
|
||||
$case = [pscustomobject]@{
|
||||
id = "$domain-$kind"
|
||||
domain = $domain
|
||||
input = "$sampleDirectory/$($selectedArticle.BaseName).$kind.al"
|
||||
expected = if ($kind -eq 'bad') { @($articlePath) } else { @() }
|
||||
}
|
||||
if ($context) {
|
||||
$case | Add-Member -NotePropertyName context -NotePropertyValue $context
|
||||
}
|
||||
$caseList.Add($case) | Out-Null
|
||||
}
|
||||
}
|
||||
$cases = @($caseList)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue