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 <noreply@anthropic.com>
This commit is contained in:
parent
b1893ce831
commit
f248bfd81f
2 changed files with 5 additions and 2 deletions
|
|
@ -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)}}}:`')
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue