# code-dupes.allow -- deliberate twins, with a budget and a reason.
# Format: fileA | fileB | budget | reason
# Generated by --baseline; every entry below is PRE-EXISTING duplication
# frozen so the gate only reports NEW or GROWING copies. The budget must
# EQUAL the measurement: a copy that shrank fails until its row says so.


# 2026-09-01: twins created or grown by the prevention-gate work. Reasons are
# specific; the two worth merging are recorded in docs/refactoring-backlog.md F3.

# --- PowerShell lane, frozen 2026-09-08 (ITEM 9) ------------------------------
# windows/ held 50,862 lines of .ps1/.psm1 that no structural gate scanned. The
# rows below are that lane's duplication AS MEASURED the day the gate learned to
# read PowerShell: nothing was fixed to get here, and nothing may grow from here.
# Same contract as every row above -- the budget EQUALS the measurement, so a
# shrink must be recorded and a pair that stops overlapping must be deleted.

# --- 2026-09-15, the six upstreamed helpers. Thirteen NEW pairs, each recorded at
# the measurement. Two real copies were given an owner first rather than budgeted:
# app_packaging_require_flatpak_tools and app_packaging_assert_flatpak_committed
# (the 73-shingle app-packaging.sh self-pair, gone), and t_stubbed_script in
# tests/test-harness.sh (which took the printf '%q' loop and the `bash -c` body
# out of the two new fixture runners). What is below is what remains after that.
# --- 2026-09-23, the rocm sdk layer's GPU loaders (Install-VulkanLoader.ps1, rocm-checks/GpuLoaders.ps1, the OpenCL
# ICD registration): twelve NEW pairs, each READ with --explain and recorded at the measurement.

