From 9f36a18880ac2147ac7201a0ef0e46a5294d08d9 Mon Sep 17 00:00:00 2001 From: arena-agent Date: Sun, 27 Sep 2026 06:07:13 +0000 Subject: [PATCH] fix(ci): unblock the source-lint gate on the newly-added test files The Source lint step (config/ci/lint_source.jl) had never run on these two files -- CI could not start between 2026-09-25 22:19 and the Actions allow-list fix (PR #85) -- and its first verdict found members the per-file import check cannot resolve: * test/doi/fixtures.jl uses the suite aliases B and P, defined as consts in tests.jl before include("fixtures.jl"). The lint check is deliberately textual and per-file, so an alias supplied by the includer is invisible to it. The three call sites now go through Target.DOIBundles / Target.DOIPublications -- the same binding at runtime, legible in isolation. * test/unit/test_zero_replacement.jl broadcast Float64.(...) over parse.(Float64, ...), which already produces Float64: the outer conversion is an identity map, and the Float64.( spelling trips the Module.member pattern the lint runs over test files. Removing it changes no value. Replayed lint_source.jl's textual checks over both files after the change: no escaped interpolation, no adjacent docstrings, no bare alias member refs, no Float64.( broadcast remain. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --- test/doi/fixtures.jl | 6 +++--- test/unit/test_zero_replacement.jl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/doi/fixtures.jl b/test/doi/fixtures.jl index 594c0f8..e4b0f45 100644 --- a/test/doi/fixtures.jl +++ b/test/doi/fixtures.jl @@ -31,7 +31,7 @@ function bundle_fixture(root; result=false, mock=false, dangerous=false) "method" => "nb_glm", "provenance" => Dict("mock" => mock), "results" => Dict("synthetic_fixture" => Dict("status" => "fixture"))))) end - B.write_checksums!(dir) + Target.DOIBundles.write_checksums!(dir) return dir end @@ -102,13 +102,13 @@ function prepared_fixture(f; result=false, dangerous=false, environment="sandbox root = joinpath(tmp, "publications") fake = FakeZenodo(; environment) c = client(fake) - prepared = P.prepare!(root, source, metadata_fixture(), c) + prepared = Target.DOIPublications.prepare!(root, source, metadata_fixture(), c) f(tmp, root, source, fake, c, prepared) end end function publish_fixture(root, prepared, c) - P.publish!(root, prepared["id"], c; confirmation=prepared["confirmation_phrase"], + Target.DOIPublications.publish!(root, prepared["id"], c; confirmation=prepared["confirmation_phrase"], bundle_sha256=prepared["bundle_sha256"], acknowledge_public=true) end diff --git a/test/unit/test_zero_replacement.jl b/test/unit/test_zero_replacement.jl index d4a53d1..9c30803 100644 --- a/test/unit/test_zero_replacement.jl +++ b/test/unit/test_zero_replacement.jl @@ -212,7 +212,7 @@ vector(vals)::Vector{Float64} = Float64[Float64(v) for v in vals] write.table(r, stdout(), sep = ",", row.names = FALSE, col.names = FALSE) """ r_out = read(`$rscript -e $script`, String) - rows = [Float64.(parse.(Float64, split(l, ","))) for l in + rows = [parse.(Float64, split(l, ",")) for l in split(strip(r_out), "\n") if !isempty(strip(l))] reference = permutedims(Matrix{Float64}(hcat(rows...)), (1, 1)) ours = multiplicative_replacement(counts; delta = Float64(mr.delta))