Windows performance proof for issue 40430 Environment: Windows Server 2025, 4 vCPU, 16 GiB; Git 2.56.1.windows.1; Node 26.13.1. Base: d4d54658f919d1b643566f579f6fabe109927628 Head: 6c688d7012d3c77fe73de8b4a671d836fc2f262c Synthetic repository: source commit ca6e09c3e1191c8d46a9b97dd658ccb65dde8fcb, 32,168 tracked files; local bare origin; work tracks origin/work. No browser is open. Each side has its own freshly created T3 home and runs the actual server from source, not a test harness. Commands after fetching the head into a Windows source checkout: git worktree add C:/p/base d4d54658f919d1b643566f579f6fabe109927628 git worktree add C:/p/head 6c688d7012d3c77fe73de8b4a671d836fc2f262c Run vp i in each worktree. Run setup.ps1 with your source checkout path (script below). Write base-serve.cmd and head-serve.cmd (below). Start the side's server using Invoke-CimMethod -ClassName Win32_Process -MethodName Create -Arguments @{CommandLine="cmd.exe /c C:/p/-serve.cmd"}; save its ProcessId. Wait for startup, then run: powershell -ExecutionPolicy Bypass -File C:/p/measure.ps1 9 Copy status.ts to each checkout as apps/server/evidence-status.ts. After the measurement, run it from the side's apps/server directory: node evidence-status.ts C:/p/-home http://127.0.0.1: C:/p/repos/p0 Stop the captured server process tree with taskkill /PID /T /F before measuring the other side. Copy trace files from each side's home/userdata/logs/server.trace.ndjson* into -traces/ in the analysis directory. Copy the timestamped run outputs there. Decode PowerShell Out-File UTF-16 text to UTF-8 before analysis. Run node analyze.cjs . The initial thread start is a warm-up, excluded from the nine measured turns. Each measured turn sends go using --wait, then idles 12 s, matching the reported reproduction. Trace windows include finalization after CLI completion. Count VcsProcess.spawn/runGitCommand spans using ancestry, not a separate git shim. Timing definition: statusPipelineMs runs from RunFinalizationService.refresh start to the last end of its refreshLocalStatus/refreshPullRequestStatus descendants. The PR phase is forked; the root span alone can finish earlier. Both the root duration and the full status-pipeline duration are retained. All nine measurements are included, with median, min, max, and full max-minus-min spread. Correctness: CLI exit codes, persisted replay output and run state, clean work branch tracking origin/work, Git ahead/behind, and actual RPC status snapshot after measurement. No remote fetch is introduced between the two phases. Public trace files retain only span names, IDs, ancestry and timestamps/durations; arguments and attributes are omitted to avoid exposing paths or machine metadata. Round 1 measured head then base. It confirmed process removal and the PR-phase speedup, but full status-pipeline median improvement did not exceed run spread. The same procedure was repeated in reverse order (base then head), using new empty homes named base2-home and head2-home, retaining every first-round result. For round 2, pass 2 as the final measure.ps1/collect.ps1 argument and use the round-2 serve scripts. Only the home and output paths change. No source or repository state is changed. For the second-round formatted output, publish_report.py has the display-only order label changed from "head first, base second" to "base first, head second". The measurement and analysis code are identical. The exact second-round publisher is included below. ===== setup.ps1 ===== param([Parameter(Mandatory=$true)][string]$SourceCheckout) $ErrorActionPreference = 'Continue' New-Item -ItemType Directory -Force C:/p/repos, C:/p/out | Out-Null git clone --bare --no-local $SourceCheckout C:/p/repos/remote.git if ($LASTEXITCODE) { throw 'bare clone failed' } git clone C:/p/repos/remote.git C:/p/repos/p0 Set-Location C:/p/repos/p0 git config user.name Synthetic git config user.email synthetic@example.com git checkout -b work git push -u origin work (git ls-files | Measure-Object).Count foreach ($side in @('base','head')) { New-Item -ItemType Directory -Force "C:/p/$side-home/userdata" | Out-Null $np = (node -p process.execPath).Replace('\','/') @{providerInstances=@{devReplay=@{displayName='Replay (dev)';driver='acpRegistry';config=@{source='local';commandPath=$np;commandArgs=@("C:/p/$side/apps/server/scripts/dev-replay-agent.ts")}}}} | ConvertTo-Json -Depth 8 -Compress | Set-Content -Encoding ascii "C:/p/$side-home/userdata/settings.json" } Get-CimInstance Win32_OperatingSystem | Select-Object Caption,Version Get-CimInstance Win32_ComputerSystem | Select-Object NumberOfLogicalProcessors,TotalPhysicalMemory git --version node --version ===== base-serve.cmd ===== @echo off set T3CODE_DEV_SEED=0 set T3CODE_TRACE_MAX_BYTES=104857600 cd /d C:\p\base\apps\server node src/bin.ts serve --base-dir C:/p/base-home --port 4800 --host 127.0.0.1 > C:\p\out\base-server.log 2>&1 ===== head-serve.cmd ===== @echo off set T3CODE_DEV_SEED=0 set T3CODE_TRACE_MAX_BYTES=104857600 cd /d C:\p\head\apps\server node src/bin.ts serve --base-dir C:/p/head-home --port 4801 --host 127.0.0.1 > C:\p\out\head-server.log 2>&1 ===== base2-serve.cmd ===== @echo off set T3CODE_DEV_SEED=0 set T3CODE_TRACE_MAX_BYTES=104857600 cd /d C:\p\base\apps\server node src/bin.ts serve --base-dir C:/p/base2-home --port 4800 --host 127.0.0.1 > C:\p\out\base2-server.log 2>&1 ===== head2-serve.cmd ===== @echo off set T3CODE_DEV_SEED=0 set T3CODE_TRACE_MAX_BYTES=104857600 cd /d C:\p\head\apps\server node src/bin.ts serve --base-dir C:/p/head2-home --port 4801 --host 127.0.0.1 > C:\p\out\head2-server.log 2>&1 ===== measure.ps1 ===== param([string]$side, [int]$n=9, [string]$round="") $ErrorActionPreference = 'Continue' $bin = "C:/p/$side/apps/server/src/bin.ts" $homeDir = "C:/p/$side$round-home" $runDir = "C:/p/out/$side-$(Get-Date -Format yyyyMMdd-HHmmss)" New-Item -ItemType Directory -Force $runDir | Out-Null $runDir | Set-Content "C:/p/out/$side-latest.txt" Set-Location C:/p/repos/p0 node $bin project add --base-dir $homeDir C:/p/repos/p0 2>&1 | Out-File "$runDir/$side-project.txt" $id = node $bin thread start --base-dir $homeDir --provider devReplay --model command-output C:/p/repos/p0 go if ($LASTEXITCODE) { throw "thread start failed: $id" } $id = "$id".Trim() Start-Sleep 15 for ($i = 0; $i -lt $n; $i++) { $t0 = [DateTimeOffset]::Now.ToUnixTimeMilliseconds() node $bin thread send --base-dir $homeDir $id go --wait --json 2>&1 | Out-File "$runDir/$side-turn-$i.txt" $code = $LASTEXITCODE Start-Sleep 12 $t1 = [DateTimeOffset]::Now.ToUnixTimeMilliseconds() @{run=$i;start=$t0;end=$t1;exitCode=$code} | ConvertTo-Json -Compress | Add-Content "$runDir/$side-windows.jsonl" if ($code) { throw "turn $i failed" } } node $bin thread show --base-dir $homeDir $id --messages 25 --json | Out-File "$runDir/$side-thread.json" git status --porcelain=v1 --branch | Out-File "$runDir/$side-git-status.txt" git rev-list --left-right --count 'HEAD...@{upstream}' | Out-File "$runDir/$side-divergence.txt" ===== collect.ps1 ===== param([string]$side, [string]$port, [string]$round="") $runDir = Get-Content "C:/p/out/$side-latest.txt" Set-Location "C:/p/$side/apps/server" node evidence-status.ts "C:/p/$side$round-home" "http://127.0.0.1:$port" C:/p/repos/p0 > "$runDir/$side-status.json" $files = Get-ChildItem $runDir -File foreach ($file in $files) { $content = Get-Content -Raw $file.FullName [System.IO.File]::WriteAllText($file.FullName, $content, (New-Object System.Text.UTF8Encoding($false))) } New-Item -ItemType Directory -Force "C:/p/out/$side$round-traces" | Out-Null Copy-Item "C:/p/$side$round-home/userdata/logs/server.trace.ndjson*" "C:/p/out/$side$round-traces/" Write-Output $runDir ===== status.ts ===== import { execFileSync } from "node:child_process"; import * as NodeWS from "@effect/platform-node/NodeWS"; import { WsRpcGroup, ORCHESTRATION_PROTOCOL_VERSION } from "@t3tools/contracts"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import * as Stream from "effect/Stream"; import { RpcClient, RpcSerialization } from "effect/rpc"; import { Socket } from "effect/socket"; const [home, origin, cwd] = process.argv.slice(2); const token = execFileSync(process.execPath, ["src/bin.ts", "auth", "session", "issue", "--base-dir", home, "--token-only"], {encoding:"utf8"}).trim(); const response = await fetch(`${origin}/api/auth/websocket-ticket`, {method:"POST", headers:{Authorization:`Bearer ${token}`}}); if (!response.ok) throw new Error(`ticket HTTP ${response.status}`); const {ticket} = await response.json(); const program = Effect.gen(function* () { const protocol = yield* Layer.build(RpcClient.layerProtocolSocket().pipe(Layer.provide(Socket.layerWebSocket(`${origin.replace(/^http/,"ws")}/ws?orchestrationProtocol=${ORCHESTRATION_PROTOCOL_VERSION}&wsTicket=${encodeURIComponent(ticket)}`)), Layer.provide(RpcSerialization.layerJson), Layer.provide(NodeWS.layerWebSocketConstructor))); const client = yield* RpcClient.make(WsRpcGroup).pipe(Effect.provideContext(protocol)); const snapshot = yield* client.subscribeVcsStatus({cwd}).pipe(Stream.take(1), Stream.runCollect); console.log(JSON.stringify(snapshot)); }); await Effect.runPromise(program.pipe(Effect.scoped)); ===== analyze.cjs ===== const fs = require('fs'); const path = require('path'); const [dir, side] = process.argv.slice(2); const lines = file => fs.readFileSync(file,'utf8').replace(/^\uFEFF/,'').split(/\r?\n/).filter(Boolean); const spans = fs.readdirSync(path.join(dir,side+'-traces')).flatMap(f=>lines(path.join(dir,side+'-traces',f)).map(l=>{try{return JSON.parse(l)}catch{return null}}).filter(Boolean)); const byId = new Map(spans.map(s=>[s.spanId,s])); function ancestor(s,name){while(s){if(s.name===name)return s;s=byId.get(s.parentSpanId)}return null} const git = s=>s.name==='VcsProcess.spawn'||s.name==='runGitCommand'; const time = s=>Number(BigInt(s.startTimeUnixNano)/1000000n); const duration=s=>Math.round(s.durationMs*1000)/1000; const windows = lines(path.join(dir,side+'-windows.jsonl')).map(JSON.parse); const runs = windows.map(w=>{ const inside=spans.filter(s=>time(s)>=w.start && time(s)<=w.end); const spawns=inside.filter(git); const refresh=inside.filter(s=>s.name==='RunFinalizationService.refresh'); const reads=inside.filter(s=>s.name==='readStatusDetailsRemote'&&ancestor(s,'RunFinalizationService.refresh')); const phases=['VcsStatusBroadcaster.refreshLocalStatus','VcsStatusBroadcaster.refreshPullRequestStatus']; return {run:w.run,exitCode:w.exitCode,totalGit:spawns.length,refreshGit:spawns.filter(s=>ancestor(s,'RunFinalizationService.refresh')).length,refresh:refresh.map(s=>({spanId:s.spanId,ms:duration(s),statusPipelineMs:Math.round((Math.max(...inside.filter(x=>ancestor(x,'RunFinalizationService.refresh')===s && ['VcsStatusBroadcaster.refreshLocalStatus','VcsStatusBroadcaster.refreshPullRequestStatus'].includes(x.name)).map(x=>Number(BigInt(x.startTimeUnixNano))/1e6+x.durationMs))-Number(BigInt(s.startTimeUnixNano))/1e6)*1000)/1000})),upstreamReads:reads.map(s=>({spanId:s.spanId,ms:duration(s),git:spawns.filter(g=>ancestor(g,'readStatusDetailsRemote')===s).length})),phases:Object.fromEntries(phases.map(n=>[n,inside.filter(s=>s.name===n&&ancestor(s,'RunFinalizationService.refresh')).map(s=>({ms:duration(s),git:spawns.filter(g=>ancestor(g,n)===s).length}))]))}; }); const summarize=arr=>{const sorted=arr.toSorted((a,b)=>a-b);return{median:sorted[Math.floor(sorted.length/2)],min:sorted[0],max:sorted.at(-1),spread:sorted.at(-1)-sorted[0]}}; const phaseMs=n=>summarize(runs.flatMap(r=>r.phases[n].map(s=>s.ms))); const result={side,runs,summary:{localStatusMs:phaseMs('VcsStatusBroadcaster.refreshLocalStatus'),pullRequestStatusMs:phaseMs('VcsStatusBroadcaster.refreshPullRequestStatus'),refreshMs:summarize(runs.flatMap(r=>r.refresh.map(s=>s.ms))),statusPipelineMs:summarize(runs.flatMap(r=>r.refresh.map(s=>s.statusPipelineMs))),totalGit:[...new Set(runs.map(r=>r.totalGit))],refreshGit:[...new Set(runs.map(r=>r.refreshGit))],upstreamReads:[...new Set(runs.map(r=>r.upstreamReads.length))],upstreamGit:[...new Set(runs.map(r=>r.upstreamReads.reduce((a,s)=>a+s.git,0)))]}}; fs.writeFileSync(path.join(dir,side+'-measurement.json'),JSON.stringify(result,null,2)); // Public trace contains only timing and span ancestry, with no arguments, paths, or machine metadata. fs.writeFileSync(path.join(dir,side+'-timing-trace.ndjson'),spans.filter(s=>windows.some(w=>time(s)>=w.start&&time(s)<=w.end)).map(s=>JSON.stringify(Object.fromEntries(['name','traceId','spanId','parentSpanId','startTimeUnixNano','endTimeUnixNano','durationMs','status'].filter(k=>k!=='status').map(k=>[k,s[k]])))).join('\n')); console.log(JSON.stringify(result,null,2)); ===== equivalence.py ===== import json from pathlib import Path p=Path(__file__).parent results={} for side in ['base','head']: a=json.loads((p/f'{side}-thread.json').read_text()) snapshot=json.loads((p/f'{side}-status.json').read_text())[0] snapshot['local']['workingTree'].pop('rootPath',None) turns=[json.loads((p/f'{side}-turn-{i}.txt').read_text()) for i in range(9)] results[side]={'thread':{k:a['thread'][k] for k in ['status','activeRunId','branch','runCount','pendingRequestCount']},'messages':[{k:m[k] for k in ['role','text']} for m in a['messages']], 'measuredTurns':[{'status':t['status'],'reply':t['reply'],'error':t['error']} for t in turns], 'statusSnapshot':snapshot, 'gitStatus':(p/f'{side}-git-status.txt').read_text().strip(),'gitAheadBehind':(p/f'{side}-divergence.txt').read_text().strip()} comparison={'identical':results['base']==results['head'],'results':results} (p/'functional-equivalence.json').write_text(json.dumps(comparison,ensure_ascii=False,indent=2)) print(json.dumps(comparison,ensure_ascii=False,indent=2)) ===== render_report.py ===== import json, statistics from pathlib import Path from PIL import Image, ImageDraw, ImageFont p=Path(__file__).parent base=json.loads((p/'base-measurement.json').read_text()) head=json.loads((p/'head-measurement.json').read_text()) bs=base['summary']['statusPipelineMs']; hs=head['summary']['statusPipelineMs'] delta=bs['median']-hs['median'] lines=['Windows turn-end status performance comparison', 'Windows Server 2025 | 4 vCPU | 16 GiB | Git 2.56.1.windows.1 | Node 26.13.1', 'Base: d4d54658f919d1b643566f579f6fabe109927628', 'Head: 6c688d7012d3c77fe73de8b4a671d836fc2f262c', '32,168 tracked files; local bare remote; work tracks origin/work; no browser.', 'Initial replay turn excluded; nine measured thread send go --wait turns per commit; 12 s idle.', 'All measured runs retained. Durations come from real server trace spans.', '', 'Run | Base status pipeline ms | Head status pipeline ms | Base/Head status git | Base/Head upstream reads'] for b,h in zip(base['runs'],head['runs']): lines.append(f"{b['run']+1:3} | {b['refresh'][0]['statusPipelineMs']:23.3f} | {h['refresh'][0]['statusPipelineMs']:23.3f} | {b['refreshGit']}/{h['refreshGit']} | {len(b['upstreamReads'])}/{len(h['upstreamReads'])}") lines += ['',f"Base median {bs['median']:.3f} ms; range {bs['min']:.3f}-{bs['max']:.3f}; full spread {bs['spread']:.3f} ms.", f"Head median {hs['median']:.3f} ms; range {hs['min']:.3f}-{hs['max']:.3f}; full spread {hs['spread']:.3f} ms.",f"Median improvement {delta:.3f} ms ({100*delta/bs['median']:.1f}%); greater than either full run spread: {delta > max(bs['spread'],hs['spread'])}.", f"Status git per turn: {base['summary']['refreshGit']} -> {head['summary']['refreshGit']}; all git per turn: {base['summary']['totalGit']} -> {head['summary']['totalGit']}.", f"Upstream read invocations: {base['summary']['upstreamReads']} -> {head['summary']['upstreamReads']}; upstream git: {base['summary']['upstreamGit']} -> {head['summary']['upstreamGit']}.", '', f"Base PR-refresh phase: {base['summary']['pullRequestStatusMs']}.", f"Head PR-refresh phase: {head['summary']['pullRequestStatusMs']}.", 'Timing: root refresh start through last completion of its local-status/PR-status phases.', 'The root refresh forks the PR phase; its own duration is also included in measurement JSON.', 'Functional equivalence and phase timing details are in the attached measurement JSON and status output.'] (p/'comparison.txt').write_text('\n'.join(lines)+'\n') font='/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf' f=lambda n:ImageFont.truetype(font,n) im=Image.new('RGB',(1600,1160),'#f8fafc'); d=ImageDraw.Draw(im) d.text((55,35),'Turn-end status: one upstream read',fill='#111827',font=f(38)) d.text((55,92),'Windows Server 2025 · 4 vCPU / 16 GiB · Git 2.56.1 · 32,168 files',fill='#475569',font=f(22)) d.text((55,132),'9 replay turns per commit; same repository; no browser; all runs included',fill='#475569',font=f(22)) colors=['#b45309','#047857'] maxms=max(bs['max'],hs['max'])*1.12 x0,x1=400,1510 def x(ms):return x0+(x1-x0)*ms/maxms for i,(name,obj,color) in enumerate(zip(['Before · d4d54658f9','After · 6c688d7012'],[base,head],colors)): y=270+i*175; s=obj['summary']['statusPipelineMs'] d.text((55,y-35),name,fill=color,font=f(27)) d.text((55,y+12),f"median {s['median']:.1f} ms",fill='#111827',font=f(24)) d.line((x(s['min']),y,x(s['max']),y),fill=color,width=5) for j,r in enumerate(obj['runs']): xx=x(r['refresh'][0]['statusPipelineMs']); yy=y+(j%3-1)*16 d.ellipse((xx-6,yy-6,xx+6,yy+6),fill=color) xx=x(s['median']);d.line((xx,y-35,xx,y+35),fill=color,width=5) d.text((x0,y+55),f"range {s['min']:.1f}–{s['max']:.1f} ms; spread {s['spread']:.1f} ms",fill='#475569',font=f(22)) d.text((55,600),f"Median improvement: {delta:.1f} ms ({100*delta/bs['median']:.1f}%)",fill='#111827',font=f(33)) d.text((55,655),f"Improvement exceeds both full spreads: {str(delta>max(bs['spread'],hs['spread'])).upper()}",fill='#111827',font=f(25)) for j,(label,b,h) in enumerate([('Git processes in status finalization',str(base['summary']['refreshGit'][0]),str(head['summary']['refreshGit'][0])),('Upstream reads per turn',str(base['summary']['upstreamReads'][0]),str(head['summary']['upstreamReads'][0])),('Git processes in upstream reads',str(base['summary']['upstreamGit'][0]),str(head['summary']['upstreamGit'][0]))]): y=740+j*66;d.text((55,y),label,fill='#334155',font=f(25));d.text((1000,y),b+' → '+h,fill='#111827',font=f(27)) d.text((55,995),'Timing: refresh start → completion of local status and forked PR status.',fill='#475569',font=f(22)) d.text((55,1035),'One warm-up turn excluded; 12 s idle between measured turns.',fill='#475569',font=f(22)) d.text((55,1075),'Source: actual server trace spans; raw timing ancestry and driver attached.',fill='#475569',font=f(22)) im.save(p/'comparison.png') print('\n'.join(lines)) ===== publish_report.py ===== import json, zipfile from pathlib import Path p=Path(__file__).parent shas={'base':'d4d54658f919d1b643566f579f6fabe109927628','head':'6c688d7012d3c77fe73de8b4a671d836fc2f262c'} equivalence=json.loads((p/'functional-equivalence.json').read_text()) for side in ['base','head']: a=json.loads((p/f'{side}-measurement.json').read_text()) lines=[f'Windows real-server measurement: {side}',f'Commit: {shas[side]}','Windows Server 2025; 4 vCPU; 16 GiB; Git 2.56.1.windows.1; server Node 26.13.1.','32,168 tracked files; local bare remote; work tracks origin/work; no browser.','One initial replay turn excluded; nine measured sends; 12 seconds idle after each send.','Measurement order: head first, base second, on the same leased machine and repository.','No measured runs omitted.','','run | status pipeline ms | root refresh ms | local phase ms | PR phase ms | all git | status git | upstream read ms (git count)'] for r in a['runs']: local=r['phases']['VcsStatusBroadcaster.refreshLocalStatus'][0]['ms'];pr=r['phases']['VcsStatusBroadcaster.refreshPullRequestStatus'][0]['ms'] reads=', '.join(f"{s['ms']:.3f} ({s['git']})" for s in r['upstreamReads']) lines.append(f"{r['run']+1} | {r['refresh'][0]['statusPipelineMs']:.3f} | {r['refresh'][0]['ms']:.3f} | {local:.3f} | {pr:.3f} | {r['totalGit']} | {r['refreshGit']} | {reads}") lines += ['', 'Summary:',json.dumps(a['summary'],indent=2), '', 'Functional result:',json.dumps(equivalence['results'][side],ensure_ascii=False,indent=2), '', 'Same functional output on both commits: '+str(equivalence['identical']), '', 'Timing definition: root refresh start through completion of its local and forked PR status phases. Root span duration is separately reported because it may finish before the forked phase.'] (p/f'{side}-output.txt').write_text('\n'.join(lines)+'\n') with zipfile.ZipFile(p/'timing-and-results.zip','w',zipfile.ZIP_DEFLATED) as z: for name in ['base-timing-trace.ndjson','head-timing-trace.ndjson','base-measurement.json','head-measurement.json','base-windows.jsonl','head-windows.jsonl','functional-equivalence.json']: z.write(p/name,name) ===== round2/publish_report.py ===== import json, zipfile from pathlib import Path p=Path(__file__).parent shas={'base':'d4d54658f919d1b643566f579f6fabe109927628','head':'6c688d7012d3c77fe73de8b4a671d836fc2f262c'} equivalence=json.loads((p/'functional-equivalence.json').read_text()) for side in ['base','head']: a=json.loads((p/f'{side}-measurement.json').read_text()) lines=[f'Windows real-server measurement: {side}',f'Commit: {shas[side]}','Windows Server 2025; 4 vCPU; 16 GiB; Git 2.56.1.windows.1; server Node 26.13.1.','32,168 tracked files; local bare remote; work tracks origin/work; no browser.','One initial replay turn excluded; nine measured sends; 12 seconds idle after each send.','Measurement order: base first, head second, on the same leased machine and repository.','No measured runs omitted.','','run | status pipeline ms | root refresh ms | local phase ms | PR phase ms | all git | status git | upstream read ms (git count)'] for r in a['runs']: local=r['phases']['VcsStatusBroadcaster.refreshLocalStatus'][0]['ms'];pr=r['phases']['VcsStatusBroadcaster.refreshPullRequestStatus'][0]['ms'] reads=', '.join(f"{s['ms']:.3f} ({s['git']})" for s in r['upstreamReads']) lines.append(f"{r['run']+1} | {r['refresh'][0]['statusPipelineMs']:.3f} | {r['refresh'][0]['ms']:.3f} | {local:.3f} | {pr:.3f} | {r['totalGit']} | {r['refreshGit']} | {reads}") lines += ['', 'Summary:',json.dumps(a['summary'],indent=2), '', 'Functional result:',json.dumps(equivalence['results'][side],ensure_ascii=False,indent=2), '', 'Same functional output on both commits: '+str(equivalence['identical']), '', 'Timing definition: root refresh start through completion of its local and forked PR status phases. Root span duration is separately reported because it may finish before the forked phase.'] (p/f'{side}-output.txt').write_text('\n'.join(lines)+'\n') with zipfile.ZipFile(p/'timing-and-results.zip','w',zipfile.ZIP_DEFLATED) as z: for name in ['base-timing-trace.ndjson','head-timing-trace.ndjson','base-measurement.json','head-measurement.json','base-windows.jsonl','head-windows.jsonl','functional-equivalence.json']: z.write(p/name,name)