Skip to content

Test asymmetric sampling bounds and section coordinates - #634

Merged
ChrisRackauckas merged 1 commit into
masterfrom
test/asymmetric-section-sampling
Nov 28, 2026
Merged

ChrisRackauckas merged 1 commit into
masterfrom
test/asymmetric-section-sampling

Conversation

@ChrisRackauckas

@ChrisRackauckas ChrisRackauckas commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Codex Desktop 0.171.0-alpha.13.2 · Model: gpt-6.2-astra
Conversation: local session 01a21e85-0b26-7a52-8ccb-fc4379cfd51b (no session URL)

The sampling tests now use a deterministic sampler with a different fraction on each axis. The expected coordinates come from the chosen fractions and asymmetric bounds. The tests cover one- and three-dimensional output, preservation of a section’s fixed middle coordinate, and rejection of reversed bounds for Float32 and Float64.

Verification

On Julia 1.12.4, test/sampling.jl passed 36/36 with both registered QuasiMonteCarlo 0.4.4 and the 0.5.0 candidate at 0656d73ce88ebbdb93baf18f2cbd3435214eda9d. Each run passed all eight new assertions and all 28 existing ones. I checked the loaded Surrogates source and dependency version before including the test file.

In an isolated 0.5.0 checkout, I reversed the two free coordinates when writing a bounded section’s output. Both new section assertions failed, one for each precision, giving six passes and two failures. The unmodified implementation passed all eight.

I ran GROUP=Core julia --project=. -e 'using Pkg; Pkg.test()' on this test branch with registered QuasiMonteCarlo 0.4.4. All 3,220 checks passed, including 36 in the sampling file. GROUP=QA passed 26/26. On the companion compatibility PR with the pinned 0.5.0 checkout, the Core group passed 3,212/3,212 and the independent sampling probe passed 88/88.

Runic, typos with the repository configuration, and git diff --check passed.

The 32-bit Linux Core job failed while Flux precompiled GPUCompiler’s SPIR-V runtime. The job on this PR and the unchanged default produced the same GPUCompiler error, Invalid return type for runtime function 'unbox_int64': expected LLVM.IntegerType(i64), got LLVM.VoidType(void). Both resolved registered QuasiMonteCarlo 0.4.4, reported exit 1 for Flux precompilation, and ended with zero passes and one error. PR x86 job · Unmodified master x86 job

Risk assessment

Risk: low. The fixture extends the QuasiMonteCarlo sampling interface only in the test file.

The tests were written by an AI agent using Codex CLI 0.170.0, model gpt-6.1-terra, local session 01a22014-8336-7e20-902b-2b2ff3a31d32 (no session URL).

Ignore until reviewed by @ChrisRackauckas.

Links


🤖 Posted by an AI agent — harness: Codex Desktop 0.171.0-alpha.13.2 · model: gpt-6.2-astra
Conversation: local session 01a21e85-0b26-7a52-8ccb-fc4379cfd51b (no session URL)

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.170.0
Agent-Model: gpt-6.1-terra
Agent-Session: local session 01a22014-8336-7e20-902b-2b2ff3a31d32 (no session URL)
@ChrisRackauckas

Copy link
Copy Markdown
Member Author

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

All eight new assertions passed with QuasiMonteCarlo 0.4.4 and the 0.5.0 release candidate. Transposing the free section coordinates in an isolated checkout failed the Float32 and Float64 coordinate assertions.

Links


🤖 Posted by an AI agent — harness: Codex Desktop 0.171.0-alpha.13.2 · model: gpt-6.2-astra
Conversation: local session 01a21e85-0b26-7a52-8ccb-fc4379cfd51b (no session URL)

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review November 28, 2026 04:28
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #634

