$forbiddenPatterns = @(
# Size / effort
'would require .* LOC',
'no NEON port attempted',
'too large to hand-port',
'non-trivial port',
# Popularity / usage / age
'\brarely used\b',
'not benchmarked by upstream',
'\bacademic only\b',
'\bniche\b',
'\blegacy\b',
'\bobscure\b',
'deprecated by upstream',
# Optional-ISA-extension unavailability alone
'MSVC does not (auto-)?define\s+__ARM_FEATURE_',
'__ARM_FEATURE_\w+ not (set|defined|available)',
'target (CPU|SoC) does not implement',
'baseline ARMv8\.0 .* does not require',
# Unmeasured "fast enough"
'default .* path is .* fast',
'scalar fallback is (fine|fast|adequate|sufficient)',
'existing path is sufficient',
# Scope / deferral non-reasons
'could be ported.*deferred',
'out of (scope|opportunistic scope)',
'opportunistic[- ]only',
'\bfuture work\b',
'left as a follow[- ]up',
# Unsubstantiated duplication
'alternate .* implementation',
'sibling provides equivalent'
)
$artifactsToScan = @($optimizerReport)
if (Test-Path 'ARM64-PORT.md') { $artifactsToScan += (Get-Content 'ARM64-PORT.md' -Raw) }
$offending = @()
foreach ($text in $artifactsToScan) {
foreach ($p in $forbiddenPatterns) {
$m = Select-String -InputObject $text -Pattern $p -AllMatches
foreach ($hit in $m.Matches) { $offending += @{ Pattern = $p; Line = $hit.Value } }
}
}
if ($offending) {
Write-Host "FORBIDDEN skip reasons detected — re-invoke wos-optimizer" -ForegroundColor Yellow
$offending | ForEach-Object { Write-Host " - matches '$($_.Pattern)': $($_.Line)" }
}
On a non-empty result, re-invoke wos-optimizer ONCE with a prompt that names every offending file and its forbidden pattern, instructing it to either hand-port with baseline ARMv8.0 NEON, or cite a VALID reason from the list above with concrete evidence.