linux/scripts/06-packaging/smoke-runtime-image.sh | linux/scripts/06-packaging/smoke-runtime-image.sh | 16 | Native probe transport, result verdicts, pin reads and consumer version comparisons now have shared owners. Consumer-contract and manifest-tree scaffolding remains frozen. Re-measured after shared shipped-truth and GStreamer/libunwind probe-completion helpers.
linux/Dockerfile.media | linux/Dockerfile.toolchain | 81 | reviewed 2026-09-02 by MEASUREMENT: longest shared run 5 line(s) — below any threshold worth extracting a helper for. A shared idiom, not a copy. Budget pinned
linux/Dockerfile.android | linux/Dockerfile.sdk | 18 | reviewed 2026-09-02 by MEASUREMENT: longest shared run 8 line(s). Small enough that a helper would cost more indirection than it saves, large enough to watch — budget pinned so growth trips the gate. NOT read line-by-line; revisit if it grows Re-measured 2026-09-04: -1 when Dockerfile.android's PATH left the ENV block it could not read (docs/code-quality-tooling.md#env-instruction-ordering-dockerfile-lint).
linux/Dockerfile.amd | linux/Dockerfile.nvidia | 14 | 20 -> 14 on 2026-09-22: the ENABLE_ROCM_ASAN ARG and its comment broke the shared ARG run between the two GPU layer files. PRIOR: 18 -> 20 on 2026-09-21 (post-rebase measurement); PRIOR: reviewed 2026-09-02 by MEASUREMENT: longest shared run 8 line(s). Small enough that a helper would cost more indirection than it saves, large enough to watch — budget pinned so growth trips the gate. NOT read line-by-line; revisit if it grows
linux/Dockerfile.android | linux/Dockerfile.media | 25 | 11 -> 25 on 2026-09-23 (riscv-tools): the web-lane-tools producer RUN mounts cross-env.sh's closure file by file, the same per-file bind-mount idiom media's RUNs spell out; longest identical run 1 line(s), a mount cannot be factored out of a Dockerfile instruction. PRIOR: reviewed 2026-09-02 by MEASUREMENT: longest shared run 10 line(s). Small enough that a helper would cost more indirection than it saves, large enough to watch — budget pinned so growth trips the gate. NOT read line-by-line; revisit if it grows Re-measured 2026-09-04: -1 when Dockerfile.android's PATH left the ENV block it could not read (docs/code-quality-tooling.md#env-instruction-ordering-dockerfile-lint).
linux/Dockerfile.media | linux/Dockerfile.sdk | 12 | reviewed 2026-09-02 by MEASUREMENT: longest shared run 5 line(s) — below any threshold worth extracting a helper for. A shared idiom, not a copy. Budget pinned
linux/Dockerfile.torch | linux/llm-stack/Dockerfile | 12 | reviewed 2026-09-02 by MEASUREMENT: longest shared run 0 line(s), and those lines are structural only (fi/esac/}/echo/return). That is the shape of sibling functions in these two, not a copied block. Budget pinned so a real copy still trips it
linux/Dockerfile.sdk | linux/Dockerfile.toolchain | 11 | reviewed 2026-09-02 by MEASUREMENT: longest shared run 9 line(s). Small enough that a helper would cost more indirection than it saves, large enough to watch — budget pinned so growth trips the gate. NOT read line-by-line; revisit if it grows
linux/scripts/01-core/apply-patch.sh | linux/scripts/04-runtime/libcamera-env.sh | 11 | reviewed 2026-09-02 by MEASUREMENT: longest shared run 2 line(s) — below any threshold worth extracting a helper for. A shared idiom, not a copy. Budget pinned
docs/upstream/windows-containers-lsm-session-event-hang.md | docs/upstream/windows-containers-lsm-session-event-hang.md | 16 | reviewed 2026-09-02: the file repeats ITSELF -- the same Windows-Containers issue reference appears in the summary at the top and again in the reference list at the bottom, which is how an upstream write-up is supposed to read. It is a WINDOWS-lane document and the standing rule here is to note, not edit, Windows content from the Linux lane, so the budget is pinned rather than the prose reflowed
linux/Dockerfile.package | linux/Dockerfile.toolchain | 19 | 20 -> 19 on 2026-10-17 by MEASUREMENT: the toolchain's three sccache RUNs gained the S3 secret mount, the library bind and the closing drain, which Dockerfile.package does not share (the shared S3 level). PRIOR: 13 -> 20 on 2026-09-23 (riscv-tools): the setup RUN gained the web-lane-tools bind mounts and its binary cachemount, the same mount idiom; longest identical run 0 line(s). PRIOR: reviewed 2026-09-05 by MEASUREMENT: longest identical run 0 line(s) — the shingles are the BuildKit cache-mount idiom (`--mount=type=cache,target=...,id=...-${TARGETARCH}`), which both stages must spell out per RUN because a mount cannot be factored out of a Dockerfile instruction. The overlap grew when the package stage gained the same cargo registry mount the toolchain stage already had, for the same reason: cargo install must not re-fetch its crates. Budget pinned so a real copied block still trips it
windows/scripts/tests/SourceBuild.PinParity.Tests.ps1 | windows/scripts/tests/SourceBuild.PinParity.Tests.ps1 | 16 | 21 -> 16 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-23: Shared Windows operations and fixtures; measured 34 -> 21. Historical review: Known-site collection, unknown/stale checks and default comparisons have shared owners; scanner-specific projections and known-pin fixtures remain frozen.
windows/scripts/tests/WindowsAgenticLoop.Common.Tests.ps1 | windows/scripts/tests/WindowsAgenticLoop.Common.Tests.ps1 | 20 | 39 -> 20 on 2026-10-25: the legacy/modern config defaults and real-child process transport each have one test fixture owner. The remaining maximum is the overlay-lookup versus no-overlay prompt cases, which assert different config behavior. PRIOR: 45 -> 39 on 2026-10-23 when the Claude and OpenCode full-loop cases shared one Pester -ForEach body.
linux/scripts/lib/agentic-loop.sh | windows/scripts/modules/WindowsAgenticLoop.Common.psm1 | 74 | reviewed 2026-09-08: the first cross-LANE twin this gate has ever been able to see, and it is real -- invoke_build_fixer (bash) and Invoke-AgentProcess (PowerShell) are the same agentic loop written twice. Longest identical run is 2 lines because one is bash and the other PowerShell; neither language can call the other's helper, so there is no shared owner to extract to. Frozen, not excused: the budget is the measurement, so the next paste into either side fails
windows/scripts/diagnostics/Get-HostLsm.ps1 | windows/scripts/diagnostics/Get-SiloProcesses.ps1 | 15 | 2026-10-23: Shared Windows graph, native transport and fixtures; measured 16 -> 15. Historical review: Applied 2026-09-17: WindowsSiloProbe.Common.psm1 now owns the shared setup (cdb discovery, OutDir default, bait container, silo wait, svchost descent); each probe keeps its own measurement half. Budget unchanged by design. PRIOR: reviewed 2026-09-09: EXTRACTION IDENTIFIED, NOT YET APPLIED. Longest identical run 8 lines (Get-HostLsm.ps1:97-104 / Get-SiloProcesses.ps1:50-57) and it is real setup logic, not shape: the bait-container block -- buildctl path check, nonce, $env:TEMP bait dir, the four-line `ARG BASE / FROM ${BASE} / ARG NONCE / RUN echo bait-$NONCE` here-string, and the eight-argument buildctl Start-Process. The two copies differ in exactly two tokens: the temp-dir prefix (hostlsm- vs silo-) and the image tag (diag-hostlsm- vs diag-silo-). One `-Tag` parameter covers both. On top of that the same two files share the cdb.exe discovery and the OutDir default verbatim. This is the densest cluster in the diagnostics scope and one module retires ten rows. Plan and verification in docs/refactoring-backlog.md F4; the budget stays at the measurement until the work lands.
windows/scripts/diagnostics/Invoke-LlvmAarch64Layout.ps1 | windows/scripts/diagnostics/Invoke-LlvmAarch64Layout.ps1 | 22 | 2026-10-24: plan and run phases extracted; measured 30 -> 22. PRIOR: 2026-10-23 audit: the largest overlap is the capture/run entry-point skeleton and their per-case loops. Capture requires a configured Ninja tree and writes preprocessed corpus artifacts; run validates the manifest and compiler-control verdicts. Their loops consume different inputs and enforce different contracts, so a callback-driven common loop would obscure those policies. The other 74 shingles occur across more than six owners and are idiom-cutoff findings. Budget pinned.
windows/scripts/diagnostics/Test-SccacheWrite.ps1 | windows/scripts/diagnostics/Test-SccacheWrite.ps1 | 19 | 2026-10-23: measured 26 -> 19; budget follows the measurement down. PRIOR: 2026-10-23: Shared Windows operations and fixtures; measured 34 -> 26. Historical review: 66 -> 34: Shared probe helpers own root-directory startup, serial compilation, unique source tokens and first-match counters; each mode retains configuration and verdicts. Remaining overlap is the raw rename control and TEMP-staging experiment.
windows/scripts/diagnostics/Test-LayerRename.ps1 | windows/scripts/diagnostics/Test-ProcessIsolationCommit.ps1 | 13 | 2026-10-23: Shared Windows behavior and fixtures; measured 52 -> 13. Historical review: Applied 2026-09-17 (already): the docker.exe walk this row identified had been migrated by d78cd541 to Get-PreferredToolPath; the residual is the two probes' shared setup (nonce, out dir, buildctl path). Measured, not chosen. PRIOR: reviewed 2026-09-09: EXTRACTION IDENTIFIED, NOT YET APPLIED. Longest identical run 9 lines (Test-LayerRename.ps1:60-68 / Test-ProcessIsolationCommit.ps1:61-69), byte-for-byte including the comment: the docker.exe candidate walk over $env:DOCKER_EXE, D:\Stevedore\bin\docker.exe and $env:ProgramFiles\Stevedore\bin\docker.exe, then Get-Command, then a throw. This is the ONE case in the diagnostics scope where the owner already exists and the callers simply never migrated: Get-PreferredToolPath in windows/scripts/modules/WindowsScripts.Shared.psm1:618 is exactly candidate-paths-then-PATH with a -Required switch for the throwing half, and Invoke-DiagnosticProbe.ps1:98 records the migration -- 'Central candidate walk instead of the pasted Stevedore-then-PATH block that used to live in every runner (backlog #101)'. #101 converted the buildctl walks and left the docker ones behind. Nine pasted lines become one call; no new parameter, no new file, no new concept. Plan and verification in docs/refactoring-backlog.md F4; the budget stays at the measurement until the work lands.
windows/scripts/diagnostics/Test-OnnxTuReplay.ps1 | windows/scripts/diagnostics/Test-OnnxTuReplay.ps1 | 24 | 2026-10-23: Shared Windows operations and fixtures; measured 36 -> 33. Historical review: 2026-10-23: Shared Windows behavior and fixtures; measured 58 -> 36. Historical review: reviewed 2026-09-09 by MEASUREMENT: longest identical run 2 line(s) within this 330-line file (139-140 vs 159-160), one of them structural -- the `$tag = if ($_.SideIndicator -eq '<=') {...}` / `Write-Host (" {0}: {1}" -f $tag, $_.InputObject)` pair that formats a Compare-Object result. It appears twice with different labels (ONLY-IN-PLAN/ONLY-IN-EXEC at 137-140, LOST-BY-SCCACHE/ADDED-BY-SCCACHE at 159-162) because the two comparisons answer different questions -- one diffs the define token lists, the other the preprocessor command lines -- and the label pair IS the finding. A helper taking two label strings and a Compare-Object result would be longer than the two lines it replaces. Below any threshold worth extracting a helper for. Budget pinned.
windows/scripts/build/Test-Container.ps1 | windows/scripts/build/Test-Container.ps1 | 12 | 57 -> 12 on 2026-09-23: budget follows the measurement down. PRIOR: reviewed 2026-09-09, READ: the generic half is ALREADY owned. The shared 6-line run (Test-Container.ps1:259/:326/:373) is `Assert-Test -Name .. -Condition { $dir = Join-Path ..; Initialize-SmokeScratch -Path $dir; ..; 'src' / Set-Content ..; }` -- and Assert-Test, Initialize-SmokeScratch and Skip-Test all live in WindowsSmokeTest.Common.psm1. What repeats is the CALL to those helpers; what differs is the whole point of each test (rustc compile+link, glslc shader->SPIR-V, nvcc PTX device code), each with its own source text, its own compiler invocation and its own artifact predicate. One owner would need Name/Source/Extension/Compiler/Args/ArtifactPredicate to serve three callers -- six parameters, and every caller passes a different value for all six. That is worse than three honest copies. Budget pinned
windows/scripts/diagnostics/Find-LsmEventHolder.ps1 | windows/scripts/diagnostics/Get-SiloProcesses.ps1 | 18 | 2026-10-23: Shared Windows graph, native transport and fixtures; measured 24 -> 21. Historical review: Applied 2026-09-17: WindowsSiloProbe.Common.psm1 now owns the bait block (Start-SiloBaitContainer -PassThru), cdb discovery and the OutDir default; Find-LsmEventHolder keeps the buildctl process object. Budget unchanged by design. PRIOR: reviewed 2026-09-09: EXTRACTION IDENTIFIED, NOT YET APPLIED. Longest identical run 6 lines (Find-LsmEventHolder.ps1:115-120 / Get-SiloProcesses.ps1:52-57) -- the bait Dockerfile here-string and its Set-Content. Both also carry the cdb.exe walk, the OutDir default and the wininit-diff wait loop. Same single extraction. Plan and verification in docs/refactoring-backlog.md F4; the budget stays at the measurement until the work lands.
windows/scripts/modules/WindowsSourceBuild.Patches.psm1 | windows/scripts/modules/WindowsSourceBuild.Patches.psm1 | 12 | 18 -> 12 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-23: Shared Windows operations and fixtures; measured 25 -> 18. Historical review: 44 -> 26: regex and callback edits share guarded input loading and verdict handling; distinct patch policies remain frozen.
windows/scripts/build/Build-GstreamerFromSource.ps1 | windows/scripts/build/Build-GstreamerFromSource.ps1 | 18 | 2026-10-23: Shared Windows operations and fixtures; measured 33 -> 21. Historical review: reviewed 2026-09-09, READ: the 10-line run is a MESON INI SCHEMA, not logic -- the `[binaries] c=/cpp=/ar=/strip=/windres=/pkg-config=/cmake=` block of the cross file (Build-GstreamerFromSource.ps1:927) and of the native file (:985). Meson mandates the section and the key names; that is the shape a meson machine file has, and it cannot live anywhere but in the here-string that becomes the file. The two are DELIBERATELY independent and the code says why (#128 comment at :949): a cross file describes the host machine only, so the build machine had no C compiler at all and libnice/webrtc went missing -- the native file exists precisely to carry the SAME compilers WITHOUT --target. They then diverge completely (cross adds needs_exe_wrapper + [host_machine]; native adds [built-in options] link args, /vctoolsdir:, /winsdkdir:). One emitter would need a mode flag per section, and coupling them is the exact bug #128 fixed. Budget pinned
windows/scripts/host/Optimize-HostVhdx.ps1 | windows/scripts/host/Publish-ShimPatch.ps1 | 15 | 2026-10-23: Shared Windows behavior and fixtures; measured 41 -> 15. Historical review: reviewed 2026-09-09, READ (the largest clone family in the repo: Optimize-HostVhdx:75 / Publish-ShimPatch:64 / Update-HostVhdx:67). The 47 shingles are ONE loose chunk and the longest identical run is 5 lines: the #108 $scriptAssetRoot/$repoRoot resolution, the Import-Module lines, New-HostMaintenanceLog, and the two one-line wrappers `function Write-Step` / `function Save-Transcript`. None of it can move. The first two lines LOCATE the modules directory, so they cannot live inside the module they find (bootstrap paradox), and the wrappers must be defined in SCRIPT scope to close over $hostLog -- a module-scoped copy would not see it, which is exactly why WindowsHostMaintenance.Common.psm1 exports Write-HostStep taking $Log explicitly and lets the ~50 call sites keep their old signature through a local wrapper. The real de-duplication already happened on 2026-08-21 (~90 lines: transcript preamble + service stop-loop); what is left is the seam that hands the module its context. Budget pinned so a real copy still trips it
windows/scripts/host/Optimize-HostVhdx.ps1 | windows/scripts/host/Update-HostVhdx.ps1 | 21 | 2026-10-23: Shared VHDX size/free-space snapshots and path-verification reporting now live in WindowsHostMaintenance.Common. The remaining overlap is the different report blocks around compaction and rebuilding; the longest identical run is 2 lines, while guest-volume handling, reclaim math, report-only behavior and whether a failed verification blocks retirement remain caller-specific. Budget pinned
windows/scripts/modules/WindowsBuild.Common.psm1 | windows/scripts/modules/WindowsBuild.Common.psm1 | 17 | 2026-10-23: Shared Windows behavior and fixtures; measured 41 -> 22. Historical review: reviewed 2026-09-09, READ: longest shared run 16 line(s) and all 16 are the Export-ModuleMember -Function name list matched against itself off by one - distinct function names that the normaliser folds to "S". The longest run of real statements is 5: the stopwatch / try / & $Script / $Context.Results.Succeeded.Add shape shared by Invoke-BuildOptional (line 332) and Invoke-BuildStep (line 460). The file ALREADY documents why those two are not merged, in a six-line comment at line 327: Invoke-BuildStep returns $true/$false while Invoke-BuildOptional has always returned nothing and passed the script block's own output straight through, so delegating would either inject a stray boolean into that output or, piped to Out-Null, swallow the tool output the caller wants to read. Two honest copies, deliberately. Budget pinned
windows/scripts/diagnostics/Find-LsmEventHolder.ps1 | windows/scripts/diagnostics/Get-LsmWaitObject.ps1 | 11 | 2026-10-23: Shared Windows preparation and environment lifetimes; measured 16 -> 11. Historical review: Applied 2026-09-17: WindowsSiloProbe.Common.psm1 now owns the shared setup (cdb discovery, OutDir default, bait container, silo wait, svchost descent); each probe keeps its own measurement half. Budget unchanged by design. PRIOR: reviewed 2026-09-09: EXTRACTION IDENTIFIED, NOT YET APPLIED. Longest identical run 8 lines (Find-LsmEventHolder.ps1:133-140 / Get-LsmWaitObject.ps1:55-62), only one of them structural: the silo wait loop -- `$deadline = (Get-Date).AddSeconds($WaitForSiloSec)`, the while-poll that diffs Win32_Process wininit.exe against the baseline PID set, and its throw. The gate names it as a 35-shingle block held by four files. Beyond it the two share the cdb.exe walk, the OutDir default and the services.exe/svchost descent. Real discovery logic with one honest parameter (the timeout), not a shape. Plan and verification in docs/refactoring-backlog.md F4; the budget stays at the measurement until the work lands.
windows/scripts/diagnostics/Find-LsmEventHolder.ps1 | windows/scripts/diagnostics/Get-LsmWaitstack.ps1 | 11 | Applied 2026-09-17: WindowsSiloProbe.Common.psm1 now owns the shared setup (cdb discovery, OutDir default, bait container, silo wait, svchost descent); each probe keeps its own measurement half. Budget unchanged by design. PRIOR: reviewed 2026-09-09: EXTRACTION IDENTIFIED, NOT YET APPLIED. Longest identical run 8 lines (Find-LsmEventHolder.ps1:133-140 / Get-LsmWaitstack.ps1:53-60) -- the same silo wait loop plus the `foreach ($i in 1..20)` services.exe poll. Get-LsmWaitstack uses comsvcs MiniDump instead of cdb, so these two share the discovery half only; that half is exactly what the new module owns. Plan and verification in docs/refactoring-backlog.md F4; the budget stays at the measurement until the work lands.
windows/scripts/diagnostics/Get-LsmWaitObject.ps1 | windows/scripts/diagnostics/Get-LsmWaitstack.ps1 | 16 | Applied 2026-09-17: WindowsSiloProbe.Common.psm1 now owns the shared setup (cdb discovery, OutDir default, bait container, silo wait, svchost descent); each probe keeps its own measurement half. Budget unchanged by design. PRIOR: reviewed 2026-09-09: EXTRACTION IDENTIFIED, NOT YET APPLIED. Longest identical run 8 lines (Get-LsmWaitObject.ps1:55-62 / Get-LsmWaitstack.ps1:53-60) -- the silo wait loop and the services.exe poll. Get-LsmWaitObject's own comment at line 50 already says 'Same silo detection as Get-LsmWaitstack.ps1', so the duplication is known and simply has no owner. That is the clearest possible signal to give it one. Plan and verification in docs/refactoring-backlog.md F4; the budget stays at the measurement until the work lands.
windows/scripts/diagnostics/Get-LsmWaitObject.ps1 | windows/scripts/diagnostics/Get-SiloProcesses.ps1 | 11 | 2026-10-23: Shared Windows preparation and environment lifetimes; measured 16 -> 11. Historical review: Applied 2026-09-17: WindowsSiloProbe.Common.psm1 now owns the shared setup (cdb discovery, OutDir default, bait container, silo wait, svchost descent); each probe keeps its own measurement half. Budget unchanged by design. PRIOR: reviewed 2026-09-09: EXTRACTION IDENTIFIED, NOT YET APPLIED. Longest identical run 6 lines (Get-LsmWaitObject.ps1:55-60 / Get-SiloProcesses.ps1:67-72) -- the deadline plus the wininit-diff while loop. Both also carry the cdb.exe walk and the OutDir default. The two poll intervals differ (3 s vs 2 s), which is one argument, not a mode. Plan and verification in docs/refactoring-backlog.md F4; the budget stays at the measurement until the work lands.
windows/scripts/diagnostics/Get-LsmWaitstack.ps1 | windows/scripts/diagnostics/Get-SiloProcesses.ps1 | 11 | Applied 2026-09-17: WindowsSiloProbe.Common.psm1 now owns the shared setup (cdb discovery, OutDir default, bait container, silo wait, svchost descent); each probe keeps its own measurement half. Budget unchanged by design. PRIOR: reviewed 2026-09-09: EXTRACTION IDENTIFIED, NOT YET APPLIED. Longest identical run 6 lines (Get-LsmWaitstack.ps1:53-58 / Get-SiloProcesses.ps1:67-72) -- the deadline plus the wininit-diff while loop, the same 35-shingle block the gate reports across four files. Both also share the OutDir default. Plan and verification in docs/refactoring-backlog.md F4; the budget stays at the measurement until the work lands.
windows/scripts/modules/WindowsSourceBuild.Common.psm1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 19 | 22 -> 19 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-23: Shared Windows operations and fixtures; measured 32 -> 22. Historical review: 34 -> 32 on 2026-10-07: the twin functions added units holding the same param idioms, so two self-shingles pass the >6-owner cutoff. PRIOR: 35 -> 34 on 2026-10-05: budget follows the measurement down; the Windows WebRTC work added units (SourceBuild.GstreamerWebRtc.Tests.ps1, Get-GstRustCargoPlan, Read-PeExportData and their neighbours) that hold the same idioms, so more of this pair's shingles pass the >6-owner cutoff and drop out. PRIOR: 37 -> 35 on 2026-09-30: budget follows the measurement down, both files UNCHANGED: the torch/torchvision round (2da6c29a, 9427c7a0) and the TestHarness closure helper moved idiom shingles past the >6-owner cutoff. PRIOR: 35 -> 37 on 2026-09-28, file UNCHANGED: the corpus grew (Build-FfmpegCodecs.ps1, the KleidiAI helpers) and two shingles this pair held past the >6-owner idiom cutoff fell back under it. Same bookkeeping as the rows above. PRIOR: 37 -> 35 on 2026-09-23: budget follows the measurement down. PRIOR: reviewed 2026-09-09 by MEASUREMENT: the 115-line "run" is the Export-ModuleMember -Function list at line 1850 matched against itself off by one - 115 distinct function names, every one folded to "S" by the normaliser. A module's export manifest is a language-mandated declaration and has nowhere else to live. The longest run of actual statements is 4: the `if ($X) { $cmakeArgs += "-DCMAKE_...=$X" }` ladder that two cmake-argument builders each spell out (219-222 vs 220-223), where the whole value of each line is the flag it names - folding them into a table would replace four readable lines with a table plus a loop and hide which flag is conditional on what. Budget pinned
windows/scripts/patches/opencv/Get-Ffmpeg9AvcodecConfig.ps1 | windows/scripts/patches/opencv/Get-Ffmpeg9AvcodecConfig.ps1 | 34 | reviewed 2026-09-09, READ: the twin is not PowerShell. The two units are the `$shimHw` (line 57) and `$shimImpl` (line 82) here-strings -- C source injected into OpenCV's videoio -- and the gate is shingling embedded C. Longest identical run 4 lines and it is the shared tail `(const void**)&p, NULL) < 0)` / `return NULL;` / `return p;` / `}`. The two shims differ in return type (const enum AVPixelFormat* vs const AVRational*), config selector (AV_CODEC_CONFIG_PIX_FORMAT vs AV_CODEC_CONFIG_FRAME_RATE), function name, and the pre-avcodec-61.13 fallback field (c->pix_fmts vs c->supported_framerates) -- four substitutions to template two 18-line functions. Doing so would emit C assembled from a PowerShell format string into a third-party tree, which is exactly what this file's own header refuses: it applies the fix as an in-script edit rather than a .patch ON PURPOSE so the anchors stay matchable and the injected text stays greppable when OpenCV reshuffles. Budget pinned so a THIRD shim still trips the gate.
windows/scripts/diagnostics/Test-Arm64Prereqs.ps1 | windows/scripts/diagnostics/Test-Arm64Prereqs.ps1 | 12 | 2026-10-23: Shared Windows operations and fixtures; measured 32 -> 12. Historical review: reviewed 2026-09-09 by MEASUREMENT: longest identical run 1 line(s) within this 221-line file -- not one consecutive pair repeats. The 32 shingles are the repeated `Add-Finding -Question ... -Ok ... -Detail ...` calls that the file's own `$script:Findings` accumulator and Add-Finding function (declared at 54-58) exist to serve. That is a table of questions expressed as calls to a local helper the file ALREADY owns; the repetition is the data, and collapsing it further would mean encoding each prerequisite check as a data row and losing the per-check code that computes it. A shared idiom, not a copy. Budget pinned.
windows/scripts/host/Test-HostSetup.ps1 | windows/scripts/modules/WindowsBuildDriver.Common.psm1 | 15 | 2026-10-23: measured 17 -> 15; budget follows the measurement down. PRIOR: Get-DriveFreeSpaceGb owns the optional drive probe and rounding; the remaining overlap is parameter metadata and host/build disk vocabulary. The host reports PASS/FAIL and keeps checking; the driver refuses a build below its floor. Measured 32 -> 17 on 2026-10-23.
windows/scripts/build/Build-IreeFromSource.ps1 | windows/scripts/build/Build-TvmFromSource.ps1 | 22 | 2026-10-23: Shared Windows behavior and fixtures; measured 27 -> 22. Historical review: 25 -> 27 on 2026-10-07: the cross tvm-ffi assembly became New-TvmFfiCrossWheel and IREE's ukernel edits Update-IreeCrossNinjaFile (CON79); the re-cut units share two more throw-message and staging shingles, longest identical run 2 line(s). PRIOR: 28 -> 25 on 2026-09-23: budget follows the measurement down. PRIOR: 30 -> 28 on 2026-09-23: budget follows the measurement down (the rocm media round added units, so more shared idioms pass the owner cap). PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only (a Join-Path assignment and a brace). The 30 shingles are the CMake-argument accumulation idiom (`$args += '-DFOO=ON'` ladders) that every source-build script in this family runs; the flag NAMES are project-specific (IREE_* vs TVM_/USE_*) and share nothing. The generic half already has an owner -- both call Initialize-SourceBuildScript and Get-SourceBuildVersion from WindowsSourceBuild.Common. A shared idiom, not a copy. Budget pinned
windows/scripts/modules/WindowsBuild.Common.psm1 | windows/scripts/modules/WindowsCMake.Common.psm1 | 16 | 20 -> 16 on 2026-10-05: budget follows the measurement down: Initialize-BuildCacheEnvironment's sccache branch now checks KATAGLYPHIS_NO_SCCACHE first, so its if-block no longer matches the CMake copy's. PRIOR: 30 -> 20 on 2026-09-17: Enable-SccacheCompilerWrapper now owns the five assignments; the residual is param-block shapes and the log banners. PRIOR: reviewed 2026-09-09: EXTRACTION IDENTIFIED, NOT YET APPLIED. 7 consecutive substantive lines (WindowsBuild.Common.psm1:736-744 vs WindowsCMake.Common.psm1:286-294) set exactly the same five environment variables to the resolved sccache path - CMAKE_C_COMPILER_LAUNCHER, CMAKE_CXX_COMPILER_LAUNCHER, RUSTC_WRAPPER, CC_WRAPPER, CXX_WRAPPER - and both carry the same four-line comment explaining why CMAKE_CUDA_COMPILER_LAUNCHER is deliberately absent (tried and reverted 2026-08-08; sccache-wrapped nvcc loses its per-arch .cubin files before fatbinary). The CMake copy's own comment already names the verdict: 'Near-duplicate of the wrapper wiring in Initialize-BuildCacheEnvironment (WindowsBuild.Common.psm1) ... merge candidate.' The duplication is known, flagged in the code, and has simply had no owner. Plan and verification in docs/refactoring-backlog.md F4; the budget stays at the measurement until the work lands.
windows/scripts/modules/WindowsUv.Common.psm1 | windows/scripts/modules/WindowsUv.Common.psm1 | 12 | 15 -> 12 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-23: Shared Windows preparation and environment lifetimes; measured 16 -> 15. Historical review: 17 -> 16 on 2026-10-20: Test-UvVenvHealthy reads the interpreter through a seam and Install-UvRequirements runs the cmake-format lexer fix (pinned CPython); budget follows the measurement down. PRIOR: 22 -> 17 on 2026-10-12: Sync-UvProjectDependencies and Sync-UvChainOnnxRuntime gained the ORT skip (CON91); budget follows the measurement down. PRIOR: 23 -> 22 on 2026-10-05: remeasured after CON55 grew the PowerShell corpus (the MSI functions in WindowsMsix.Common and their tests); neither file changed, the count fell. PRIOR: 27 -> 23 on 2026-10-01: New-UvProjectEnvironment's install-first step changed its param block. PRIOR: 30 -> 27 on 2026-09-23: Sync-UvChainOnnxRuntime / Get-ChainOrtWheelStore joined the module and Sync-UvProjectDependencies' tail changed, which moved param-ladder shingles past the >6-owner idiom cutoff; budget follows the measurement down. PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 9 line(s), of which 7 are param-block lines ([Parameter(Mandatory)][string]$X, [scriptblock]$Y) - the delegate-injection signature every function in this module takes so its caller supplies CommandRunner / LogInfo / LogWarning instead of the module reaching for Write-BuildLog itself. That uniform signature is the reason this module can be the single source of truth for the uv venv lifecycle. The longest run of statements is 2. A param() header cannot live anywhere else. Budget pinned
windows/scripts/build/Build-IreeFromSource.ps1 | windows/scripts/build/Build-IreeFromSource.ps1 | 12 | 2026-10-23: Shared Windows operations and fixtures; measured 29 -> 13. Historical review: reviewed 2026-09-09, READ: the 8-line run IS the call to the owner, and the owner already exists. Build-IreeFromSource.ps1:46 and :90 both read `[void](Invoke-InlineRegexPatch -Path $f `` -SkipIfMatch .. -Pattern .. -Replacement .. -AssertGone .. -Description ..)` -- WindowsSourceBuild.Patches.psm1 owns Invoke-InlineRegexPatch, and what the gate measures is that cmdlet's own parameter list spread over backtick continuations. The two call sites patch DIFFERENT upstream bugs (the x86-64 MASM trampoline in hal/local/elf/CMakeLists.txt, and C `inline` linkage in one arm_64 ukernel) with different regexes. Nothing is left to extract: a wrapper would carry five parameters to save one line. Budget pinned
windows/scripts/modules/WindowsContainerBuild.Reuse.psm1 | windows/scripts/modules/WindowsContainerBuild.Reuse.psm1 | 12 | 18 -> 12 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-23: Shared Windows behavior and fixtures; measured 29 -> 23. Historical review: reviewed 2026-09-09 by MEASUREMENT: longest shared run 13 line(s), and the substantive part of it is five consecutive `[string[]]$X = @(),` declarations inside Invoke-ContainerBuild's param block (line 788 onward) matched against a sibling param block. Named, individually-documented parameters of this module's one public entry point - IncrementalDirs, IncrementalExclude, OutputDirs, VerifyDirs, InboundExclude, OutboundExclude, KeepDirs. A param() header cannot live anywhere else, and collapsing seven named path lists into one hashtable would cost every caller its parameter validation. Budget pinned
windows/scripts/build/Build-OpencvFromSource.ps1 | windows/scripts/build/Build-OpencvFromSource.ps1 | 11 | 13 -> 11 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: Written-source postconditions share Assert-SourceFileContent; distinct ARM patch guard/pattern calls remain frozen.
windows/scripts/diagnostics/Test-OnnxTuReplay.ps1 | windows/scripts/diagnostics/Test-OpencvCudaCmdshape.ps1 | 18 | reviewed 2026-09-09 by MEASUREMENT: longest identical run 5 line(s) and it is lines 1-5 of BOTH files -- `#requires -Version 7.0`, the two-line copyright the license gate requires, and the comment-based-help opener. The rest is the in-container probe preamble (Import-Module C:\bkmnt\modules + Enter-VsDevCmdEnvironment, a call into an existing owner) and the sccache server reset, whose port differs per probe by design (4236 vs the computed `43${i}0`). Budget pinned.
windows/scripts/build/Build-IreeFromSource.ps1 | windows/scripts/build/Build-LitertFromSource.ps1 | 11 | 2026-10-23: Shared Windows operations and fixtures; measured 13 -> 11. Historical review: 15 -> 13 on 2026-10-07: IREE's per-TU ukernel table moved into Update-IreeCrossNinjaFile (CON79); budget follows the measurement down. PRIOR: 20 -> 15 on 2026-09-23: budget follows the measurement down. PRIOR: 27 -> 20 on 2026-09-23: budget follows the measurement down (the rocm media round added units, so more shared idioms pass the owner cap). PRIOR: reviewed 2026-09-09, READ: a NORMALISATION ARTEFACT. The 6-line run is `$flags = [ordered]@{ 'S'='S'; 'S'='S'; ... }` -- the gate folds every string to "S", so two per-TU compiler-flag tables of the same arity measure identical while sharing no actual entry. Build-IreeFromSource.ps1:268 holds per-TU flags for IREE's arm_64 ukernels; Build-LitertFromSource.ps1:241 holds them for XNNPACK's aarch64 microkernels. Different upstream projects, different translation units, different flags. There is no block to own. Budget pinned
windows/scripts/modules/WindowsScripts.Shared.psm1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 20 | 22 -> 20 on 2026-09-23: budget follows the measurement down. PRIOR: 27 -> 22 on 2026-09-17: the export-list overlap grew by the new names and shrank as Assert-FileSha256 absorbed the inline hash checks. PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 20 line(s), all Export-ModuleMember name list on both sides (Shared:737 / SourceBuild:1850), and the next three runs are the same list matched against different windows of the same list. The longest run of real statements is 3 - `$result += "$Prefix$key"` style array appends in a foreach, which is how PowerShell builds an argument list. Nothing to own. Budget pinned
windows/scripts/build/Build-IreeFromSource.ps1 | windows/scripts/build/Build-OnnxFromSource.ps1 | 26 | 30 -> 26 on 2026-10-12: budget follows the measurement down (CON89: the pinned pip installs go through Install-CpythonPipPin). PRIOR: 26 -> 30 on 2026-09-23: grew with the ORT single-source / rocm gap-fill round (shared idiom, no block to own). PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 4 line(s) -- below any threshold worth extracting a helper for. The overlap is the CMake-argument ladder these source-build siblings all run; the flag names are project-owned (IREE_* vs onnxruntime_*) and Build-OnnxFromSource.ps1:163 states the rule explicitly: 'names like onnxruntime_USE_CUDA are ORT-only -- kept local, not in the generic helper'. A shared idiom, not a copy. Budget pinned
windows/scripts/build/Build-LitertLmFromSource.ps1 | windows/scripts/build/Build-LitertLmFromSource.ps1 | 15 | 20 -> 15 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-23: measured 23 -> 21; budget follows the measurement down. PRIOR: reviewed 2026-09-09, READ: the 7-line run is the call shape of Edit-SourceFile -Path -Marker -Description -WarnMessage -Transform { param($t) ... }, invoked ~20 times in this one file (:205, :219, :229, :238, :253, :272, :322, :349, :379, :394, :427, :460, :503, :512, :523 ...). Edit-SourceFile is the owner and it already exists; every call carries a different Marker, a different regex and a different upstream defect. This file IS the LiteRT-LM patch stack -- the allowlist header names that stack as a protected, permanent twin class. A wrapper would take the same five parameters. Budget pinned
windows/scripts/build/Export-LitertLmBridge.ps1 | windows/scripts/build/Export-LitertLmBridge.ps1 | 20 | 2026-10-23: extracting Copy-SourceBuildFileIfAbsent reduced this self-pair from 21 to 20. The remaining match is the distinct entry skeleton for the export-stub and support-graft functions; longest shared run 3 lines. Budget follows the measurement
windows/scripts/build/Test-Container.ps1 | windows/scripts/modules/WindowsSmokeTest.Common.psm1 | 18 | 2026-10-23: Shared Windows graph, native transport and fixtures; measured 21 -> 18. Historical review: 2026-10-23: Shared Windows behavior and fixtures; measured 43 -> 21. Historical review: 44 -> 43: remeasured after shared test-fixture extraction; existing residual overlap remains frozen.
windows/scripts/host/Install-Cuda.ps1 | windows/scripts/host/Install-Rocm.ps1 | 12 | reviewed 2026-09-22, READ: longest shared run 3 line(s), all of them CALLS to the one resolver that already owns the logic -- `$X = Resolve-ContainerImageValue -Value $X -EnvironmentVariable '<PIN>'` (WindowsContainerImage.Common.psm1:14), once per pin. Same verdict as the Install-Cuda/Install-ScoopTools row above: this is what a correctly de-duplicated pin site looks like, and moving the argument lists into a helper would hide which pin each script reads. Budget pinned so a real copy still trips it
windows/scripts/modules/WindowsGstPlugins.Common.psm1 | windows/scripts/modules/WindowsRustToolchain.Common.psm1 | 15 | 2026-10-23: Shared Windows operations and fixtures; measured 21 -> 15. Historical review: reviewed 2026-09-09 by MEASUREMENT: longest shared run 7 line(s), 4 of them substantive, and those four are the multi-line `throw ("..." + "..." + "...")` shape both files use to raise a long, actionable diagnostic. The messages are completely different - pkg-config failing to resolve a plugin dependency against a missing sibling module needed by Invoke-DownloadWithRetry - and the normaliser folds every string to "S", which is the whole of this match. A shared idiom, not a copy. Budget pinned
windows/scripts/host/Install-NewHost.ps1 | windows/scripts/host/Test-HostSetup.ps1 | 20 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s) -- `try {` plus one `(Invoke-WebRequest -Uri $u -Method Head -TimeoutSec N -UseBasicParsing).StatusCode` reachability probe, and elsewhere a bare `@('...', '...')` literal of the same two paths. Install-NewHost DRIVES the host setup and Test-HostSetup GRADES it, so both must name the same endpoint and the same expected files; that agreement is the contract between them, not a copied block. Budget pinned
windows/scripts/build/Build-OpencvFromSource.ps1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 19 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 1 line(s) -- no contiguous block, only scattered shingles where a source-build script calls the module that owns its scaffolding. A shared idiom, not a copy. Budget pinned
windows/scripts/modules/WindowsSourceBuild.Common.psm1 | windows/scripts/modules/WindowsSourceBuild.Patches.psm1 | 19 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 13 line(s), of which the substantive part is 3 - the tail-of-output error shape `$V = ($V / Select-Object -Last N) -join [Environment]::NewLine; throw "S"`. The rest is the module preamble and the Export list. Two files that both report a failed external step by quoting its last lines; three lines with different messages either side. Budget pinned
windows/scripts/host/Test-HostSetup.ps1 | windows/scripts/modules/WindowsBuild.Common.psm1 | 13 | 16 -> 13 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only -- a trailing `[string]$Name = ''` parameter and the closing `)` of a param() header. A param block is a language-mandated shape that cannot live anywhere else. Budget pinned so a real copy still trips it
windows/scripts/modules/WindowsBuild.Common.psm1 | windows/scripts/modules/WindowsFormatting.Common.psm1 | 16 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 6 line(s), 3 of them substantive: the missing-path guard `if (-not (Test-Path $V)) { Write-BuildLog -Context $V -Message "S"; return $V }`. Both modules log through the same Write-BuildLog family, which is what makes the lines identical after normalisation; the paths tested and the messages logged are unrelated. A shared idiom, not a copy. Budget pinned
windows/scripts/modules/WindowsGstPlugins.Common.psm1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 12 | 2026-10-23: Shared Windows operations and fixtures; measured 18 -> 12. Historical review: reviewed 2026-09-09 by MEASUREMENT: longest shared run 7 line(s), 3 of them substantive, and those three are the multi-line `throw ("..." + "...")` concatenation both use for long operator-facing diagnostics - different messages, identical only after the normaliser folds every string to "S". Same finding as the GstPlugins/RustToolchain row in this file. Budget pinned
shared/windows/tests/Submodule.Pins.Tests.ps1 | shared/windows/tests/Submodule.Pins.Tests.ps1 | 17 | reviewed 2026-09-09, READ: the two units are the `It 'has every configured submodule initialised'` (line 195) and `It 'has no submodule checked out away from its recorded commit'` (line 210) blocks. Longest identical run 6 lines, and all six are the Pester assertion skeleton: `It "..." {` / `if ($script:X.Count -gt 0) {` / a banner Write-Host / `$script:X / ForEach-Object { Write-Host ... }` / `throw ("..." +` / `"..." +`. Every token of substance is the message, and the message IS the deliverable: one tells you to check out with `submodules: true` in actions/checkout, the other to restore with `git submodule update --checkout --recursive` or update the gitlink deliberately. A shared `Assert-EmptyPinSet -Items -Banner -Message` costs three parameters to save four lines and moves the failure text one indirection away from the `It` a reader opens the suite to read. Budget pinned so a fifth copy still trips the gate.
windows/scripts/build/Build-GstreamerFromSource.ps1 | windows/scripts/diagnostics/Test-OpencvVideoBackends.ps1 | 17 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 1 line(s) -- no contiguous block, only scattered shingles over shared GStreamer/OpenCV vocabulary. A hand-run diagnostic must stay self-contained: it is what an operator runs when the build script is not the thing being trusted. Budget pinned
windows/scripts/build/Build-GstreamerFromSource.ps1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 17 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. The script imports this module (:81) and the residual overlap is the shape of that relationship. Budget pinned
windows/scripts/build/Build-GstreamerFromSource.ps1 | windows/scripts/tests/SourceBuild.PkgConfig.Tests.ps1 | 17 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. A Pester suite that asserts the pkg-config emitter's behaviour necessarily restates the shapes it checks -- that restatement is the test oracle. Merging would make the test assert itself. Budget pinned
windows/scripts/build/Build-FfmpegFromSource.ps1 | windows/scripts/build/Build-IreeFromSource.ps1 | 11 | 16 -> 11 on 2026-09-23: budget follows the measurement down (the rocm media round added units, so more shared idioms pass the owner cap). PRIOR: reviewed 2026-09-09, READ: a NORMALISATION ARTEFACT. The 6-line run is `[ordered]@{ 'S'='S'; ... }` -- the gate folds every string literal to "S", so two unrelated ordered tables of similar arity measure identical. Build-FfmpegFromSource.ps1:507 holds inline patch targets that are GENERATED by configure; Build-IreeFromSource.ps1:269 holds per-TU flags for arm_64 ukernels. No entry is shared. There is no block to own. Budget pinned
windows/scripts/build/Build-GstreamerFromSource.ps1 | windows/scripts/build/Build-OpencvFromSource.ps1 | 12 | 2026-10-23: Shared Windows behavior and fixtures; measured 32 -> 12. Historical review: 35 -> 32 on 2026-10-12: budget follows the measurement down; the two bazel drivers' WindowsBazel.Common lookup (CON91) holds the same asset-root idiom, so more shingles pass the >6-owner cutoff. PRIOR: 36 -> 35 on 2026-10-05: budget follows the measurement down; the Windows WebRTC work added units (SourceBuild.GstreamerWebRtc.Tests.ps1, Get-GstRustCargoPlan, Read-PeExportData and their neighbours) that hold the same idioms, so more of this pair's shingles pass the >6-owner cutoff and drop out. PRIOR: 14 -> 36 on 2026-09-23: the G2 ORT gate's import (one comment + two lines: modules\ in the repo, the per-file ortmods\ mount in the container) is the same text in all five ORT consumers by design; it cannot move into the shared closure (WindowsSourceBuild.Common, whose every edit re-keys each media branch) and the module it locates cannot own its own lookup. PRIOR: 16 -> 14 on 2026-09-21 (budget follows the measurement down); PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 4 line(s) -- the inline-patch call shape, whose owner (Invoke-InlineRegexPatch, WindowsSourceBuild.Patches.psm1) already exists. Below any threshold worth a further helper. Budget pinned
windows/scripts/build/Build-TvmFromSource.ps1 | windows/scripts/host/Install-Cuda.ps1 | 14 | 2026-10-23: Shared Windows behavior and fixtures; measured 15 -> 14. Historical review: 21 -> 15 on 2026-10-07: the cross tvm-ffi assembly left the script body for New-TvmFfiCrossWheel (CON79); budget follows the measurement down. PRIOR: 22 -> 21 on 2026-09-23: budget follows the measurement down. PRIOR: 15 -> 22 on 2026-09-20: the CUDA 13.4.2 network-installer rewrite (c23370ea) shares more of the download/pin-lookup idiom with the TVM builder; the growth is real and recorded, not hidden. PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Shared CUDA path vocabulary between an installer and a consumer, not shared logic. Budget pinned
windows/scripts/host/Optimize-HostVhdx.ps1 | windows/scripts/host/Optimize-HostVhdx.ps1 | 13 | 2026-10-23: measured 15 -> 13 after the shared VHDX snapshot helper replaced repeated file-size/free-space reads; the before and after snapshots remain separate so the delta sources stay visible. Budget follows the measurement down.
windows/scripts/modules/WindowsClang.Common.psm1 | windows/scripts/modules/WindowsFormatting.Common.psm1 | 13 | 18 -> 16 on 2026-10-07: Invoke-ClangFormatCheck dropped its backlog-pointer line. PRIOR: 21 -> 18 on 2026-10-06: the tidy step's serial loop and parallel runner replace the old per-file loop. PRIOR: 15 -> 21 on 2026-10-02: the tidy step's compile-DB filter adds a Get-Content/ConvertFrom-Json foreach and a Where-Object pair the formatting check shares as idiom (longest identical run 4 line(s)); the tool-resolution block below is unchanged. PRIOR: reviewed 2026-09-09, READ: longest shared run 5 line(s), 3 substantive - the tool-resolution guard `$V = Get-Command "S" -ErrorAction SilentlyContinue; if (-not $V) { throw "S" }`. Each names a different tool (clang-tidy against cmake-format / clang-format) and throws different install instructions. Three lines is the whole of it, and WindowsClang.Common's own header already records that it reuses Get-ProjectCppFiles from WindowsFormatting.Common rather than re-implementing the part that mattered. Budget pinned
windows/scripts/modules/WindowsConfig.Common.psm1 | windows/scripts/modules/WindowsContainerImage.Common.psm1 | 11 | 2026-10-23: Shared Windows operations and fixtures; measured 15 -> 13. Historical review: reviewed 2026-09-09 by MEASUREMENT: longest shared run 5 line(s) and exactly ONE of them carries a statement (`return $V`); the other four are closing braces and a param header. 15 shingles of scattered vocabulary overlap between a config-path resolver and an image-reference resolver. There is nothing here to own. Budget pinned
windows/scripts/build/Build-OpencvFromSource.ps1 | windows/scripts/build/Debug-LitertlmLink.ps1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Debug-LitertlmLink.ps1 is a hand-run link diagnostic, deliberately standalone so it can be dropped into a broken image. Merging would couple a debugging aid to a production build script. Budget pinned
windows/scripts/build/Copy-TargetPythonDeps.ps1 | windows/scripts/build/Copy-TargetPythonDeps.ps1 | 11 | 14 -> 11 on 2026-09-23: budget follows the measurement down (the rocm media round added units, so more shared idioms pass the owner cap). PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 1 line(s) -- there is no contiguous block at all, only scattered shingles between sibling copy steps in one small script. A shared idiom, not a copy. Budget pinned
windows/scripts/host/Install-ScoopTools.ps1 | windows/scripts/host/Install-ScoopTools.ps1 | 16 | 15 -> 16 on 2026-09-30: the Vulkan preseed became Copy-PreseedToScoopCache (OpenSSL's x64 preseed calls it too), and its System32 curl --retry fetch shingles with the compiler-rt fetch; longest identical run 3 lines. PRIOR: 26 -> 15 on 2026-09-30: the OpenSSL-arm64 arm now reads its url and hash from the bucket manifest instead of two literals, so the fetch-to-TEMP prelude no longer shingles with the compiler-rt arm. PRIOR: 16 -> 26 on 2026-09-30: the comment sweep moved the link-failure notes between the two fetch arms to docs/windows-cross-builds.md, so the arms now shingle across; code unchanged. PRIOR: 14 -> 16 on 2026-09-17: #160 ported the verify + System32-tar tail into the OpenSSL-arm64 copy; bodies still diverge below the tar line. PRIOR: reviewed 2026-09-09, READ: longest shared run 5 line(s) -- the fetch-to-TEMP arm of the two aarch64 side-artifact installs (compiler-rt builtins mined out of the LLVM tarball at :267, OpenSSL-arm64 from the slproweb installer at :355): `$url = '...'` / `$tmp = Join-Path $env:TEMP '...'` / `try {` / `Write-Host '...'` / `Invoke-DownloadWithRetry -Url $url -DestinationPath $tmp`. The download itself already has one owner; below that line the two bodies diverge completely -- one extracts a single .lib from a tar.xz into the host clang lib directory, the other runs an .exe installer into C:\opt\openssl-arm64. Each is preceded by ~15 lines of comment recording the measured link failure it exists to prevent (`undefined symbol: __udivti3`; `machine type x64 conflicts with arm64`); a common owner would separate those notes from the code they explain. Budget pinned
windows/scripts/host/Invoke-BkWarm.ps1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 14 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s) -- `$code = if (Test-Path Variable:\LASTEXITCODE) { $LASTEXITCODE } else { 0 }` and `if ($code) { throw '...' }`. That is the language-mandated way to read an exit code that may not exist yet under Set-StrictMode; WindowsSourceBuild.Common alone contains three separate instances of it (:508, :1381, :1564), which is why the shingles land three different ways. Idiom, not a copy. Budget pinned
windows/scripts/modules/WindowsSourceBuild.Patches.psm1 | windows/scripts/patches/opencv/Get-Ffmpeg9AvcodecConfig.ps1 | 14 | reviewed 2026-09-09, READ: longest shared run 3 line(s) - one Join-Path to a directory inside a vendored source tree, then two more to the specific headers under it. Both files are source-tree patchers and both must locate exactly two headers before patching, but the trees (onnxruntime DirectMLHelpers against OpenCV modules/videoio/src), the filenames and the patches share nothing. Three Join-Path lines. Budget pinned
.claude/hooks/guard-destructive-deletes.ps1 | windows/scripts/build/Build-LitertLmFromSource.ps1 | 13 | reviewed 2026-09-09 by MEASUREMENT: longest identical run 0 line(s) -- not one normalised line matches between the two units, the only such pair in this review. The 13 shingles are the token sequence of two consecutive `[regex]::Replace($x, "...", "...")` statements: guard-destructive-deletes.ps1:135-136 blanks single- then double-quoted spans out of a candidate command before scanning it for destructive verbs, and Build-LitertLmFromSource.ps1:529-533 rewrites two CMake link-spec conditions inside an Edit-SourceFile transform. A Claude Code safety hook and a LiteRT-LM CMake patcher share the .NET regex API and nothing else. Budget pinned.
windows/scripts/build/Build-FfmpegFromSource.ps1 | windows/scripts/build/Build-GstreamerFromSource.ps1 | 12 | 2026-10-23: Shared Windows behavior and fixtures; measured 32 -> 12. Historical review: 35 -> 32 on 2026-10-12: budget follows the measurement down; the two bazel drivers' WindowsBazel.Common lookup (CON91) holds the same asset-root idiom, so more shingles pass the >6-owner cutoff. PRIOR: 36 -> 35 on 2026-10-05: budget follows the measurement down; the Windows WebRTC work added units (SourceBuild.GstreamerWebRtc.Tests.ps1, Get-GstRustCargoPlan, Read-PeExportData and their neighbours) that hold the same idioms, so more of this pair's shingles pass the >6-owner cutoff and drop out. PRIOR: 13 -> 36 on 2026-09-23: the G2 ORT gate's import, the same three lines in all five ORT consumers by design (see the Gstreamer | Opencv row). PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 1 line(s) -- no contiguous block, despite both being media source builds. A shared idiom, not a copy. Budget pinned
windows/scripts/build/Build-FfmpegFromSource.ps1 | windows/scripts/build/Build-OnnxFromSource.ps1 | 13 | 2026-10-23: measured 19 -> 13; budget follows the measurement down. PRIOR: 22 -> 19 on 2026-10-12: budget follows the measurement down (CON89: the pinned pip installs go through Install-CpythonPipPin). PRIOR: 13 -> 22 on 2026-09-23: grew with the ORT single-source / rocm gap-fill round (shared idiom, no block to own). PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 3 line(s), and those lines are structural only. Two source-build siblings; the flag ladders they share fold to "S" and hold no common entry. Budget pinned
windows/scripts/build/Build-GstreamerFromSource.ps1 | windows/scripts/modules/WindowsBuildKit.Common.psm1 | 12 | 13 -> 12 on 2026-09-26: budget follows the measurement down (the 2026-09-26 backlog sweep moved shared idioms across the owner cap). PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 1 line(s) -- no contiguous block. A shared idiom, not a copy. Budget pinned
windows/scripts/build/Build-IreeFromSource.ps1 | windows/scripts/build/Build-OpencvFromSource.ps1 | 12 | 13 -> 12 on 2026-10-07: Build-IreeFromSource.ps1 re-cut by Update-IreeCrossNinjaFile (CON79); budget follows the measurement down. PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 1 line(s) -- no contiguous block. A shared idiom, not a copy. Budget pinned
windows/scripts/build/Build-LitertLmFromSource.ps1 | windows/scripts/build/Build-TvmFromSource.ps1 | 13 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Two source-build siblings whose shared scaffolding already has an owner in WindowsSourceBuild.Common. A shared idiom, not a copy. Budget pinned
windows/scripts/build/Build-LitertLmFromSource.ps1 | windows/scripts/build/Export-LitertLmBridge.ps1 | 13 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 3 line(s), and those lines are structural only. Both belong to the LiteRT-LM patch/graft stack the allowlist header names as a protected twin class, and they run in different stages -- the patcher inside the source build, the bridge exporter after it. Budget pinned
windows/scripts/host/Install-Cuda.ps1 | windows/scripts/host/Install-Tensorrt.ps1 | 13 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s) -- two adjacent `[Environment]::SetEnvironmentVariable('<ROOT>', $path, 'Process')` calls publishing each installer's root to the rest of the RUN step. Both files carry the same comment explaining that process scope is deliberate and the durable value comes from the Dockerfile ENV line. Two lines of a .NET call with different variable names; nothing to own. Budget pinned
windows/scripts/tests/BuildKit.ModuleClosure.Tests.ps1 | windows/scripts/tests/Modules.ScriptCallClosure.Tests.ps1 | 13 | reviewed 2026-09-09, READ: longest shared run 4 line(s) — the BeforeAll that computes `$repoRoot`, `$moduleDir` and `$buildDir`. The two suites are the two halves of the same guard on purpose: ModuleClosure asks whether a script's imports are MOUNTED into the container, ScriptCallClosure whether the functions a script CALLS are in its import list. They must be able to fail independently, and their shared preamble is three path variables. Get-RepoRoot could own the first line; the rest is each suite's own scope. Budget pinned
windows/scripts/build/Build-FfmpegFromSource.ps1 | windows/scripts/build/Build-LitertFromSource.ps1 | 11 | 12 -> 11 on 2026-09-23: budget follows the measurement down (the rocm media round added units, so more shared idioms pass the owner cap). PRIOR: reviewed 2026-09-09, READ: a NORMALISATION ARTEFACT. The 7-line run is `[ordered]@{` plus six folded `'S'='S'` entries. Build-FfmpegFromSource.ps1:507 holds configure-generated patch targets; Build-LitertFromSource.ps1:242 holds per-TU flags for XNNPACK aarch64 microkernels. No entry is common -- only the literal's shape. Budget pinned
windows/scripts/build/Build-LitertLmFromSource.ps1 | windows/scripts/build/Test-Container.ps1 | 12 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 3 line(s), and those lines are structural only. A builder and the smoke gate that verifies its output, in different image closures; naming the same artifacts is the contract between them. Budget pinned
windows/scripts/build/Build-OpencvFromSource.ps1 | windows/scripts/modules/WindowsBuild.Common.psm1 | 12 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 3 line(s), and those lines are structural only. A shared idiom, not a copy. Budget pinned
windows/scripts/host/Start-GeniexServers.ps1 | windows/scripts/host/Start-GeniexServers.ps1 | 12 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 3 line(s), and those lines are structural only (`}` / `return $result` / `}`) -- the tails of sibling functions, which is the shape this file has, not a copied block. Every one of its nine self-overlaps is closing braces. Budget pinned so a real copy still trips it
shared/config/Sync-SharedConfig.ps1 | shared/config/Sync-SharedConfig.ps1 | 11 | reviewed 2026-09-09, READ: longest identical run 3 line(s) and those lines are the function tail (`}` / `return $x` / `}`). The units are Get-AssetRegistry (line 84) and Get-DeclaredAsset (line 136). Their shared half ALREADY has an owner: both iterate Read-ManifestRow (line 69), the single parser for '#'-commented, field-trimmed manifest rows. What remains is each function's own row validation, and it is genuinely different on both axes -- the OWNER side takes 4 to 5 pipe-separated fields (id/canonical/default/mode[/knobs]) and rejects an unknown mode, the CONSUMER side takes 1 to 2 whitespace-separated fields and rejects an id ANTfrastructure does not own; they emit different objects (an ordered registry keyed by id vs a list of asset/local pairs). Merging them means a mode flag per caller. Budget pinned.
windows/scripts/build/Build-FfmpegFromSource.ps1 | windows/scripts/build/Build-OnnxGenaiFromSource.ps1 | 11 | 2026-10-23: Shared Windows behavior and fixtures; measured 32 -> 12. Historical review: 35 -> 32 on 2026-10-12: budget follows the measurement down; the two bazel drivers' WindowsBazel.Common lookup (CON91) holds the same asset-root idiom, so more shingles pass the >6-owner cutoff. PRIOR: 36 -> 35 on 2026-10-05: budget follows the measurement down; the Windows WebRTC work added units (SourceBuild.GstreamerWebRtc.Tests.ps1, Get-GstRustCargoPlan, Read-PeExportData and their neighbours) that hold the same idioms, so more of this pair's shingles pass the >6-owner cutoff and drop out. PRIOR: 11 -> 36 on 2026-09-23: the G2 ORT gate's import, the same three lines in all five ORT consumers by design (see the Gstreamer | Opencv row); they extend the #108 asset-root preamble, hence the 5-line run. PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-FfmpegFromSource.ps1 | windows/scripts/build/Build-OpencvFromSource.ps1 | 11 | 2026-10-25: Shared required-child checks reduced the measured overlap from 13 to 12. PRIOR: 2026-10-23: Shared Windows behavior and fixtures; measured 32 -> 13. Historical review: 35 -> 32 on 2026-10-12: budget follows the measurement down; the two bazel drivers' WindowsBazel.Common lookup (CON91) holds the same asset-root idiom, so more shingles pass the >6-owner cutoff. PRIOR: 36 -> 35 on 2026-10-05: budget follows the measurement down; the Windows WebRTC work added units (SourceBuild.GstreamerWebRtc.Tests.ps1, Get-GstRustCargoPlan, Read-PeExportData and their neighbours) that hold the same idioms, so more of this pair's shingles pass the >6-owner cutoff and drop out. PRIOR: 11 -> 36 on 2026-09-23: the G2 ORT gate's import, the same three lines in all five ORT consumers by design (see the Gstreamer | Opencv row); they extend the #108 asset-root preamble, hence the 5-line run. PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-FfmpegFromSource.ps1 | windows/scripts/build/Build-TvmFromSource.ps1 | 12 | 16 -> 12 on 2026-11-13: FFI version scoping and metadata validation reduce the measured shared run. PRIOR: 13 -> 16 on 2026-10-12 (CON89), measured with --explain: both Cython pins moved into Install-CpythonPipPin, the one owner of a pinned pip install, so the PyAV block's run with TVM's python block is whole again; longest identical run 2 line(s). PRIOR: 18 -> 13 on 2026-10-07 (CON80), measured with --explain: the PyAV block's Cython pin lines now sit between Initialize-PythonPlatformTag and its pip install, which split the run it shared with TVM's python block (18 -> 13 shingles there). 11 -> 18 on 2026-10-07: READ: both now call Invoke-FreeThreadedTwinWheel, the one owner of the setup.py/pip-wheel twin, with their own arguments; longest identical run 2 line(s). PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-IreeFromSource.ps1 | windows/scripts/build/Build-OnnxGenaiFromSource.ps1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-IreeFromSource.ps1 | windows/scripts/build/Export-LitertLmBridge.ps1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-LitertFromSource.ps1 | windows/scripts/build/Build-OnnxGenaiFromSource.ps1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-LitertFromSource.ps1 | windows/scripts/build/Build-OpencvFromSource.ps1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-LitertFromSource.ps1 | windows/scripts/build/Build-TvmFromSource.ps1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-OnnxGenaiFromSource.ps1 | windows/scripts/build/Build-OpencvFromSource.ps1 | 11 | 2026-10-23: ONNX patch, CUDA target predicate and source-build fixtures now have shared owners; measured 20 -> 12. PRIOR: 2026-10-23: Shared Windows behavior and fixtures; measured 32 -> 20. Historical review: 35 -> 32 on 2026-10-12: budget follows the measurement down; the two bazel drivers' WindowsBazel.Common lookup (CON91) holds the same asset-root idiom, so more shingles pass the >6-owner cutoff. PRIOR: 36 -> 35 on 2026-10-05: budget follows the measurement down; the Windows WebRTC work added units (SourceBuild.GstreamerWebRtc.Tests.ps1, Get-GstRustCargoPlan, Read-PeExportData and their neighbours) that hold the same idioms, so more of this pair's shingles pass the >6-owner cutoff and drop out. PRIOR: 20 -> 36 on 2026-09-23: the G2 ORT gate's import, the same three lines in all five ORT consumers by design (see the Gstreamer | Opencv row); they extend the #108 asset-root preamble, hence the 5-line run. PRIOR: budget -> 20 on 2026-09-20 (grew with the TAPPAS/cppzmq wiring); PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-OnnxGenaiFromSource.ps1 | windows/scripts/build/Build-TvmFromSource.ps1 | 11 | 2026-10-23: source-build preparation and CUDA target policy now have shared owners; measured 13 -> 11. PRIOR: budget -> 13 on 2026-09-20 (grew with the TAPPAS/cppzmq wiring); PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Budget pinned
windows/scripts/build/Build-OpencvFromSource.ps1 | windows/scripts/build/Build-TvmFromSource.ps1 | 12 | 2026-10-23: source-build preparation and CUDA target policy now have shared owners; measured 13 -> 12. PRIOR: budget -> 13 on 2026-09-20 (grew with the TAPPAS/cppzmq wiring); PRIOR: reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. Two source-build siblings on owned scaffolding. Budget pinned
windows/scripts/build/Build-OpencvFromSource.ps1 | windows/scripts/diagnostics/Test-OpencvVideoBackends.ps1 | 11 | reviewed 2026-09-09, READ: the 5-line run is a nested else-ladder of `} else { Write-Host "S" }` -- structural only, and the messages differ entirely. Test-OpencvVideoBackends.ps1:168 reads the opencv-configure.log AFTER the fact to explain what the build decided; Build-OpencvFromSource.ps1:516 is the provenance gate that makes the decision. Reader and writer of the same log, deliberately independent so the diagnostic still works when the build script is the suspect. Budget pinned
windows/scripts/build/Build-TvmFromSource.ps1 | windows/scripts/diagnostics/Test-BuildCopy.ps1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 2 line(s), and those lines are structural only. A hand-run copy diagnostic, self-contained by design. Budget pinned
windows/scripts/build/Write-BundleManifest.ps1 | windows/scripts/diagnostics/Get-SiloProcesses.ps1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest shared run 3 line(s), and those lines are structural only -- the List/Add and string-formatting idiom, over two entirely unrelated outputs (a bundle manifest and a silo process listing). A shared idiom, not a copy. Budget pinned
windows/scripts/diagnostics/Test-OnnxTuReplay.ps1 | windows/scripts/modules/WindowsFormatting.Common.psm1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest identical run 3 line(s) (Test-OnnxTuReplay.ps1:249-251 / WindowsFormatting.Common.psm1:188-190) and those lines are structural only -- a `foreach` head, a `Write-Host` with an `-f` format string and a closing brace. The 11 shingles are the `("{0}: {1}" -f ...)` tabular-output idiom, which PowerShell has exactly one spelling for. Two files formatting aligned columns is not a copied block, and the module in question formats source code while the probe formats a define-set diff. Budget pinned so a real copy still trips it.
windows/scripts/diagnostics/Test-OpencvCudaCmdshape.ps1 | windows/scripts/patches/opencv/Get-Ffmpeg9AvcodecConfig.ps1 | 11 | reviewed 2026-09-09 by MEASUREMENT: longest identical run 3 line(s) (Test-OpencvCudaCmdshape.ps1:13-15 / Get-Ffmpeg9AvcodecConfig.ps1:34-36) and those lines are structural only -- param entries and a closing brace. The 11 shingles are the regex-capture-and-dedupe idiom plus the opencv build vocabulary both files name. One reads an ffmpeg avcodec configuration out of a source tree, the other measures how sccache classifies an opencv CUDA command line; they share a subject area and PowerShell's single spelling for token extraction, not a block. Budget pinned so a real copy still trips it.
windows/scripts/build/Build-MediaCoreAll.ps1 | windows/scripts/tests/SourceBuild.Chain.Tests.ps1 | 19 | reviewed 2026-09-09, READ: a test mirroring its subject. SourceBuild.Chain.Tests.ps1:40 builds the same @{Name;Script;SourceDir} stage-list shape that Build-MediaCoreAll.ps1:43 passes to Invoke-SourceBuildChain - because that is what it is testing. A test that constructed the input differently from its callers would be testing something else. Budget at the measurement
windows/scripts/build/Build-MediaCoreAll.ps1 | windows/scripts/build/Build-MediaTvmAll.ps1 | 19 | 15 -> 19 on 2026-10-07: media-tvm runs Build-TargetCpython.ps1 plainly again, both trees, for the arm64 cross twins to link (CON79), so its stage-list literal is media-core's shape once more. PRIOR: 19 -> 15 on 2026-10-07: media-tvm's Target CPython stage became an Invoke scriptblock that passes -SkipFreeThreaded (CON74), so the stage-list literals share less. PRIOR: reviewed 2026-09-09, READ: the owner already exists and both files name it. The shared block is the @{Name;Script;SourceDir} stage-list literal handed to Invoke-SourceBuildChain, and Build-MediaCoreAll.ps1:43 says so - "Invoke-SourceBuildChain owns the banner + native-exit check". What repeats is the CALL, not the logic; the stage contents share nothing (media codecs vs the two LLVM-heavy ML compilers). A data literal cannot be given an owner without inventing a registry neither caller wants. Budget at the measurement
linux/scripts/02-toolchain/vulkan.sh | linux/scripts/tests/test-vulkan-target-decomposition.sh | 12 | VK7 2026-09-09, DELIBERATE and must not be dedup'd: the shared shingles are the eight paths of clean_nonsdk_files' BUILD_DXC arm, written out once in _vulkan_target_prune_nonsdk_dxc and once in the suite's fixture+assertion. Longest identical run 1 line. The test's copy is an INDEPENDENT oracle transcribed from the vendor script (vulkansdk:519-528); deriving it from the source instead would make the "gone" assertions tautological and would stop the gate seeing a path DROPPED from the helper -- the "a stub of the unit under test is not coverage of it" lesson. Budget pinned at the measurement so a real copy still trips it
linux/scripts/05-frameworks/flutter/lane-prologue.sh | linux/scripts/run-lint-gates.sh | 11 | new on 2026-09-15, READ: longest identical run 4 line(s), and those four lines are a `printf ... >&2` ladder after a failed precondition -- the shape every diagnostic in this repo has, because the convention is that a refusal names the probed thing AND the fix. One is 'no Flutter SDK at <dir>', the other 'no .antfrastructure-shared.manifest at <root>'. Neither is a copy of the other and there is nothing to extract: a helper that emitted both messages would take the whole message as an argument. Structural only; budget at the measurement.
windows/scripts/modules/WindowsBuildSweep.Common.psm1 | windows/scripts/modules/WindowsTvm.Common.psm1 | 12 | 2026-10-24 owner-approved measured syntax overlap: Invoke-InLinuxContainerBuild assembles container argv, while Write-AssembledWheelDistInfo writes TVM wheel metadata. The 12 normalized shingles are typed mandatory-parameter declarations and list-append idioms; longest identical run 3 line(s), with no shared behavior. Budget equals measurement, so growth still fails.
windows/scripts/build/Export-LitertLmBridge.ps1 | windows/scripts/host/Install-Cuda.ps1 | 13 | 15 -> 13 on 2026-09-23: budget follows the measurement down (the rocm media round added units, so more shared idioms pass the owner cap). PRIOR: added 2026-09-20: same CUDA-installer rewrite, same idiom, different payload (longest identical run 2 lines). Budget pinned
windows/scripts/build/Build-LitertLmFromSource.ps1 | windows/scripts/host/Install-Cuda.ps1 | 14 | added 2026-09-20: same CUDA-installer rewrite, same idiom, different payload (longest identical run 2 lines). Budget pinned
linux/Dockerfile.package | linux/Dockerfile.torch | 11 | added 2026-09-20: both stages COPY 03-media/core/ for their own build scope (longest identical run 1 line); the Hailo builder in the wrapper needs the same media bootstrap the package image already carries. A shared idiom, not a copy. Budget pinned
windows/scripts/build/Build-HailortFromSource.ps1 | windows/scripts/host/Install-Vcpkg.ps1 | 11 | added 2026-09-21: the Windows HailoRT source builder (Build-HailortFromSource.ps1) shares the source-build/download/verify idiom with its Windows siblings (longest identical run 3 line(s)); different payloads and pins. Budget pinned so growth trips
windows/scripts/build/Build-HailortFromSource.ps1 | windows/scripts/build/Test-Container.ps1 | 21 | 20 -> 21 on 2026-09-23: grew with the ORT single-source / rocm gap-fill round (shared idiom, no block to own). PRIOR: added 2026-09-21: the Windows HailoRT source builder (Build-HailortFromSource.ps1) shares the source-build/download/verify idiom with its Windows siblings (longest identical run 2 line(s)); different payloads and pins. Budget pinned so growth trips
windows/scripts/build/Build-HailortFromSource.ps1 | windows/scripts/host/Install-Cuda.ps1 | 14 | 17 -> 14 on 2026-11-23: budget follows the measurement down; it dropped when the three RustDesk host scripts joined, as shingles held by more than MAX_OWNERS units count as idiom. PRIOR: 18 -> 17 on 2026-09-23: budget follows the measurement down. PRIOR: added 2026-09-21: the Windows HailoRT source builder (Build-HailortFromSource.ps1) shares the source-build/download/verify idiom with its Windows siblings (longest identical run 2 line(s)); different payloads and pins. Budget pinned so growth trips
windows/scripts/build/Build-HailortFromSource.ps1 | windows/scripts/build/Build-TvmFromSource.ps1 | 11 | 14 -> 11 on 2026-11-23: budget follows the measurement down; it dropped when the three RustDesk host scripts joined, as shingles held by more than MAX_OWNERS units count as idiom. PRIOR: 15 -> 14 on 2026-09-23: budget follows the measurement down. PRIOR: added 2026-09-21: the Windows HailoRT source builder (Build-HailortFromSource.ps1) shares the source-build/download/verify idiom with its Windows siblings (longest identical run 2 line(s)); different payloads and pins. Budget pinned so growth trips
windows/scripts/build/Build-HailortFromSource.ps1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 13 | added 2026-09-21: the Windows HailoRT source builder (Build-HailortFromSource.ps1) shares the source-build/download/verify idiom with its Windows siblings (longest identical run 2 line(s)); different payloads and pins. Budget pinned so growth trips
windows/scripts/build/Build-GstreamerFromSource.ps1 | windows/scripts/build/Build-HailortFromSource.ps1 | 11 | added 2026-09-21: the Windows HailoRT source builder (Build-HailortFromSource.ps1) shares the source-build/download/verify idiom with its Windows siblings (longest identical run 1 line(s)); different payloads and pins. Budget pinned so growth trips
windows/scripts/build/Build-HailortFromSource.ps1 | windows/scripts/build/Build-HailortFromSource.ps1 | 21 | 19 -> 21 on 2026-09-22 (budget follows the measurement; the four patch sites gained a local owner -- Invoke-HailortSourcePatch -- so the shared skeleton shingles are no longer suppressed as idiom for this pair, longest run 7 -> 5 lines). PRIOR: added 2026-09-21: self-overlap inside the Windows HailoRT source builder -- the same comment/verify idiom repeated per phase (longest identical run 7 lines). Budget pinned
windows/scripts/build/Build-OnnxFromSource.ps1 | windows/scripts/build/rocm-checks/LlamaCpp.ps1 | 23 | new on 2026-10-07, READ with --explain: longest identical run 2 line(s), Invoke-OrtDawnDepsProbe vs Get-LlamaCppProbeModuleFinding: three-mandatory-parameter param blocks and a regex loop over a probe's output. One reads Dawn's deps file through Python, the other the module paths a child pwsh printed. Budget at the measurement
windows/scripts/tests/Rocm.LlamaCpp.Tests.ps1 | windows/scripts/tests/Rocm.Migraphx.Tests.ps1 | 26 | 2026-10-29: measured 29 -> 26 once a new suite turned shared shingles into idiom. 16 -> 29 on 2026-09-23: llama.cpp got a deps.json row test (Rocm.LlamaCpp:644) shaped like MIGraphX's (:251), READ with --explain: longest identical run 2 line(s), two closing braces; the shingles are `$deps = Get-Content ... deps.json -Raw | ConvertFrom-Json`, the 'Windows Image' subsection select, `Assert-Equal 1 $subs.Count` and the every-row-has-spdx count. Different subsections and assertions (per-home llama.cpp rows on one build pin and the libomp row vs the linked pin set). Four suites read deps.json this way (Rocm.Install, Rocm.LitertLm too); a TestHarness helper would own it, a harness change for every suite, not this block's. PRIOR: new on 2026-09-23, READ with --explain: longest identical run 1 line(s), Invoke-LlamaInstallFixture vs the MIGraphX configure test. Both build a throwaway tree with `New-Item -ItemType Directory ... | Out-Null` and a `foreach (...) { Set-Content -LiteralPath (Join-Path ...) -Value ... }` line; the trees and the assertions are unrelated. Budget at the measurement
windows/scripts/tests/Rocm.LlamaCpp.Tests.ps1 | windows/scripts/tests/SourceBuild.Qnn.Tests.ps1 | 11 | new on 2026-09-23, READ with --explain: longest identical run 2 line(s), Invoke-LlamaInstallFixture vs the QNN suite's BeforeAll. Both build a fixture zip the one way the BCL offers (`[System.IO.Compression.ZipFile]::CreateFromDirectory(...)`) and hash it with Get-FileHash; the zips hold unrelated trees. Budget at the measurement
windows/scripts/build/rocm-checks/LiteRtLm.ps1 | windows/scripts/build/rocm-checks/LlamaCpp.ps1 | 13 | new on 2026-09-23, READ with --explain: longest identical run 2 line(s), Get-LiteRtLmLoadFinding vs Get-LlamaCppVulkanProbeScript: both load a DLL in a child pwsh with `NativeLibrary::Load` + `GetExport` inside a try that writes the message and exits 1. LiteRT-LM loads five DLLs against a bin-only PATH; the llama probe loads one against the image PATH and also reports module origins and the Vulkan loader's API. Budget at the measurement
windows/scripts/tests/Rocm.LitertLm.Tests.ps1 | windows/scripts/tests/Rocm.LlamaCpp.Tests.ps1 | 23 | new on 2026-09-23, READ with --explain: longest identical run 2 line(s); Get-TestJsonFile now owns the shared read, with the remaining overlap in Windows Image entry selection. LiteRT-LM looks up DLL names, llama.cpp its two homes and the one build pin. Budget follows the measurement down from 29.
windows/scripts/tests/Rocm.Install.Tests.ps1 | windows/scripts/tests/Rocm.LlamaCpp.Tests.ps1 | 19 | new on 2026-09-23, READ with --explain: longest identical run 2 line(s); Get-TestJsonFile now owns the shared read, and the remaining match is assertion scaffolding. One pins vulkan-1.dll's row to VULKAN_VERSION, the other each llama.cpp home to LLAMA_CPP_HIP_BUILD. Budget follows the measurement down from 23.
windows/scripts/build/Build-MigraphxFromSource.ps1 | windows/scripts/build/Build-OrtAmdgpuEpFromSource.ps1 | 16 | 2026-10-23: Shared Windows operations and fixtures; measured 18 -> 16. Historical review: reviewed 2026-09-23, READ: longest identical run 5 line(s) -- the phase-1 CALL SEQUENCE of the two spike scripts (try / Switch-BuildPhase / Resolve-PinnedSource / its -VersionKey/-ShaKey arguments). The helpers themselves already have one owner, WindowsMigraphx.Common; what is left is two call sites naming different pins (MIGRAPHX_WINDOWS_* vs ORT_AMDGPU_EP_*). Budget pinned
windows/scripts/build/Build-MediaTvmAll.ps1 | windows/scripts/tests/SourceBuild.Chain.Tests.ps1 | 19 | 15 -> 19 on 2026-10-07: media-tvm's Target CPython stage is a plain Script stage again (CON79), the shape the chain suite's fixture literal has. PRIOR: 19 -> 15 on 2026-10-07: media-tvm's Target CPython stage became an Invoke scriptblock that passes -SkipFreeThreaded (CON74). PRIOR: reviewed 2026-09-23 by MEASUREMENT: longest identical run 3 line(s) -- a shared PowerShell idiom (param-block shape, a probe/process preamble or an embedded python header), not a copied block; below any threshold worth extracting a helper for. Budget pinned
windows/scripts/build/Build-IreeFromSource.ps1 | windows/scripts/build/rocm-checks/IREE.ps1 | 19 | reviewed 2026-09-23 by MEASUREMENT: longest identical run 2 line(s) -- a shared PowerShell idiom (param-block shape, a probe/process preamble or an embedded python header), not a copied block; below any threshold worth extracting a helper for. Budget pinned
windows/scripts/build/rocm-checks/IREE.ps1 | windows/scripts/build/rocm-checks/TVM.ps1 | 17 | reviewed 2026-09-23 by MEASUREMENT: longest identical run 2 line(s) -- a shared PowerShell idiom (param-block shape, a probe/process preamble or an embedded python header), not a copied block; below any threshold worth extracting a helper for. Budget pinned
windows/scripts/build/rocm-checks/MIGraphX.ps1 | windows/scripts/build/rocm-checks/TVM.ps1 | 14 | 13 -> 14 on 2026-10-04: back up when the lavapipe helpers landed. PRIOR: reviewed 2026-09-23 by MEASUREMENT: longest identical run 2 line(s) -- a shared PowerShell idiom (param-block shape, a probe/process preamble or an embedded python header), not a copied block; below any threshold worth extracting a helper for. Budget pinned
windows/scripts/build/rocm-checks/MIGraphX.ps1 | windows/scripts/modules/WindowsSmokeTest.Common.psm1 | 11 | reviewed 2026-09-23 by MEASUREMENT: longest identical run 1 line(s) -- a shared PowerShell idiom (param-block shape, a probe/process preamble or an embedded python header), not a copied block; below any threshold worth extracting a helper for. Budget pinned
windows/scripts/modules/WindowsMigraphx.Common.psm1 | windows/scripts/modules/WindowsRustToolchain.Common.psm1 | 11 | reviewed 2026-09-23 by MEASUREMENT: longest identical run 1 line(s) -- a shared PowerShell idiom (param-block shape, a probe/process preamble or an embedded python header), not a copied block; below any threshold worth extracting a helper for. Budget pinned
windows/scripts/build/rocm-checks/GpuLoaders.ps1 | windows/scripts/build/rocm-checks/LlamaCpp.ps1 | 15 | 2026-10-23: Shared Windows behavior and fixtures; measured 42 -> 15. Historical review: 43 -> 42 on 2026-09-23: budget follows the measurement down (the image-env suites made shared shingles more common). PRIOR: new on 2026-09-23, READ with --explain: longest identical run 3 line(s), Invoke-GpuLoaderProbe vs Invoke-LlamaCppProcess -- the child-process-with-timeout shape (ProcessStartInfo, ReadToEndAsync, WaitForExit(ms) then Kill($true), the parameterless WaitForExit, Dispose in finally). Each rocm-check is a standalone script: Dockerfile.rocm-llama bind-mounts LlamaCpp.ps1 alone, so it cannot import a shared helper, and GStreamer.ps1 (Invoke-GstInspectProbe) and MIGraphX.ps1 carry their own for the same reason. GpuLoaders' child is pwsh -EncodedCommand with the ICD path in its env and stdout only. Budget at the measurement
windows/scripts/host/Install-Rocm.ps1 | windows/scripts/host/Install-VulkanLoader.ps1 | 22 | new on 2026-09-23, READ with --explain: longest identical run 3 line(s), the download tail of Install-Rocm vs Install-VulkanLoader -- Initialize-ContainerImageTempDirectory, `Join-Path $TempDir ([System.IO.Path]::GetFileName($url))`, Invoke-DownloadWithRetry -ExpectedSha256, then Remove-Item of the archive. Every helper those lines call already has one owner (WindowsContainerImage.Common); what is left is two call sites with different archives, extraction and post-install gates. Budget at the measurement
windows/scripts/tests/Rocm.Install.Tests.ps1 | windows/scripts/tests/Rocm.Install.Tests.ps1 | 17 | 19 -> 17 on 2026-10-05: budget follows the measurement down; the Windows WebRTC work added units (SourceBuild.GstreamerWebRtc.Tests.ps1, Get-GstRustCargoPlan, Read-PeExportData and their neighbours) that hold the same idioms, so more of this pair's shingles pass the >6-owner cutoff and drop out. PRIOR: new on 2026-09-23, READ with --explain: longest identical run 2 line(s), the Build-OnnxFromSource Describe vs 'gets every versions.env pin it declares from the driver''s rocm sdk branch': both cut a source file at an `IndexOf` anchor (`$at = $x.IndexOf(...)`, `Assert-True ($at -ge 0)`, `$x.Substring($at, $x.IndexOf(...) - $at)`) and assert on the slice. One proves the ORT rocm lane dropped an EP flag, the other pairs build-args with ARGs. Budget at the measurement
windows/scripts/build/rocm-checks/GpuLoaders.ps1 | windows/scripts/build/rocm-checks/MIGraphX.ps1 | 18 | new on 2026-09-23, READ with --explain: longest identical run 2 line(s), $script:GpuLoaderProbeSource vs Invoke-MigraphxLoadProbe: both embed an Add-Type C# class with kernel32 DllImports (LoadLibraryExW, GetProcAddress) for a child-process load probe. The DLLs, the exports called and the report lines differ; the checks are standalone scripts (see the GpuLoaders/LlamaCpp row). Budget at the measurement
windows/scripts/host/Install-Cuda.ps1 | windows/scripts/host/Install-VulkanLoader.ps1 | 12 | new on 2026-09-23, READ with --explain: longest identical run 2 line(s), the `$X = Resolve-ContainerImageValue -Value $X -EnvironmentVariable '...'` ladder -- calls to the one resolver that owns the logic, as in the Install-Cuda/Install-Rocm row. Different pins. Budget at the measurement
windows/scripts/tests/Driver.Variant.Tests.ps1 | windows/scripts/tests/Rocm.Install.Tests.ps1 | 12 | new on 2026-09-23, READ with --explain: longest identical run 2 line(s), 'sends Dockerfile.torch exactly the TORCH_ROCM_WINDOWS_* pins it declares' vs 'gets every versions.env pin it declares from the driver''s rocm sdk branch': both compare the sorted, comma-joined build-arg names the driver sends with the ARGs the Dockerfile declares. Different stages, different sources of the sent set (Get-BkRocmStageArg vs the literal sdk branch). Budget at the measurement
windows/scripts/tests/Rocm.Install.Tests.ps1 | windows/scripts/tests/Rocm.LitertLm.Tests.ps1 | 18 | new on 2026-09-23, READ with --explain: longest identical run 1 line(s); Get-TestJsonFile owns the shared read and the remaining overlap is the entry filter. Budget follows the measurement down from 22.
windows/scripts/build/rocm-checks/GpuLoaders.ps1 | windows/scripts/host/Install-Rocm.ps1 | 14 | new on 2026-09-23, READ with --explain: longest identical run 1 line(s), the check's top level vs Assert-RocmWindowsLayout: `[System.IO.Path]::Combine($root, 'bin', ...)` and `[System.IO.File]::Exists(...)` over the ROCm tree. The installer gates the tarball layout; the check grades the finished image. Budget at the measurement
windows/scripts/tests/Smoke.OrtCensus.Tests.ps1 | windows/scripts/tests/Smoke.OrtCensus.Tests.ps1 | 28 | 31 -> 29 on 2026-10-20 by MEASUREMENT, file UNCHANGED: CON113's new units took two shingles past the >6-owner cutoff. PRIOR: 16 -> 31 on 2026-10-07: READ: the twin-store case reuses the archives case's arrange skeleton (Invoke-InTestDir, New-OrtTestImage, a wheel fixture, Get-OrtChainWheel, Assert-Equal over the leaf names); longest identical run 3 line(s); the folded values are each case. PRIOR: 17 -> 16 on 2026-09-25: budget follows the measurement down; OrtPayload.Common.Tests.ps1's GenAI case took one shared fixture shingle past MAX_OWNERS=6. Neither census case changed. PRIOR: 26 -> 17 on 2026-09-25: New-OrtTestExportTable and New-OrtTestPe moved into TestHarness.psm1 (the cross-bundle suite builds the same synthetic PEs), and their pair moved to the TestHarness.psm1 self-row. PRIOR: 17 -> 26 on 2026-09-24, READ with --explain: longest identical run 1 line(s). New-OrtTestExportTable writes an IMAGE_EXPORT_DIRECTORY with the same [BitConverter]::GetBytes(...).CopyTo(...) field pokes New-OrtTestPe uses for the PE header; the export table is a second table of that one synthetic PE, so a shared writer would only rename the idiom. PRIOR: new on 2026-09-23 (the ORT census, G1/G6), READ: longest identical run 3 line(s), the fixture preamble every verdict case opens with (Invoke-InTestDir, New-OrtTestImage, one planted PE); a helper would hide which file each case plants
windows/scripts/modules/WindowsOrtProvenance.Common.psm1 | windows/scripts/modules/WindowsOrtProvenance.Common.psm1 | 15 | 13 -> 15 on 2026-09-23: grew with the ORT single-source / rocm gap-fill round (shared idiom, no block to own). PRIOR: 16 -> 13 on 2026-09-23 with this file unchanged by the G2 review fix: the grown G2 module (WindowsOrtProvenance.Build.psm1) now holds the same [AllowEmptyCollection()][string[]] shingles, which pushes them past the >6-owner idiom cutoff. PRIOR: new on 2026-09-23 (the ORT census, G1/G6), READ: longest identical run 3 line(s), the [AllowEmptyCollection()][string[]] parameter declarations the scan and the pure verdict function both take
windows/scripts/modules/WindowsBazel.Common.psm1 | windows/scripts/modules/WindowsOrtProvenance.Common.psm1 | 13 | moved 2026-10-12 (CON91) with Get-BazelRocmEnvScrub out of Build-LitertLmBazel.ps1, the same units. PRIOR: new on 2026-09-23 (the ORT census, G1/G6), READ: longest identical run 3 line(s), an OrdinalIgnoreCase prefix test over a path list; one idiom, two unrelated jobs
windows/scripts/tests/TestHarness.psm1 | windows/scripts/tests/TestHarness.psm1 | 25 | 26 -> 25: remeasured after shared test-fixture extraction; existing residual overlap remains frozen.
windows/scripts/build/Build-OnnxGenaiFromSource.ps1 | windows/scripts/modules/WindowsOrtProvenance.Build.psm1 | 22 | 46 -> 22: Chain file indexing now has one owner with explicit GenAI and chain policies; remaining overlap is generic guard and verdict syntax.
windows/scripts/modules/WindowsOrtProvenance.Build.psm1 | windows/scripts/modules/WindowsOrtProvenance.Build.psm1 | 14 | 2026-11-26: measured 15 -> 14 by MEASUREMENT, with the module unchanged. PRIOR: 2026-10-23: measured 21 -> 20 as a common idiom crossed MAX_OWNERS after module/test additions; this module is unchanged. PRIOR: 22 -> 21 on 2026-09-25, file UNCHANGED: Expand-PinnedArchive and Get-SevenZipSkippedLink (WindowsMigraphx.Common) and their tests added owners, so one of this pair's shingles passed the >6-owner idiom cutoff. PRIOR: new on 2026-09-23 (G2 and its review fix), READ with --explain: longest identical run 4 line(s), the tree walk and the record walk sharing the Test-Path guard and the `Get-OrtGateNameFinding ... | ForEach-Object { prefix }` shape
windows/scripts/modules/WindowsOrtProvenance.Build.psm1 | windows/scripts/modules/WindowsOrtProvenance.Common.psm1 | 28 | 31 -> 28 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 33 -> 31 on 2026-10-01: the staged-test helper took a shared idiom past the owner cutoff. PRIOR: new on 2026-09-23 (G2), READ with --explain: longest identical run 3 line(s), the path-under-root helper and the parameter declarations. G2 imports nothing (mounted per file into the five consumer RUNs) and the census module is mounted into none of them, so neither can import the other
windows/scripts/tests/SourceBuild.OrtChainOnly.Tests.ps1 | windows/scripts/tests/SourceBuild.OrtChainOnly.Tests.ps1 | 24 | 27 -> 24 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: new on 2026-09-23 (G2), READ with --explain: longest identical run 4 line(s), the arrange of each case (Invoke-InTestDir, New-OrtGateFixture, a planted foreign file, `& $red` with its finding); the planted file and the pattern are the case. The review fix folded its spaced-path spellings into the record case instead of adding a twin
windows/scripts/build/rocm-checks/FFmpeg.ps1 | windows/scripts/build/rocm-checks/FFmpeg.ps1 | 16 | 2026-10-23: Shared Windows behavior and fixtures; measured 39 -> 16. Historical review: reviewed 2026-09-23 by MEASUREMENT: longest identical run 6 line(s) -- a shared idiom (param-block shape, probe/process preamble, an embedded python header, or a fail-closed finding loop), not a copied block. Budget pinned
windows/scripts/build/Test-Container.ps1 | windows/scripts/build/rocm-checks/Torch.ps1 | 13 | 2026-10-23: Shared Windows behavior and fixtures; measured 49 -> 14. Historical review: reviewed 2026-09-23 by MEASUREMENT: longest identical run 4 line(s) -- a shared idiom (param-block shape, probe/process preamble, an embedded python header, or a fail-closed finding loop), not a copied block. Budget pinned
windows/scripts/build/rocm-checks/FFmpeg.ps1 | windows/scripts/build/rocm-checks/GStreamer.ps1 | 19 | 2026-10-24: Whole-tree measurement after the Windows quality refactor, 22 -> 21. Prior: 2026-10-23: Shared Windows behavior and fixtures; measured 28 -> 22. Historical review: 29 -> 28 on 2026-10-19 by MEASUREMENT, both files UNCHANGED: Restore-CiCompilerCache, Save-CiCompilerCache and their suite moved the shared-shingle corpus. PRIOR: 30 -> 29 on 2026-10-14, both files UNCHANGED: the cleanup's hide script and suite moved the shared-shingle corpus. reviewed 2026-09-23 by MEASUREMENT: longest identical run 4 line(s) -- a shared idiom (param-block shape, probe/process preamble, an embedded python header, or a fail-closed finding loop), not a copied block. Budget pinned
windows/scripts/build/Build-OnnxFromSource.ps1 | windows/scripts/build/rocm-checks/OrtWebGpu.ps1 | 20 | 2026-10-23: measured 32 -> 27; budget follows the measurement down. PRIOR: 34 -> 32 on 2026-10-15: budget follows the measurement down: Get-SccacheS3Level and Invoke-WithProcessEnvironment moved shared idioms past the >6-owner cutoff, no line of this pair changed. PRIOR: 32 -> 34 on 2026-10-13: READ: CON95's leftover-dxil.dll findings (the wheel gate here, Get-OrtWebGpuRetiredDxcDll and its two loops there) add Join-Path/Test-Path finding idioms; longest identical run 2 line(s). PRIOR: 28 -> 32 on 2026-10-07: READ: Set-OrtNinjaCommandPython and Invoke-OrtFreeThreadedTwin add [Parameter(Mandatory)][string] param idioms; longest identical run 2 line(s). PRIOR: 27 -> 28 on 2026-09-30: both files UNCHANGED since the last row: the corpus changed (547d9fd0, 2da6c29a, 9427c7a0), and a shingle this pair held past the >6-owner idiom cutoff fell back under it. Longest identical run unchanged, still no block to own. PRIOR: 28 -> 27 on 2026-09-28: budget follows the measurement down (the deps.txt row parsing moved into Get-OrtDepsRow). PRIOR: reviewed 2026-09-23 by MEASUREMENT: longest identical run 2 line(s) -- a shared idiom (param-block shape, probe/process preamble, an embedded python header, or a fail-closed finding loop), not a copied block. Budget pinned
windows/scripts/build/Build-OnnxFromSource.ps1 | windows/scripts/build/Test-Container.ps1 | 13 | 19 -> 13 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: reviewed 2026-09-23 by MEASUREMENT: longest identical run 2 line(s) -- a shared idiom (param-block shape, probe/process preamble, an embedded python header, or a fail-closed finding loop), not a copied block. Budget pinned
windows/scripts/build/Test-Container.ps1 | windows/scripts/build/rocm-checks/OrtWebGpu.ps1 | 14 | 15 -> 16 on 2026-10-13: READ, Test-Container.ps1 unchanged: CON95's leftover-dxil.dll loop in Get-OrtWebGpuInterpreterFinding adds a finding-loop shingle; longest identical run 2 line(s). PRIOR: reviewed 2026-09-23 by MEASUREMENT: longest identical run 2 line(s) -- a shared idiom (param-block shape, probe/process preamble, an embedded python header, or a fail-closed finding loop), not a copied block. Budget pinned
windows/scripts/build/Build-OpencvFromSource.ps1 | windows/scripts/diagnostics/Measure-BuildWarnings.ps1 | 12 | reviewed 2026-09-23 by MEASUREMENT: longest identical run 1 line(s) -- a shared idiom (param-block shape, probe/process preamble, an embedded python header, or a fail-closed finding loop), not a copied block. Budget pinned
linux/Dockerfile.android | linux/Dockerfile.package | 26 | 25 -> 26 on 2026-10-12 by MEASUREMENT: the package setup RUN gained one more bind mount (the staged CPython of PYTHON_VERSION), the same mount idiom. PRIOR: 27 -> 25 on 2026-10-09 by MEASUREMENT after CON83: its new files (Dockerfile.torch's mounts, install-lint-tools.sh, lint-shell.sh's riscv64 arm) became further holders of shingles these two shared, so MAX_OWNERS now reads them as idiom. The budget follows the measurement down. PRIOR: added 2026-09-23 (riscv-tools): the web-lane-tools producer RUN (android) and the package setup RUN that consumes its output both spell the BuildKit bind/cache mount idiom for the same script and cache family; longest identical run 1 line(s). A mount cannot be factored out of a Dockerfile instruction. Budget pinned so a real copied block still trips it
linux/Dockerfile.android | linux/Dockerfile.toolchain | 43 | added 2026-09-23 (riscv-tools): the web-lane-tools producer RUN mounts cross-env.sh and its six siblings file by file, exactly the per-file closure Dockerfile.toolchain's cross RUN mounts, plus a cargo registry cachemount; longest identical run 0 line(s). Per-file on purpose: android-sdk's /opt/scripts/core is an older 01-core (test-web-lane-tools.sh pins the list). Budget pinned so a real copied block still trips it
windows/scripts/modules/WindowsCodeQL.Common.psm1 | windows/scripts/modules/WindowsSmokeTest.Common.psm1 | 11 | new on 2026-09-28 by MEASUREMENT with --explain: longest identical run 2 line(s). Get-CodeQLDatabaseCreateArgs and Assert-NativeLinkRun share the shape of a [Parameter(Mandatory)][string] param block and a native argv assembled with +=; the arguments, the tools and the purposes differ. A shared idiom, not a copy. Budget pinned
windows/scripts/build/Build-OnnxFromSource.ps1 | windows/scripts/build/Build-OnnxFromSource.ps1 | 15 | 17 -> 15 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-23: Shared Windows preparation and environment lifetimes; measured 28 -> 17. Historical review: new on 2026-09-28 by MEASUREMENT with --explain: longest identical run 1 line(s) -- a shared idiom (param/attribute block shape, Join-Path + helper call sequences), not a copied block. Budget pinned
windows/scripts/build/Build-FfmpegCodecs.ps1 | windows/scripts/build/Build-HailortFromSource.ps1 | 12 | new on 2026-09-28 by MEASUREMENT with --explain: longest identical run 1 line(s) -- a shared idiom (param/attribute block shape, Join-Path + helper call sequences), not a copied block. Budget pinned
windows/scripts/build/Build-TorchRocmFromSource.ps1 | windows/scripts/build/Build-TorchvisionRocmFromSource.ps1 | 18 | new on 2026-09-30, was 52 with an 8-line run: the steps both RUNs repeated have one owner in Build-TorchRocmFromSource.ps1, which the torchvision RUN dot-sources -- Save-TorchRocmTree (git longpaths, the pinned commit, the version.txt check), Get-TorchRocmPythonTag, Install-TorchRocmBuiltWheel (the exact wheel, install, import) and Copy-TorchRocmEnv; Torch.RocmSourceBuild.Tests.ps1 covers each. READ what is left: the build-phase scaffolding (Get-BuildJobCount; try { Switch-BuildPhase ... } catch { Complete-CurrentBuildPhase -ErrorRecord; Write-BuildPhaseSummary; throw }) that every WindowsMigraphx-lane builder spells, and the Save-TorchRocmTree call shape. The torchvision RUN must not call Start-MigraphxBuildSession (it resets -WorkDir, where the torch RUN venv lives), so its session start stays two lines. Budget at the measurement
windows/scripts/build/Build-TorchRocmFromSource.ps1 | windows/scripts/build/Build-TorchRocmFromSource.ps1 | 18 | 21 -> 18 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-23: Shared Windows operations and fixtures; measured 22 -> 21. Historical review: 25 -> 22 on 2026-10-20: budget follows the measurement down, neither file changed: the #177 history gate and its tests moved the shared-shingle corpus. PRIOR: 30 -> 25 on 2026-10-15: budget follows the measurement down: Get-SccacheS3Level and Invoke-WithProcessEnvironment moved shared idioms past the >6-owner cutoff, no line of this pair changed. PRIOR: 31 -> 30 on 2026-10-05, budget follows the measurement down; PRIOR: new on 2026-09-30, READ: longest identical run 2 line(s). Get-TorchRocmTorchEnv and Get-TorchRocmVisionEnv both start from Copy-TorchRocmEnv (the shared copy, one owner) and then set their own keys; what is left is the $Common/$BuildVersion/[int]$Jobs param shape and the `$vars['X'] = 'Y'` lines, whose values are the whole point of each function. Budget at the measurement
windows/scripts/build/Build-TorchRocmFromSource.ps1 | windows/scripts/tests/Rocm.LitertLm.Tests.ps1 | 23 | new on 2026-09-30, READ: longest identical run 3 line(s). The env builders and the test fixture New-RocmLaneEnv share the dictionary-fill idiom (a new dictionary, foreach over the keys, return it) over different key sets, one production and one a fixture. Not a block. Budget at the measurement
windows/scripts/build/Build-OrtAmdgpuEpFromSource.ps1 | windows/scripts/build/Build-TorchRocmFromSource.ps1 | 13 | new on 2026-09-30, READ: longest identical run 3 line(s): the call to Initialize-MigraphxBuild, which already OWNS the rocm-lane refusal and the install-dir resolution, plus the assignments every WindowsMigraphx-lane builder takes from its result ($build.InstallDir, $build.RocmRoot). A call site, not a copy. Budget at the measurement
windows/scripts/build/Build-MigraphxFromSource.ps1 | windows/scripts/build/Build-TorchRocmFromSource.ps1 | 13 | new on 2026-09-30, READ: the same Initialize-MigraphxBuild call site as the Build-OrtAmdgpuEpFromSource.ps1 row (3 lines; the owner is the function it calls). Budget at the measurement
windows/scripts/modules/WindowsBuildDriver.Common.psm1 | windows/scripts/modules/WindowsContainerBuild.Reuse.psm1 | 11 | 13 -> 11 on 2026-10-21, a SHRINK recorded at the measurement: new PowerShell units moved two idioms this pair holds over the owner cap. PRIOR: new on 2026-09-30, READ: longest identical run 4 line(s): the OpenSSL preseed added Save-ParallelRangeDownload, whose Mandatory param block and Start-Process/ExitCode reads fold alike with Wait-ContainerExit's; one fetches byte ranges with curl, the other polls docker inspect, so no shared logic to extract
windows/scripts/host/Install-ScoopTools.ps1 | windows/scripts/modules/WindowsBuildDriver.Common.psm1 | 12 | 2026-10-23: measured 16 -> 12; budget follows the measurement down. PRIOR: new on 2026-09-30, READ: longest identical run 2 line(s): the compiler-rt fetch and the new driver preseed helpers both spell curl.exe from System32 with --retry and a LASTEXITCODE check; container side vs host side, and Install-ScoopTools may import only the three modules Dockerfile.base COPYs, so there is no common owner to share
windows/scripts/tests/Uv.ChainOpenCv.Tests.ps1 | windows/scripts/tests/Uv.ChainOrt.Tests.ps1 | 12 | 50 -> 12: command/log observers and replacement/command assertions share owners; package-specific command patterns remain distinct.
windows/scripts/modules/WindowsOrtProvenance.Common.psm1 | windows/scripts/modules/WindowsPythonApp.Common.psm1 | 11 | new on 2026-10-01, READ: longest identical run 1 line(s): both read a distribution's dist-info by normalized name (RECORD owners vs entry_points.txt); the normalization is one -replace each
windows/scripts/python/Invoke-CiPackaging.ps1 | windows/scripts/python/Invoke-CiStaticAnalysis.ps1 | 25 | new on 2026-10-12 by MEASUREMENT with --explain: longest identical run 1 line(s) -- the CI drivers' prologue: dot-source Initialize-CiEnvironment, enter the repo root, and fill an empty -PythonVersion from Get-PinnedPythonVersion (CON91); a helper would wrap one line, and each driver keeps its own module list
windows/scripts/python/New-PythonAppBundle.ps1 | windows/scripts/python/New-PythonAppPackage.ps1 | 12 | 13 -> 12 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-23: Shared Windows preparation and environment lifetimes; measured 17 -> 13. Historical review: 18 -> 17 on 2026-10-19 by MEASUREMENT, both files UNCHANGED: New-PortableBundle and its cases moved the shared-shingle corpus. PRIOR: 19 -> 18 on 2026-10-01: budget follows the measurement down (the arm64 Python app work imports WindowsTargetArch.Common in more scripts, so those idioms passed the >6-owner cutoff). PRIOR: new on 2026-10-01, READ: longest identical run 1 line(s): both open by reading app.json through Resolve-PythonAppPath, the shared helper that replaced their copied Resolve-RepoPath
windows/scripts/build/Test-Arm64Bundle.ps1 | windows/scripts/diagnostics/Test-Arm64Prereqs.ps1 | 14 | new on 2026-10-03, READ: longest identical run 1 line(s) - both close by printing a PASS/FAIL summary over a result list (one formatted line per result) and share nothing else; the result shapes differ (Name/Ok/Detail vs Question/Ok/Detail) and the diagnostic must stay self-contained on a device with no hub checkout. A shared idiom, not a copy. Budget pinned so a real copied block still trips it
windows/scripts/build/Copy-Arm64TorchWheels.ps1 | windows/scripts/build/Build-TorchRocmFromSource.ps1 | 11 | new on 2026-10-03, READ: longest identical run 1 line(s) - the shared shingles are the module-root preamble (Test-Path/Join-Path on PSScriptRoot modules, the guarded import loop, StrictMode/ErrorActionPreference) every Windows source-build script spells, plus the exit-0 no-op tail; the bodies (download + arch-check a wheel stack vs build torch from source) share nothing. A shared idiom, not a copy. Budget pinned so a real copied block still trips it
windows/scripts/build/Test-Arm64Bundle.ps1 | windows/scripts/build/Test-Container.ps1 | 12 | new on 2026-10-04, READ: longest shared run 2 line(s) -- param-block and Test-Path guard shapes between two scripts that must stay standalone (one runs from an artifact dir on a device, one inside the image). A shared idiom, not a copy. Budget pinned
windows/scripts/host/Install-Lavapipe.ps1 | windows/scripts/modules/WindowsTargetArch.Common.psm1 | 16 | new on 2026-10-04, READ with --explain: longest identical run 1 line(s); scattered arch/PE-machine vocabulary -- the installer names the same concepts the arch module owns but calls the module for the actual checks. A shared idiom, not a copy. Budget pinned
windows/scripts/build/Test-Arm64Bundle.ps1 | windows/scripts/modules/WindowsScripts.Shared.psm1 | 12 | new on 2026-10-04, READ with --explain: longest identical run 1 line(s); the elevation check the bundle gate must carry INLINE (it runs from an artifact dir with no modules) matches Test-Elevated's one-liner vocabulary. Deliberate: the gate is standalone by contract. Budget pinned
windows/scripts/host/Install-Lavapipe.ps1 | windows/scripts/host/Install-LavapipeHost.ps1 | 13 | 15 -> 13 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: Shared acquisition and required-file assertions own pin resolution, downloads, extraction, cleanup and presence checks; module-path validation now has one owner in WindowsContainerImage.Bootstrap.psm1. PE, registry and host environment verdicts stay in the callers. Measured 26 -> 19 -> 15 on 2026-10-23.
windows/scripts/tests/SourceBuild.GstreamerWebRtc.Tests.ps1 | windows/scripts/tests/SourceBuild.GstreamerWebRtc.Tests.ps1 | 18 | 11 -> 18 on 2026-10-06: CON68's teardown cases (4a3379a9) each rewrite one line of the same captured run and assert its verdict, longest identical run 4 line(s). PRIOR: new on 2026-10-05 (Windows WebRTC fixes), READ with --explain: longest identical run 3 line(s), the libffi-guard cases share the Invoke-InTestDir + New-LibffiTestPe + Assert-Throws shape, one fixture variant each. A shared idiom, not a copy. Budget at the measurement
windows/scripts/modules/WindowsGstPlugins.Common.psm1 | windows/scripts/tests/Build.SccacheEndpointProbe.Tests.ps1 | 13 | new on 2026-10-05 (Windows WebRTC fixes), READ with --explain: longest identical run 2 line(s), the free-loopback-port idiom ([System.Net.Sockets.TcpListener] on port 0, read the port, stop) in Invoke-GstWebRtcLoopback and a test fixture. A shared idiom, not a copy. Budget at the measurement
windows/scripts/tests/SourceBuild.GenaiOrt.Tests.ps1 | windows/scripts/tests/SourceBuild.PkgConfig.Tests.ps1 | 18 | new on 2026-10-05 (Windows WebRTC fixes), READ with --explain: longest identical run 1 line(s), foreach-over-pairs with Assert-Equal, the shape of a table-driven assertion. A shared idiom, not a copy. Budget at the measurement
windows/scripts/tests/SourceBuild.GstreamerWebRtc.Tests.ps1 | windows/scripts/tests/TestHarness.psm1 | 14 | new on 2026-10-05 (Windows WebRTC fixes), READ with --explain: longest identical run 1 line(s), New-LibffiTestPe drives New-OrtTestPe and patches the same header offsets it writes ([BitConverter]::GetBytes(...).CopyTo); the header writer itself is not copied. A shared idiom, not a copy. Budget at the measurement
windows/scripts/modules/WindowsMeson.Common.psm1 | windows/scripts/tests/SourceBuild.GstreamerWebRtc.Tests.ps1 | 24 | new on 2026-10-05 (Windows WebRTC fixes), READ with --explain: longest identical run 0 line(s), the expected descriptor table (sint32 4/4/10, pointer 8/8/14, void 1/1/0), written in the guard and in its suite on purpose: a test that imports its expectation from the code under test cannot fail. A shared idiom, not a copy. Budget at the measurement
linux/scripts/tests/test-gate-registry.sh | windows/scripts/tests/Build.VulkanValidationLayers.Tests.ps1 | 12 | new on 2026-10-06, READ: longest identical run 1 line(s); a fixture builder in each, matched on path and quoting tokens around different content. Budget pinned
windows/scripts/build/Test-Container.ps1 | windows/scripts/build/Test-RocmImage.ps1 | 12 | 13 -> 12 on 2026-10-12: budget follows the measurement down (a shared idiom gained an owner). PRIOR: added 2026-10-06 (CON71), READ: longest identical run 1 line(s) - both resolve a tool list's first PATH hit with Get-Command -CommandType Application; Test-Container grades every LLVM tool against clang-cl's release, Test-RocmImage records which clang the ROCm SDK puts first. A shared idiom, not a copy. Budget at the measurement
windows/scripts/modules/WindowsFormatting.Common.psm1 | windows/scripts/modules/WindowsOrtProvenance.Build.psm1 | 12 | added 2026-10-07, READ: longest identical run 2 line(s) - a [Parameter(Mandatory)] context/path param block followed by [switch] options, in Invoke-ClangFormatCheck and Assert-ChainOrtOnly. A shared idiom, not a copy. Budget at the measurement
windows/scripts/build/Build-OnnxFromSource.ps1 | windows/scripts/modules/WindowsPythonWheel.Common.psm1 | 11 | added 2026-10-07, READ: [OutputType]/[Parameter(Mandatory)][string] param idioms of Invoke-OrtDawnDepsProbe and Get-FreeThreadedWheelFinding; longest identical run 3 line(s)
windows/scripts/modules/WindowsOrtProvenance.Build.psm1 | windows/scripts/modules/WindowsPythonWheel.Common.psm1 | 11 | reduced 2026-10-27: the wheel entry hash is shared with the license verifier; these remaining archive walks serve distinct provenance and twin checks, longest identical run 2 line(s)
windows/scripts/modules/WindowsPythonWheel.Common.psm1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 11 | 18 -> 11 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: added 2026-10-07, READ: Get-FreeThreadedWheelPlan and Get-FreeThreadedTwinPlan both answer {Build; Reason} through a $skip scriptblock, for the consumer's wheel and the image's twins; longest identical run 1 line(s)
windows/scripts/modules/WindowsPythonApp.Common.psm1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 12 | 14 -> 12 on 2026-10-20 by MEASUREMENT, file(s) UNCHANGED: CON122's new units (WindowsPythonWheel.Suite.psm1, Invoke-FreeThreadedWheelTests.ps1 and PythonWheel.Suite.Tests.ps1) hold the same idioms, so shingles pass the >6-owner cutoff. PRIOR: added 2026-10-07, READ: Select-PythonAppWheel and Save-PythonWheel both pick wheels by their cp3XYt ABI tag; longest identical run 1 line(s)
windows/scripts/tests/SourceBuild.FreeThreadedTwin.Tests.ps1 | windows/scripts/tests/SourceBuild.GstreamerRocm.Tests.ps1 | 14 | added 2026-10-07, READ: both wiring cases read a script's text and Assert-Match its lines; longest identical run 2 line(s)
windows/scripts/build/Build-TvmFromSource.ps1 | windows/scripts/build/Build-TvmFromSource.ps1 | 13 | 2026-10-23: Shared Windows behavior and fixtures; measured 49 -> 23. Historical review: 48 -> 49 on 2026-10-12: New-TvmFfiCrossWheels -AbiTag became Mandatory (CON91), one more param-ladder shingle. PRIOR: added 2026-10-07 (CON79), READ: the cross apache-tvm-ffi assembly moved out of the script body into New-TvmFfiCrossWheel, one function for the GIL wheel and its cp3XYt twin; the body keeps the runtime staging, and the two share throw-message, Get-ChildItem and Copy-Item idioms, longest identical run 2 line(s)
windows/scripts/modules/WindowsOrtProvenance.Build.psm1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 14 | added 2026-10-07 (CON79), READ: Get-OrtGateChainIndex hashes wheel members, Get-FreeThreadedWheelImportFinding reads the imports of a twin's .pyd members; both open the zip and walk its entries, longest identical run 2 line(s). A shared idiom, not a copy
windows/scripts/tests/SourceBuild.FfmpegRocm.Tests.ps1 | windows/scripts/tests/SourceBuild.FreeThreadedTwin.Tests.ps1 | 18 | added 2026-10-07 (CON79), READ: both build synthetic PEs with New-OrtTestPe -Import and assert on import findings; longest identical run 1 line(s)
windows/scripts/build/Test-TargetArch.ps1 | windows/scripts/modules/WindowsSourceBuild.Common.psm1 | 15 | added 2026-10-07 (CON79), READ: the arch gate's walk and Get-FreeThreadedWheelImportFinding both pick python3XYt.dll out of Get-PeImportNames; the gate mounts WindowsTargetArch.Common alone, so it cannot call the module; longest identical run 1 line(s)
windows/scripts/build/Build-LlvmFromSource.ps1 | windows/scripts/modules/WindowsTargetArch.Common.psm1 | 21 | added 2026-10-12 (#180), READ: Get-PeTimeDateStamp reads the COFF stamp the way Read-PeLayout finds the PE header; the toolchain RUN mounts the script per file, and a new function in WindowsTargetArch.Common would re-key Dockerfile.base, which COPYs it; longest identical run 1 line(s)
windows/scripts/build/Build-LitertLmBazel.ps1 | windows/scripts/build/Build-LitertWheelBazel.ps1 | 11 | 2026-10-23: Shared Windows behavior and fixtures; measured 21 -> 11. Historical review: added 2026-10-12 (CON91), READ with --explain: longest identical run 2 line(s), the WindowsBazel.Common locator (bazelmods, then modules). The module it locates cannot own its own lookup, as with the G2 ORT gate rows
windows/scripts/build/Build-LitertWheelBazel.ps1 | windows/scripts/build/Build-LitertWheelBazel.ps1 | 14 | 16 -> 14 on 2026-10-20 by MEASUREMENT, file(s) UNCHANGED: CON122's new units (WindowsPythonWheel.Suite.psm1, Invoke-FreeThreadedWheelTests.ps1 and PythonWheel.Suite.Tests.ps1) hold the same idioms, so shingles pass the >6-owner cutoff. PRIOR: 17 -> 16 on 2026-10-20 by MEASUREMENT, file UNCHANGED: CON113's new units took a shingle past the >6-owner cutoff. PRIOR: added 2026-10-12 (CON91), READ with --explain: longest identical run 2 line(s), an exactly-one Get-ChildItem match with a count check, in the pip override and the dist lookup. One idiom, two jobs
windows/scripts/build/Build-HailortFromSource.ps1 | windows/scripts/build/Build-LitertWheelBazel.ps1 | 11 | added 2026-10-12 (CON91), READ with --explain: longest identical run 2 line(s), a shallow git clone and its exit-code throw. A shared idiom, not a copy
windows/scripts/build/Build-LitertWheelBazel.ps1 | windows/scripts/build/Build-TorchRocmFromSource.ps1 | 11 | added 2026-10-12 (CON91), READ with --explain: longest identical run 2 line(s), Copy-Item -LiteralPath into a Join-Path destination. A shared idiom, not a copy
windows/scripts/build/Build-LitertWheelBazel.ps1 | windows/scripts/tests/SourceBuild.FreeThreadedTwin.Tests.ps1 | 12 | added 2026-10-12 (CON91), READ with --explain: longest identical run 1 line(s), regex escapes and ReadAllText calls in a rewrite helper and a mount test. A shared idiom, not a copy
windows/scripts/build/Build-LitertWheelBazel.ps1 | windows/scripts/tests/SourceBuild.GstreamerRocm.Tests.ps1 | 12 | added 2026-10-12 (CON91), READ with --explain: longest identical run 1 line(s), regex escapes and ReadAllText calls in a rewrite helper and a splice test. A shared idiom, not a copy
windows/scripts/host/Set-SccacheS3Level.ps1 | windows/scripts/modules/WindowsContainerImage.Common.psm1 | 12 | added 2026-10-15 (sccache S3 level), READ with --explain: a foreach over a name table reading [Environment]::GetEnvironmentVariable. A shared idiom, not a copy.
windows/scripts/host/Copy-SccacheCacheToS3.ps1 | windows/scripts/host/Set-SccacheS3Level.ps1 | 12 | added 2026-10-15 (sccache S3 level), READ with --explain: both hand the same key settings to Invoke-S5cmdWithKey, the one owner of the s5cmd call. A shared call, not a copy.
windows/scripts/modules/WindowsScripts.Shared.psm1 | windows/scripts/modules/WindowsScripts.Shared.psm1 | 12 | added 2026-10-15 (sccache S3 level), READ with --explain: Test-UrlPortOpen and Get-SccacheS3Level both open with [Uri]::TryCreate on an endpoint; one connects, the other only checks the form. A shared idiom, not a copy.
windows/scripts/host/Test-HostSetup.ps1 | windows/scripts/modules/WindowsScripts.Shared.psm1 | 11 | added 2026-10-16 (sccache S3 fallback), READ with --explain: longest identical run 1 line; the Defender exclusion check and Set-SccacheChainWithout share list-filter idioms (@(... | Where-Object { ... -notcontains ... })). A shared idiom, not a copy.
windows/scripts/modules/WindowsPythonApp.Common.psm1 | windows/scripts/modules/WindowsRustToolchain.Common.psm1 | 23 | 2026-11-08: measured 24 -> 23; 2026-10-23: measured 25 -> 24; budget follows the measurement down. PRIOR: new on 2026-10-16 (Add-PurePythonWheel, pyyaml on cp315 win_arm64), READ: longest identical run 2 line(s): its param blocks and the Invoke-DownloadWithRetry/Get-FileHash calls every pinned fetcher makes
windows/scripts/modules/WindowsMigraphx.Common.psm1 | windows/scripts/modules/WindowsPythonApp.Common.psm1 | 12 | new on 2026-10-16 (Add-PurePythonWheel, pyyaml on cp315 win_arm64), READ: longest identical run 2 line(s): its param blocks and the Invoke-DownloadWithRetry/Get-FileHash calls every pinned fetcher makes
windows/scripts/python/Invoke-CiPackaging.ps1 | windows/scripts/python/Invoke-PythonCiBuild.ps1 | 18 | new on 2026-10-19 by MEASUREMENT with --explain: longest identical run 2 line(s) -- the CI drivers' prologue (dot-source Initialize-CiEnvironment, enter the repo root, open New-CiSession -WithUvDelegates), the same one the Invoke-CiPackaging/Invoke-CiStaticAnalysis row records. The rest is single lines of Invoke-BuildExternal and uv-environment calls each driver needs. Budget pinned
shared/windows/tests/Repo.GeneratedArtifacts.Tests.ps1 | windows/scripts/build/Build-GstreamerFromSource.ps1 | 11 | new on 2026-10-19 by MEASUREMENT with --explain: longest identical run 2 line(s) -- the probe-then-refuse idiom, `$x = "$(& tool ... | Select-Object -First 1)".Trim()` followed by `if (-not $x -or -not (Test-Path ...)) { throw }`, once for the repo root and once for meson's interpreter module. No shared logic. Budget pinned
windows/scripts/python/Invoke-CiPackaging.ps1 | windows/scripts/python/Invoke-FreeThreadedWheelTests.ps1 | 15 | added 2026-10-20 (CON122), READ with --explain: longest identical run 2 line(s): the CI drivers' prologue (dot-source Initialize-CiEnvironment, the pin, the arch, the free-threaded mode), as in the Invoke-CiPackaging.ps1 | Invoke-PythonCiBuild.ps1 row. A shared idiom, not a copy
windows/scripts/python/Invoke-PythonCiBuild.ps1 | windows/scripts/python/Invoke-PythonCiBuild.ps1 | 15 | added 2026-10-20 (CON122), READ with --explain: longest identical run 1 line(s): the Static Analysis and Free-threaded wheel tests steps, each one critical Invoke-BuildStep around one Invoke-ChildDriver call. A shared idiom, not a copy
windows/scripts/tests/PythonWheel.Suite.Tests.ps1 | windows/scripts/tests/Rocm.LlamaCpp.Tests.ps1 | 12 | 13 -> 12 on 2026-11-26 by MEASUREMENT, with neither suite changed. PRIOR: 14 -> 13 on 2026-10-22 by MEASUREMENT: the pin-parity and Rocm suites share one less block after the shared fixture paths were normalised. PRIOR: added 2026-10-20 (CON122), READ with --explain: longest identical run 1 line(s): fixture builders that lay out a repo of empty files from parameter lists; unrelated subjects. A shared idiom, not a copy
windows/scripts/modules/WindowsMsiLicense.Common.psm1 | windows/scripts/modules/WindowsMsiLicense.Common.psm1 | 16 | 20 -> 16 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-31: measured with --explain, longest identical run one line. Installed-path and cabinet readers query different MSI tables and already share Invoke-MsiLicenseQuery; their record mappings and returned tables differ.
windows/scripts/modules/WindowsMsiLicense.Common.psm1 | windows/scripts/modules/WindowsPackageBinary.Common.psm1 | 18 | 19 -> 18 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: 2026-10-31: measured with --explain, longest identical run one line. License and binary wrappers build requests for the same Invoke-PackageVerifier; the verification behavior has one owner.
windows/scripts/modules/WindowsMsiLicense.Common.psm1 | windows/scripts/modules/WindowsScripts.Shared.psm1 | 14 | 2026-10-31: measured after the corpus changed, longest identical run two lines. MSI root validation and file hash validation use unrelated guards and error handling.
windows/scripts/build/rocm-checks/OrtWebGpu.ps1 | windows/scripts/modules/WindowsScripts.Shared.psm1 | 13 | 2026-10-31: measured after the corpus changed, longest identical run one line. ORT GenAI report checks and file hash validation use unrelated guards; previous budget 13.
windows/scripts/build/rocm-checks/OrtWebGpu.ps1 | windows/scripts/modules/WindowsMsiLicense.Common.psm1 | 11 | 2026-10-31: measured after the corpus changed, longest identical run one line. ORT GenAI report checks and MSI root validation contain unrelated guard clauses.
linux/scripts/tests/test-bench-history.sh | linux/scripts/tests/test-cargo-test-junit.sh | 13 | added 2026-11-19 (CON250): token-normalised fixture setup, a run of t_case, a file argument and t_assert_grep lines over ${work}; no line is shared, the subjects differ (bench history, cargo JUnit). Budget pinned so a real copied block still trips it
linux/scripts/tests/test-cargo-test-junit.sh | linux/scripts/tests/test-cargo-wrapper.sh | 12 | added 2026-11-19 (CON250): the suite header both rust-driver suites need (TESTS_DIR, the harness, RUST_DIR); four lines, the rest differs. Budget pinned so a real copied block still trips it
linux/scripts/dev-doctor.sh | linux/scripts/run-in-ci-image.sh | 13 | added 2026-11-19 (CON249): the nerdctl-else-docker pick, two lines each; the doctor treats a missing engine as a note where run-in-ci-image.sh dies, so the branches differ after the pick. Budget pinned so a real copied block still trips it
linux/scripts/dev-doctor.sh | linux/scripts/scan-image-sbom.sh | 12 | added 2026-11-19 (CON249): the one-line `<tool> --version | grep -oE x.y.z | head -n 1` idiom, longest identical run 0 lines. Budget pinned so a real copied block still trips it
windows/scripts/tests/AgenticLoop.Commit.Tests.ps1 | windows/scripts/tests/AgenticLoop.Execution.Tests.ps1 | 31 | 35 -> 31 on 2026-11-27: PowerShell param blocks are idiom. PRIOR: added 2026-11-19 (CON248): the harness's fault-control shape, Describe then Invoke-TestMutationChecks with ModuleArgumentsFactory, Find, Replace, Expected and Body per case; the bodies and subjects differ (a real git repository here, faked phases there). Budget pinned so a real copied block still trips it
windows/scripts/tests/AgenticLoop.Commit.Tests.ps1 | windows/scripts/tests/WindowsFlutterPin.Common.Tests.ps1 | 11 | added 2026-11-19 (CON248): a fixture function's param line and a Join-Path of a temporary name; two lines, nothing else shared. Budget pinned so a real copied block still trips it
linux/scripts/tests/test-docs-sidebars.sh | linux/scripts/tests/test-docs-sidebars.sh | 13 | 2026-11-24: the toggles and tree sections are the same click-and-assert shape on different fixtures; -k sections made each a unit.