Reviewed head: ea6cda0
Raw SHA-256: 47ac83f09057ba826014b11444e15913ad90e84197926ba38ff49fca208d2754
Source SHA-256: cefbfeffae061db1c83bfc22f1815b83860468108aa7dbecf713091900257c74
Source: standard-review-v1 (harness-log)
Reviewer session: 01a22058-1c34-7d40-8823-2ea5aaafc5f9
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: low (L2)
  • Verdict: MERGE
  • Reviewed head: ea6cda0

Review report

VERDICT: MERGE
Round: 1
Head: ea6cda0
Slot: 1
CI: CI is not green
Session: 01a22058-1c34-7d40-8823-2ea5aaafc5f9
Reviewer: codex-cli 0.172.0; model: gpt-6.2-sol

Risk

low (L2: test/sampling.jl adds deterministic sampling geometry and bounds assertions)

Blocking findings

  • Blocking priorities: none

Non-blocking findings

  • test/sampling.jl:26 — Reversing every bound lets QuasiMonteCarlo's free-coordinate check satisfy the assertion. Removing the full-bounds guard from the bounded SectionSample method in a scratch process left the new test set at 8/8. A separate probe reversing only the fixed coordinate threw on the reviewed code and raised no exception after the mutation.

    Implementation fix — In the Sampling geometry test set in test/sampling.jl, add a case with lower bounds T[-8, 32, 100], upper bounds T[-4, 16, 164], and the existing section that fixes coordinate 2 at 24. Assert that Surrogates.sample throws AssertionError. The free bounds remain valid, so this case exercises validation of the fixed coordinate.

  • test/sampling.jl:14 — The Float32 cases check coordinate values with cross-type equality. A scratch mutation widening the scalar, multidimensional, and section outputs to Float64 left the new test set at 8/8. Separate type assertions passed 3/3 on the reviewed code and failed 3/3 after widening.

    Implementation fix — In the same test set, bind each output once and add isa Vector{T} for the scalar-bounds result and isa Vector{NTuple{3, T}} for the two multidimensional results. Keep the exact coordinate comparisons.

What I ran

  • GROUP=Core julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()' from a scratch export of the reviewed head. Julia 1.12.4 and QuasiMonteCarlo 0.4.4. Exit 0, with Core/sampling.jl | 36 36, Core/SectionSampleTests.jl | 2 2, and Testing Surrogates tests passed. The project resolves dependencies from Project.toml because it has no tracked Julia manifest.
  • julia --startup-file=no --project=. ../sampling-probes.jl <mode> from the same export. The unmodified sampling file passed 36/36. Reversing the sample columns failed 4 of the 8 new assertions. Swapping the two free rows in the section output failed 2 of 8. The fixed-axis and type probes distinguished the two surviving mutations as described above.
  • julia -m Runic --check test/sampling.jl, typos test/sampling.jl, and git diff --check origin/master...HEAD exited 0. The rename-aware path diff showed a single modification, test/sampling.jl.
  • uv run --locked python --version reported Python 3.13.13 with warning: --locked has no effect when used outside of a project. The checkout has no uv.lock.

What I did not verify

Remote CI, other Julia versions and architectures, and a project-locked Python interpreter. The Julia verification used Julia 1.12.4 and required no Python.

AUTHOR_GRADE: {"task":"test","score":4,"difficulty":2,"rounds":1,"author_harness":"Codex CLI 0.170.0","author_model":"gpt-6.1-terra","note":"Core passed and mutation tests confirmed that the new assertions catch sample-order and coordinate-placement regressions. Fixed-axis validation and output-type coverage could be more precise."}

Head link: ea6cda0


🤖 Posted by an AI agent — harness: codex-cli 0.172.0 · model: gpt-6.2-sol
Conversation: local session 01a22058-1c34-7d40-8823-2ea5aaafc5f9 (no session URL)

@ChrisRackauckas
ChrisRackauckas merged commit c8c2a03 into master Nov 28, 2026
12 of 13 checks passed
@ChrisRackauckas
ChrisRackauckas deleted the test/asymmetric-section-sampling branch November 28, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants