From f248bfd81fa01df624f9e16fcf32bc14d604fcc6 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Wed, 7 Oct 2026 11:17:41 +0000 Subject: [PATCH] ps-drive-ref check: a backtick-escaped quote no longer ends the scanned string (the Arc trace job's $first: after a `" sat outside every string and failed to parse on PC 1); the trace job's variables braced Co-Authored-By: Claude Fable 5.1 --- tools/ci/ps-drive-ref-check.sh | 5 ++++- tools/intel-arc/pc1-arc-trace.ps1 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/ci/ps-drive-ref-check.sh b/tools/ci/ps-drive-ref-check.sh index 9cf22dc40..57e16d276 100755 --- a/tools/ci/ps-drive-ref-check.sh +++ b/tools/ci/ps-drive-ref-check.sh @@ -27,7 +27,10 @@ for f in sorted(set(files)): if line.lstrip().startswith('#'): continue if sig.search(line): print(f'ps-params: {f}:{n}: a parameter named $args is shadowed by the automatic $args; rename it'); fail = 1 - for seg in re.findall(r'"(?:[^"\\]|\\.|`")*"', line): + # a backtick escape (`" or any `x) is consumed FIRST: before 7 October 2026 the plain-character branch ate the backtick + # and the escaped quote ended the string, so `$first:` after a `" in pc1-arc-trace.ps1 sat outside every string + # and the job failed to parse on PC 1 (run-ia-arc-trace-20261007, 0 s) + for seg in re.findall(r'"(?:`.|[^"`\\]|\\.)*"', line): for m in pat.finditer(seg): if m.group(1) in ok_names: continue print(f'ps-drive-ref: {f}:{n}: `${m.group(1)}:` inside a double-quoted string parses as a drive-qualified variable in PowerShell 5.1; write `${{{m.group(1)}}}:`') diff --git a/tools/intel-arc/pc1-arc-trace.ps1 b/tools/intel-arc/pc1-arc-trace.ps1 index 028d506ed..aca26831c 100644 --- a/tools/intel-arc/pc1-arc-trace.ps1 +++ b/tools/intel-arc/pc1-arc-trace.ps1 @@ -59,7 +59,7 @@ foreach ($mode in @('auto', 'local')) { else { "RESULT VERDICT $mode prefix equal over $n lines but the counts differ"; $verdicts[$mode] = 'count differs' } continue } - "RESULT VERDICT $mode first divergence at snapshot $first: gpu `"$($gpuLines[$first])`" cpu `"$($cpuLines[$first])`"" + "RESULT VERDICT $mode first divergence at snapshot ${first}: gpu `"$($gpuLines[$first])`" cpu `"$($cpuLines[$first])`"" $lo = [math]::Max(0, $first - 6); $hi = [math]::Min($n - 1, $first + 6) for ($k = $lo; $k -le $hi; $k++) { "RESULT ctx $mode $k $(if ($gpuLines[$k] -eq $cpuLines[$k]) { 'same' } else { 'DIFF' }) gpu=$($gpuLines[$k] -replace '^TRACE \d+ ', '') cpu=$($cpuLines[$k] -replace '^TRACE \d+ ', '')" } # which registers differ at the first divergence, and how many of the later snapshots agree again (a one-off vs a cascade)