Skip to content

Add adjoint S-parameter sensitivities to material parameters - #80

Merged
ChrisRackauckas merged 24 commits into
maxwell/3-sweep-abcfrom
maxwell/8-adjoint
Nov 13, 2026
Merged

ChrisRackauckas merged 24 commits into
maxwell/3-sweep-abcfrom
maxwell/8-adjoint

Conversation

@xtalax-droid

Copy link
Copy Markdown
Collaborator

Depends on #75 (this PR targets its branch, so the diff shows only this layer; it will be retargeted once the layers below merge).

Adds discrete adjoint sensitivities of the wave-port S-parameters of a MaxwellModel with respect to material parameters of named cell sets, for gradient-based design.

What's added

  • s_parameter_sensitivities(model, omegas, params) (or (model, sweep, params) with a sweep run with fields = true) returns MaxwellSensitivities with S and dS[i, j, k, l] (ports i, j; frequency k; parameter l). Parameters are (kind, cellset) with kind in :eps_r, :eps_r_imag, :mu_r, :sigma; the cell set may be any named set (a design subregion), not only a materials key.
  • Because A(ω) is complex symmetric (Aᵀ = A), the adjoint field of port i is the forward field with port i driven, so dSᵢⱼ/dp = −uᵢᵀ (dA/dp) uⱼ / (2iβᵢ L Pᵢ / μr,ᵢ) times the power-wave and de-embedding factors. No solve is needed beyond the sweep: for 9 frequencies and 4 parameters the sensitivities cost about 1% of the sweep (0.0096 s vs 0.83 s at 8.6k dofs; 0.036 s vs 5.65 s at 31k).
  • dA/dp is assembled once per parameter over that set's cells: the mass block for εr and σ, −K/μr² for μr, plus the absorbing boundary's sqrt(εc/μr) derivative on those cells.
  • adjoint_gradient(model, ω, u, dJ_du, params) gives the gradient of a real field functional with one adjoint solve through the pluggable solver(A, B, cache) interface (pass a cached factorisation to reuse it).
  • A parameter set adjacent to a wave port is rejected, since the port mode is taken in fixed material. Terms added with add_term! are treated as parameter-independent (documented).
params = [(:eps_r, "slab"), (:mu_r, "slab"), (:sigma, "slab")]
sens = s_parameter_sensitivities(model, 2π .* [9e9, 10e9], params)
sens.dS[1, 1, 2, 1]   # dS11/dεr at 10 GHz

Validation (test/Maxwell/adjoint.jl, WR-90 with a 10 mm slab, 8.6k dofs)

parameter adjoint dS11 at 9 GHz (lossless, εr = 2.2) rel. error vs central FD: lossless / lossy / ABC on the slab
eps_r 0.264612+0.107878i 4.5e-9 / 3.5e-9 / 4.1e-9
eps_r_imag −0.107878+0.264612i 4.5e-9 / 3.5e-9 / 4.2e-9
mu_r 1.08844−0.105574i 2.3e-8 / 1.2e-8 / 6.3e-9
sigma 0.215458−0.528493i 5.0e-10 / 1.5e-10 / 5.6e-10

(lossy: εr = 2.2 − 0.05i, μr = 1.3, σ = 0.1; error is the norm over the 2×2 dS block at 9 and 11 GHz)

  • Reciprocity dS12 = dS21 (1e-8), holomorphy d/dIm εr = i d/dRe εr (1e-10), and lossless unitarity of dS.
  • Closed-form slab: S11 = −0.07985 + 0.18593i, FEM −0.07668 + 0.18074i at h = 2 mm; dS11/dεr within 2.4% of the derivative of the closed form.
  • adjoint_gradient against FD for J = Σ|u|²: rtol 1e-6.
  • Maxwell group 177/177, QA 21/21.

Docs: a "Material sensitivities" section in docs/src/maxwell.md.

Review pointers

  • The prefactor −G/(cᵢ Pᵢ) · wᵢ/wⱼ · shiftᵢ shiftⱼ is FD-checked with identical ports; ports on different guides/materials and asymmetric de-embedding are untested.
  • Integration with the sibling layers: the PML (Add a Cartesian UPML to the Maxwell model #78) and lumped ports (Add lumped ports and Z/S-parameters to the Maxwell sweep #79) add term types this PR does not differentiate. When those layers are combined, a parameter set overlapping a PML or a lumped port must either be differentiated or rejected; that follow-up is tracked for when the stack is merged.

🤖 Posted by an AI agent · harness: Claude Code 2.1.318 · model: claude-opus-5-5
Review: unreviewed
Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5

t and others added 2 commits November 5, 2026 23:20
Antenna and filter optimisation needs gradients of S-parameters with respect to material parameters. A(omega) is complex symmetric, so the adjoint of each wave port's output is the forward field with that port driven: s_parameter_sensitivities gives dS/dp for eps_r, Im eps_r, mu_r and sigma of named cell sets from the sweep's fields with no extra solve, including the absorbing boundary's dependence on the adjacent material. adjoint_gradient covers real field functionals with one adjoint solve through the pluggable solver interface. Validated against central finite differences of the forward sweep (relative agreement 1e-10 to 2e-8) and against the closed-form WR-90 dielectric slab.

Agent-Harness: Claude Code 2.1.318
Agent-Model: claude-opus-5-5
Agent-Session: ee6a670e-e4ec-446c-b941-3ebb999c45c5
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.319
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master 971cc02... master / 971cc02...
construction/heat P1 10x10 6.66 ± 0.66 ms 7.08 ± 0.48 ms 0.941 ± 0.11
construction/heat P1 20x20 9.2 ± 0.74 ms 9.91 ± 0.4 ms 0.928 ± 0.084
time_to_load 4.7 ± 0.11 s 4.94 ± 0.023 s 0.951 ± 0.022
Memory benchmarks
master 971cc02... master / 971cc02...
construction/heat P1 10x10 0.0396 M allocs: 2.12 MB 0.0396 M allocs: 2.12 MB 1
construction/heat P1 20x20 0.0704 M allocs: 4.74 MB 0.0704 M allocs: 4.74 MB 1
time_to_load 0.2 k allocs: 11.8 kB 0.2 k allocs: 11.8 kB 1

t and others added 2 commits November 10, 2026 20:13
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

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

Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1c8f4-4058-7a10-b1c7-54042630b5cc, reviewed head c8756f5

  • Verdict: CHANGES
  • Risk assessment: medium-low (ML7: additive, documented Maxwell public API; existing entry points and defaults are unchanged).
  • Round / slot: 2 / 1

This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers.

Risk

medium-low (ML7: additive, documented Maxwell public API; existing entry points and defaults are unchanged).

Blocking findings

  • Verdict: CHANGES
  • Round: 2
  • Blocking priorities: P2, P2
  • Deferred P2 issues: None supplied in this blind review; no issue-based deferral established.
  1. [P2] Accepted additional terms can silently invalidate both adjoint APIs. src/maxwell/model.jl:209, src/maxwell/adjoint.jl:153, src/maxwell/adjoint.jl:183. add_term! requires only a real block with the correct sparsity pattern; its own test at test/Maxwell/model.jl:61 accepts independently randomized nonzeros. Neither it nor the adjoint entry points enforces symmetry. Nevertheless, S sensitivities reuse forward fields as transpose adjoints, and adjoint_gradient solves with A instead of transpose(A).

    Confirmed by running: On a normalized two-port rectangular guide, I added a parameter-independent block formed by multiplying each row of the permittivity mass block by 1 + 0.7sin(row), with coefficient 3. This satisfies the documented extension interface and is accepted. For a central :eps_r perturbation with step 1e-5, the S derivative has relative error 7.95757 against central differences. For J = sum(abs2, u), the returned gradient is 5.357115866, versus 0.698135399 by central differences. Without the added term, the corresponding relative errors are 2.998e-10 and 3.666e-8. Reproducer: scratch/probes.jl:38; output: scratch/probes-regression.log.

    Suggested fix: Either document and enforce symmetric additional blocks, including a rejection regression, or implement transpose adjoint solves for nonsymmetric operators. Both sensitivity APIs need coverage for this accepted extension path.

  2. [P2] Interior points on graded meshes are silently classified as outside. src/maxwell/driven.jl:95. field_values uses Ferrite's default three-nearest-node search and leaves NaN whenever that limited search misses. A conforming tetrahedral mesh can have nearby nodes outside the cell containing the point. The surrounding solution API already handles this with _locate in src/solution.jl:87.

    Confirmed by running: On an eight-tetrahedron conforming graded mesh, (3.3, 3.3, 3.3) lies strictly inside the tetrahedron with vertices (0,0,0), (10,0,0), (0,10,0), (0,0,10): every coordinate is positive and their sum is 9.9 < 10. With finite edge dofs, field_values returns three NaN field components. The default handler reports nothing, while the existing _locate finds cell 1. Reproducer: scratch/probes.jl:6; output: scratch/probes-regression.log.

    Suggested fix: Reuse _locate or an equivalent complete fallback, and add a graded tetrahedral mesh regression asserting finite field values at interior points.

Non-blocking findings

  • src/maxwell/model.jl:158, src/maxwell/ports.jl:141, src/maxwell/ports.jl:177: new Maxwell code extends the repository's existing reliance on non-public Ferrite helpers. Running Base.ispublic returns false for both dirichlet_facetdof_indices and reference_facets; the existing QA allowlist exempts them. This conflicts with the supplied public-API-only instruction. Prefer public upstream accessors or small local helpers. This dependency debt already exists in the surrounding code and QA configuration.

What I ran

AI reviewer: codex-cli 0.164.0, model gpt-6.1-sol; local session ID above, no session URL available. Review remained independent: no PR body, comments, author risk rating, or earlier review was read.

I first exported TMPDIR=(a local scratch path). The checkout remained untouched; tests ran from a git archive HEAD copy at scratch/head. JULIA_DEPOT_PATH retained the supplied writable job depot over the shared depot. Julia jobs used memory-capped scopes, two Julia threads, four precompile tasks, and one OpenBLAS thread.

  • git diff origin/master...HEAD, affected source/tests/docs, repository test instructions, and the supplied risk policy. No root AGENTS.md or CLAUDE.md exists in this checkout.
  • julia --version: Julia 1.13.2. The repository has no committed Julia manifest or interpreter lock; Pkg resolved the archived project's declared dependencies. The resulting manifest is in scratch/head/Manifest.toml; Ferrite was 1.7.0.
  • GROUP=Maxwell julia --startup-file=no --project="$scratch/head" -e 'using Pkg; Pkg.test()': exit 0, 177 assertions passed: adjoint 44, manufactured 4, model 80, ports 49. Log: scratch/maxwell-suite.log. Manufactured H(curl) rates were 0.9821, 0.9973 lossless and 0.9670, 0.9932 lossy.
  • GROUP=QA julia --startup-file=no --project="$scratch/head" -e 'using Pkg; Pkg.test()': exit 0, 21 assertions passed. Log: scratch/qa-suite.log.
  • julia --startup-file=no --project="$scratch/head" "$scratch/run-probes.jl": exit 1, 6 passed, 3 failed, 0 errored. The three failed assertions establish the two blockers above. Heterogeneous permeability S sensitivities agreed with finite differences to 2.793e-10 relative error; a complex linear field objective agreed to 5.940e-9. An initial probe setup was rejected correctly because it put conductivity at a port; I corrected that scratch setup before this final run.
  • uv run --locked python --version: Python 3.15.0, with warning: --locked has no effect outside a project. There is no Python project or uv.lock here, so this does not establish a locked project Python interpreter. Python was not used for validation.
  • git diff --check origin/master...HEAD: exit 0. Final git status --porcelain: empty. All commands started for this review completed.

Here $scratch denotes (a local scratch path).

What I did not verify

  • Other test groups, a full docs build, Julia LTS/prerelease versions, downgrade environments, or external CI status.
  • Issue-based P2 deferral eligibility: the blind-review constraint excludes the PR discussion and linked issue records. The owning head must supply any open same-repository issues recording this full head SHA.
  • No fixes, commits, pushes, GitHub posts, approvals, or merges were made.

🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5
Conversation: local session 3878b54e-28f2-4a01-a176-a8f5468d1997 (no session URL)

t and others added 5 commits November 11, 2026 23:54
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
The adjoint of a port is its forward field, and the adjoint solve uses A, only when A is symmetric; add_term! accepts any block of the right pattern, so the three entry points now check the blocks are symmetric and throw an ArgumentError otherwise.

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
The absolute floor accepted a tiny nonsymmetric block with a huge coefficient; the check is now relative to the block.

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Consistent with the forward absorbing coefficient.

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Collaborator Author

Review feedback on this PR has been addressed on head 25b676e. Master was merged in first (merge commits only, no rebase or force-push), then each finding was fixed with a regression test, and a Codex review of the branch approved with no open findings. All named CI checks are green on this head, including the Documentation job, which had one re-run after the gh-pages deploy push was rejected by a concurrent job (the docs build itself succeeded).

Stacked on #75.

Items deliberately left as they are: reaction coefficients that are subnormal but representable are still rejected (conservative); coefficients that cancel to zero only up to roundoff are rejected rather than compared with a tolerance; the absorbing-boundary adjoint derivative uses 0 for the sigma term at omega = 0 although the true limit is finite and nonzero.

🤖 Posted by an AI agent · harness: Claude Code 2.1.322 · model: claude-sonnet-5-5
Review: unreviewed
Session: 43e03fde-3384-4386-bae9-03e81f19ba7c

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

Independent review (Codex CLI v0.164.0 / gpt-6.1-sol), reviewer session 01a1ceeb-659f-7bd1-87e8-425135490b29, reviewed head 25b676e

  • Verdict: CHANGES
  • Risk assessment: medium-low (ML7: additive, documented and tested Maxwell public APIs; existing entry points and defaults are unchanged).
  • Round / slot: 3 / 1

This is a blind code-only review by a session other than the PR author's, copied below from the reviewer's report with only the grading metadata removed. The posting agent did not re-run the reviewer's commands. A MERGE verdict is advice; merging is left to the maintainers.

CI: green
Session: 01a1ceeb-659f-7bd1-87e8-425135490b29

Risk

medium-low (ML7: additive, documented and tested Maxwell public APIs; existing entry points and defaults are unchanged).

Blocking findings

  • Verdict: CHANGES
  • Round: 3
  • Blocking priorities: P2
  • Deferred P2 issues: None supplied; no issue-based deferral established.
  1. [P2] Constrained entries can mask nonsymmetry and leave both adjoint APIs incorrect. src/maxwell/adjoint.jl:12. The new check measures relative asymmetry over the entire block, including PEC entries that are eliminated from the forward equations. A large symmetric entry on a constrained dof can therefore admit materially nonsymmetric free equations. The prior adjoint blocker remains reproducible through this new guard.

    Confirmed by running: On a normalized two-port guide of size 2 × 1 × 3, with a (4, 2, 6) tetrahedral mesh and ω = 2.5, form an additional block from the fixed permittivity mass block by multiplying row i by 1 + 0.7sin(i), with coefficient 3. Set its diagonal entry at PEC dof 1 to 1e16. This changes the forward fields by exactly zero compared with the unpadded nonsymmetric block, but lowers the guard's skew ratio to 5.084e-15, below its 1e-12 threshold. All three adjoint entry points accept the padded model. The free operator's relative skew is 0.008695.

    For a slab :eps_r perturbation of 1e-5, S sensitivities differ from central differences by 2.5326%. For J = sum(abs2, u), adjoint_gradient returns -8.068681163, versus -8.553009641 by central differences (5.6627% error). Errors persist for steps 1e-4, 1e-5, and 1e-6; the forward residual is 5.733e-15. Without the additional block, corresponding derivative errors at 1e-5 are 2.151e-10 and 1.515e-9. Reproducer: scratch/symmetry-singlemode.jl:25; evidence: scratch/symmetry-singlemode.log.

    Suggested fix: Enforce exact symmetry for the stored blocks, or use transpose-adjoint solves for accepted nonsymmetric operators. Add this constrained-dof padding regression for both sensitivity methods and adjoint_gradient.

Non-blocking findings

None in the delta. The graded-point-location blocker is resolved, and the Maxwell runtime calls to the two previously cited non-public Ferrite helpers are removed.

What I ran

AI reviewer: codex-cli 0.164.0, model gpt-6.1-sol; actual local session above, no session URL available. I read the supplied previous-head review, delta, whole PR diff, affected source/tests/docs and risk policy. No PR body, comments, author risk rating, sibling review artifacts or earlier same-head review was read. No root AGENTS.md or CLAUDE.md exists in this checkout.

Scratch paths below are relative to this report. I exported TMPDIR to the supplied round3/tmp directory first and preserved the supplied JULIA_DEPOT_PATH. Tests used git archive copies in scratch/head and scratch/before, memory-capped scopes, two Julia threads, four precompile tasks and one OpenBLAS thread.

  • julia --version: Julia 1.13.2. There is no committed Julia manifest or interpreter lock. Pkg resolved the declared project dependencies; the resulting head manifest is scratch/head/Manifest.toml, with Ferrite 1.7.0. Probe environments develop the corresponding archived package.
  • GROUP=Maxwell julia --startup-file=no --project="$scratch/head" -e 'using Pkg; Pkg.test()': exit 0, 211 assertions passed (adjoint 60, manufactured 4, model 84, ports 63). Log: scratch/maxwell-suite.log.
  • GROUP=QA julia --startup-file=no --project="$scratch/head" -e 'using Pkg; Pkg.test()': exit 0, 21 assertions passed. Log: scratch/qa-suite.log.
  • julia --startup-file=no --project="$scratch/env" "$scratch/regressions.jl": exit 0, 34 passed. Covers analytic constant-field evaluation at a nearest-node-search miss, ordinary nonsymmetry rejection through all three adjoint entry points, empty sweeps, reused solver buffers, and zero-frequency absorbing operators/derivatives. Log: scratch/regressions-head-final.log.
  • The same regression script under --project="$scratch/before-env", developing c8756f55f49456014ef824244e970107809495d8: exit 1, 5 passed, 17 failed, 1 errored. The error is the previous empty-sweep BoundsError, which prevents the subsequent buffer checks in that testset. Log: scratch/regressions-before.log.
  • julia --startup-file=no --project="$scratch/env" "$scratch/symmetry-singlemode.jl": exit 1, 9 passed, 7 failed, 0 errored. Establishes the blocker above. The corresponding symmetry-probe.jl at ω = 4 also yields 9 passed, 7 failed, with 11.264% S-derivative error and 2.572% objective-gradient error.
  • Initial scratch attempts needed a direct Ferrite dependency and conversion of complex Vec values to standard vectors for norm comparisons; these setup errors were corrected before the final regression run.
  • uv run --locked python --version: Python 3.15.0, with warning that --locked has no effect outside a project. There is no Python project or uv.lock; this does not establish a locked project Python interpreter. Python was not used for validation.
  • git diff --check origin/master...HEAD: exit 0. Final checkout status: clean, with the requested head unchanged. All commands started for this review completed or were interrupted before test launch; no command remains running.

What I did not verify

  • Other test groups, the docs build, Julia LTS/prerelease or downgrade environments, and external CI status. CI: green is supplied review metadata.
  • P2 deferral eligibility: no open same-repository issue recording this full head SHA was supplied, and the blind-review restriction excludes inspecting PR discussion or linked issue records.
  • No fixes, checkout edits, commits, pushes, GitHub posts, approvals or merges were made.

🤖 Posted by an AI agent — harness: Claude Code 2.1.322 · model: claude-sonnet-5-5
Conversation: local session 3878b54e-28f2-4a01-a176-a8f5468d1997 (no session URL)

t and others added 2 commits November 12, 2026 10:18
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
A large symmetric entry on a constrained dof could hide a nonsymmetric free operator, so the sensitivities accepted models whose adjoint is wrong. The relative skew is now measured on the unconstrained sub-block, with the same tolerance.

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Collaborator Author

Follow-up to the latest review on head 21dc1ee: the adjoint symmetry guard now measures skew on the free (unconstrained) dofs only, so a large symmetric entry on a PEC dof can no longer hide a nonsymmetric free operator. Both sensitivity methods and adjoint_gradient reject the padded model from the review; a regression covers all three. Also includes the base-branch ports fix.

Codex review of the branch approved with no open findings, and all named CI checks are green on this head. Merge commits only; no rebase or force-push.

🤖 Posted by an AI agent · harness: Claude Code 2.1.322 · model: claude-sonnet-5-5
Review: unreviewed
Session: 43e03fde-3384-4386-bae9-03e81f19ba7c

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #80

Reviewed head: 21dc1ee
Raw SHA-256: ecca41374528541f0c88188204e36ef3ec479b4fbe6f5698f7fa6513036a7e6a
Source SHA-256: c6f8515e66d240aed35c8b59745b794188bdf55f96a008abd8cd4167cec611f8
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d11c-baa6-7460-8680-40c191cdc944
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: MERGE
  • Reviewed head: 21dc1ee

Review report

VERDICT: MERGE
Round: 4
Head: 21dc1ee
Slot: 1
CI: green
Session: 01a1d11c-baa6-7460-8680-40c191cdc944

Risk

medium-low (ML7: additive, documented Maxwell public APIs with numerical tests; existing entry points and defaults are unchanged).

Blocking findings

None. Confirmed by running: the prior constrained-dof padding blocker is resolved at both s_parameter_sensitivities methods and adjoint_gradient.

  • Verdict: MERGE
  • Round: 4
  • Blocking priorities: None
  • Deferred P2 issues: None required.

Non-blocking findings

None in the delta.

What I ran

AI reviewer: codex-cli 0.164.0, model gpt-6.1-sol; actual local session above, no session URL available. Read the supplied previous-head review, delta, whole PR diff and affected code/tests/docs. Focused probes on the delta and prior blocker. No PR discussion, author risk rating, earlier same-head review or sibling review artifacts were read. Neither root AGENTS.md nor CLAUDE.md exists in this checkout.

Exported the requested TMPDIR before commands and preserved the runtime's layered JULIA_DEPOT_PATH. Used git archive copies in scratch/head and scratch/before; all tests ran in memory-capped scopes with two Julia threads, four precompile tasks and one OpenBLAS thread. Paths below are relative to this report.

  • julia --version: Julia 1.13.2. No committed interpreter lock or Julia manifest exists. Pkg.instantiate() resolved the declared dependencies into scratch/head/Manifest.toml, including Ferrite 1.7.0; the same manifest was used for the previous-head probes.
  • GROUP=Maxwell julia --startup-file=no --project=scratch/head -e 'using Pkg; Pkg.instantiate(); Pkg.test()': exit 0, 215 passed (adjoint 63, manufactured 4, model 84, ports 64). Includes analytic convergence, transmission-line references and material derivative checks. Log: scratch/maxwell-suite.log.
  • julia --startup-file=no --project=scratch/head scratch/delta-probes.jl: exit 0, 29 passed. Log: scratch/probes-head.log. A block with full relative skew 3.653e-15 but free-block skew 0.24698 is rejected by all three adjoint entry points. Asymmetry confined to constrained rows/columns preserves the forward solution and accepted derivatives: maximum relative finite-difference errors over steps 1e-4, 1e-5, 1e-6 were 1.595e-8 for S sensitivities and 1.576e-8 for the objective gradient. Also checked port order and solved S for stateful iterators, generators and tuples, duplicate-port rejection, empty iterators and an entirely constrained mesh.
  • The same probes with --project=scratch/before, containing head 25b676e82827a622aa9f47eeb578fac45847de90: exit 1, 23 passed, 5 failed, 0 errored. Three failures confirm the previous guard accepts the padded nonsymmetric model; two confirm the stateful iterator produces zero ports. Log: scratch/probes-before.log.
  • uv run --locked python --version: Python 3.15.0, with warning that --locked has no effect outside a project. No Python project or uv.lock exists; this does not establish a locked project interpreter. Python was not used for validation.
  • git diff --check origin/master...HEAD: exit 0. Supplied delta.diff matches git diff 25b676e82827a622aa9f47eeb578fac45847de90 HEAD byte-for-byte. Final checkout status is clean and HEAD is unchanged. All started commands completed.

What I did not verify

Other test groups, the docs build, Julia LTS/prerelease or downgrade environments, and external CI status. CI: green is supplied metadata. No checkout edits, fixes, commits, pushes or GitHub actions were performed.

AUTHOR_GRADE: {"task":"feature","score":5,"difficulty":4,"rounds":4,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"215 Maxwell assertions and 29 independent delta probes pass. The same probes expose five failures on the previous head, confirming the constrained-dof symmetry blocker and one-pass port iterator defect are repaired; accepted constrained-only perturbations retain finite-difference accuracy."}

Head link: 21dc1ee


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d11c-baa6-7460-8680-40c191cdc944 (no session URL)

t and others added 10 commits November 12, 2026 19:05
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
The absorbing term now takes the outgoing root for a lossless negative eps_r/mu_r; the derivative uses the same branch.

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Uses the same outgoing branch as the operator.

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #80

Reviewed head: 94cf78f
Raw SHA-256: 7d6dd58f5a174c95618f0137ae867a20edcc22a7834ef9fbcfbf93260a0cc53f
Source SHA-256: eaaeba6a812283a470241e7c48f51f4a1b2b284ff7d5471b70d6755ce30e26dc
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d18f-d05f-7061-bdbc-bf241d8e3619
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: CHANGES
  • Reviewed head: 94cf78f

Review report

VERDICT: CHANGES
Round: 5
Head: 94cf78f
Slot: 1
CI: CI is not green
Session: 01a1d18f-d05f-7061-bdbc-bf241d8e3619

Risk

medium-low (ML7: additive, documented Maxwell public API; the existing FEM entry points are unchanged). Independently assessed from code and executed tests, without reading an author rating.

Blocking findings

  • [P1] The wave-port impedance absorbs evanescent content as real power, producing materially wrong S-parameters. src/maxwell/ports.jl:250 applies iβ10/μr to the full tangential mass matrix assembled at line 200. Thus every tangential trace receives the propagating TE10 admittance, including higher modes that should be evanescent and reactive. s_parameters at line 303 measures only the TE10 projection, so this artificial absorption silently disappears from the returned scattering matrix. This affects a lossless dielectric discontinuity near an otherwise valid vacuum port, even below the next propagating mode's cutoff.

    Confirmed by running: a PEC rectangular guide of dimensions 2 × 1 × 1, eps0 = mu0 = 1, vacuum ports at both ends, ω = 2, and a lossless eps_r = 9 inclusion occupying x ≤ 1, 0.25 ≤ z ≤ 0.75. Here π/2 < ω < π, so TE10 is the only propagating vacuum mode and the exact outgoing power is one. With progressively finer tetrahedral meshes:

    Mesh subdivisions Empty-guide power Inclusion power abs2(S11) + abs2(S21)
    (8, 4, 4) 0.9996513285 0.7168516394
    (12, 6, 8) 0.9999344776 0.7337187277
    (16, 8, 12) 0.9999793820 0.7319610011

    The approximately 27% loss persists under refinement. On the finest mesh, the sum over port faces of real(u' * B * u) - abs2(p' * u)/P, divided by the incident port norm, is 0.2680389989; adding it to the reported power gives 0.9999999999999951. This identifies the omitted power as absorption of the complementary port traces. Keeping the same inclusion and extending each vacuum lead from 0.25 to 0.75 to 1.25, with de-embedding to the inclusion faces, changes power from 0.7337187277 to 0.8546612939 to 0.9833319096 and changes the referenced S-parameters substantially.

    Minimal reproducer:

    using FiniteElementMethod, Ferrite
    g = generate_grid(Tetrahedron, (12, 6, 8), Vec(0.0, 0.0, 0.0), Vec(2.0, 1.0, 1.0))
    addcellset!(g, "load", x -> x[1] <= 1 + 1e-10 &&
        0.25 - 1e-10 <= x[3] <= 0.75 + 1e-10; all = true)
    ports = [WavePort(f; a_direction = (1, 0, 0)) for f in ("bottom", "top")]
    m = MaxwellModel(g; materials = Dict("load" => MaxwellMaterial(; eps_r = 9.0)),
        pec = ["left", "right", "front", "back"], ports, eps0 = 1.0, mu0 = 1.0)
    S = solve_sweep(m, [2.0]).S[:, :, 1]
    sum(abs2, S[:, 1]) # observed: 0.7337187277354115; conservation requires 1

    Suggested fix: use a modal port boundary with the appropriate reactive treatment of evanescent traces, and add this asymmetric lossless conservation regression. If the intended boundary is only an approximation requiring long uniform leads, make that limitation explicit and diagnose significant unrepresented outgoing power rather than silently returning it as device loss. The existing straight-guide and full-cross-section slab tests do not exercise this mode conversion.

  • Verdict: CHANGES

  • Round: 5

  • Blocking priorities: P1

  • Deferred P2 issues: None supplied; no deferral assessed.

Non-blocking findings

  • src/maxwell/sweep.jl:44: confirmed by running, solve_sweep(model, [NaN]) throws ArgumentError: invalid index: nothing of type Nothing: the rejection predicate fails, but findfirst(<=(0), omegas) finds no index. [Inf] reaches factorization and throws SingularException. Validate finite positive frequencies with one shared predicate and identify the rejected element with its negation.

What I ran

  • AI reviewer: codex-cli 0.164.0, model gpt-6.1-sol; local session 01a1d18f-d05f-7061-bdbc-bf241d8e3619 (no session URL available).
  • Read git diff origin/master...HEAD, the affected source, documentation and tests, and the risk criteria. Neither AGENTS.md nor CLAUDE.md exists at this checkout's root; the supplied instructions were applied. The newest commit's attribution trailers identify the author harness/model used below.
  • git rev-parse HEAD returned the full head above. git diff --check origin/master...HEAD exited 0. Final git status --porcelain=v1 was empty.
  • Exported the requested TMPDIR; all generated files and package-environment changes went into the authorized scratch/tmp locations. Tested an exact git archive HEAD extraction in $SCRATCH/source, leaving the checkout untouched. Preserved the supplied layered JULIA_DEPOT_PATH. Julia commands ran in memory-capped scopes with two Julia threads and at most two precompile tasks.
  • julia --version: julia version 1.13.2. There is no checked-in Julia manifest or interpreter pin; resolved the project's declared dependencies in the scratch copy. Ferrite resolved to 1.7.0.
  • GROUP=Maxwell julia --startup-file=no --project="$SCRATCH/source" -e 'using Pkg; Pkg.instantiate(;allow_autoprecomp=false); Pkg.test(;julia_args=["--startup-file=no"])': exit 0; Maxwell/adjoint.jl 63/63, manufactured.jl 4/4, model.jl 98/98, ports.jl 110/110; 275 assertions passed. Observed manufactured H(curl) convergence rates were approximately 0.982, 0.997 lossless and 0.967, 0.993 lossy.
  • GROUP=QA julia --startup-file=no --project="$SCRATCH/source" -e 'using Pkg; Pkg.test(;julia_args=["--startup-file=no"])': exit 0; 21/21 QA assertions passed.
  • julia --startup-file=no --project="$SCRATCH/source" "$SCRATCH/probes.jl": exit 0; printed the refinement/control/port-power decomposition above and the nonfinite-frequency diagnostics. It also compared A(-ω) with conj(A(ω)): equality for real vacuum permittivity, relative difference 0.0099231181 for fixed eps_r = 1 - 0.1im. The latter was exploratory and is not treated as a blocker because the frequency convention for a fixed complex material at negative frequencies needs clarification.
  • julia --startup-file=no --project="$SCRATCH/source" "$SCRATCH/extension-probe.jl": exit 0; printed the three lead-extension results above.
  • uv run --locked python --version printed Python 3.15.0, accompanied by --locked has no effect when used outside of a project. This is a Julia repository with neither uv.lock nor pyproject.toml; that output does not establish a locked project Python interpreter. No Python interpreter was substituted for the Julia test environment.
  • All started commands completed before this report was written. No checkout edits, commits, pushes, GitHub reads of discussion, or GitHub posts were performed.

What I did not verify

  • The full test suite outside Maxwell and QA, Julia LTS/prerelease versions, documentation build, benchmarks, or external linear solvers.
  • GitHub CI details: the supplied status says CI is not green; no PR body, comments, reviews, earlier same-head reports, author risk rating or deferred-issue evidence was inspected.
  • A complete independent reference scattering matrix for the asymmetric inclusion. The blocker uses exact lossless single-propagating-mode power conservation, mesh refinement, boundary-power closure, and port-extension controls.

AUTHOR_GRADE: {"task":"feature","score":2,"difficulty":4,"rounds":5,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"All 275 Maxwell and 21 QA assertions pass, including analytic and adjoint checks, but an independent lossless asymmetric-guide probe demonstrates approximately 27% artificial port absorption that persists under refinement and materially changes the S-parameters."}

Head link: 94cf78f


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d18f-d05f-7061-bdbc-bf241d8e3619 (no session URL)

t and others added 2 commits November 12, 2026 21:23
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #80

Reviewed head: 5d580f4
Raw SHA-256: 462eab16ca1fb5e51bba81dce3438485ad8bdb6b561dc453239caca23267518a
Source SHA-256: 8c1d761654f5fa250617212afbcf9c1973f1ef5fffee80d10551397012580a0c
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d1d4-4b16-70a1-a21c-40a86ca916e6
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: MERGE
  • Reviewed head: 5d580f4

Review report

VERDICT: MERGE
Round: 6
Head: 5d580f4
Slot: 1
CI: CI is not green
Session: 01a1d1d4-4b16-70a1-a21c-40a86ca916e6

Risk

medium-low (ML7: additive, documented Maxwell public API with analytic and numerical tests; existing FEM entry points are unchanged).

Blocking findings

None. The previous P1 artificial-absorption reproducer fails on the preceding head and passes on this head. The reflective treatment of complementary port traces is now explicit in the documentation. The previous nonfinite-frequency diagnostic issue is also resolved.

  • Verdict: MERGE
  • Round: 6
  • Blocking priorities: none
  • Deferred P2 issues: None supplied; no deferral needed.

Non-blocking findings

  • src/maxwell/model.jl:234: confirmed by running, the documented Ferrite.allocate_matrix(model.dh) recipe produces a block rejected by add_term! on a model with ports. The probe produced 31,380 stored entries versus 53,724 in the expanded model pattern, followed by ArgumentError: the block must have the sparsity pattern of the model's blocks. Document copying and zeroing a model block when constructing additional terms.
  • src/maxwell/model.jl:72 and src/maxwell/ports.jl:276: found by reading, two equations disagree with the implemented modal boundary. The model docstring still describes the full tangential mass matrix; it should describe p pᵀ / norm. The boundary-condition comment needs +(iβ/μr) c e - 2(iβ/μr) E0 e for the stated outgoing-wave convention and positive operator term. The executed analytic tests support the implementation's sign.

What I ran

  • AI reviewer: codex-cli 0.164.0, model gpt-6.1-sol, local session 01a1d1d4-4b16-70a1-a21c-40a86ca916e6 (no session URL available). Risk was assessed without reading an author risk rating.
  • Read the supplied delta and preceding different-head review, with the complete PR changes and affected source/tests/documentation for context. Neither root AGENTS.md nor root CLAUDE.md exists; applied the supplied instructions. Read the risk criteria and newest commit's attribution trailers.
  • git rev-parse HEAD returned the full head above. git diff --check origin/master...HEAD exited 0. Final git status --porcelain=v1 was empty.
  • Exported the requested TMPDIR. Used exact git archive scratch copies of the head and preceding head 94cf78fba04dc264b73245c20f33453d3c46d3c7, preserving the runtime's layered JULIA_DEPOT_PATH. Both copies used the same resolved dependency manifest. Julia jobs ran serially in memory-capped scopes with two Julia threads and two precompile tasks; probes and QA also set OPENBLAS_NUM_THREADS=1. Below, $SCRATCH denotes the requested scratch directory.
  • julia --version: julia version 1.13.2. There is no checked-in Julia manifest or interpreter pin; instantiated the declared project in scratch. Ferrite resolved to 1.7.0.
  • GROUP=Maxwell julia --startup-file=no --project="$SCRATCH/head" -e 'using Pkg; println("Julia ", VERSION); Pkg.instantiate(; allow_autoprecomp=false); Pkg.test(; julia_args=["--startup-file=no"])': exit 0; adjoint 63/63, manufactured 4/4, model 98/98, ports 121/121: 286 assertions passed, including the existing analytic scattering and convergence checks.
  • GROUP=QA julia --startup-file=no --project="$SCRATCH/head" -e 'using Pkg; Pkg.test(; julia_args=["--startup-file=no"])': exit 0, 21/21 assertions passed.
  • julia --startup-file=no --project="$SCRATCH/before" "$SCRATCH/conservation.jl": exit 1, 2 failed / 2 passed. The unchanged prior lossless asymmetric-inclusion reproducer gave outgoing powers 0.7168516394435127 and 0.7337187277354048 on meshes (8,4,4) and (12,6,8). Exact single-mode lossless conservation requires one; full-matrix unitarity errors were 0.320657 and 0.280168.
  • julia --startup-file=no --project="$SCRATCH/head" -e 'foreach(include, ARGS)' "$SCRATCH/conservation.jl" "$SCRATCH/delta-probes.jl" "$SCRATCH/asymmetric-adjoint.jl": exit 0, 34/34 assertions passed. The identical conservation regression gave powers 1.0000000000000007 and 1.000000000000002, with unitarity errors below 2.0e-14. Nine combinations of lead length and frequency also conserved power and obeyed reciprocity; complementary traces remained nonzero. Six invalid frequencies were rejected with zero solver calls. An asymmetric-inclusion permittivity derivative agreed with central finite differences to 3.58e-9 relative error; differentiated unitarity error was 4.09e-14.
  • The lead-extension probe confirms the documented approximation matters: at ω=2, de-embedded S11 changed from approximately −0.5014+0.1968im to −0.1692+0.0330im to −0.1065+0.0400im for leads 0.25, 0.75, 1.25. Power conservation alone does not establish lead-independent scattering accuracy; users should check lead-length convergence.
  • uv run --locked python --version: Python 3.15.0, with warning --locked has no effect when used outside of a project. This Julia checkout has neither uv.lock nor pyproject.toml; a locked project Python interpreter is unavailable. No system Python was substituted for the Julia test environment.
  • All started commands completed. No checkout edits, commits, pushes, GitHub discussion reads, or GitHub posts were performed.

What I did not verify

  • Non-Maxwell test groups other than QA, Julia LTS/prerelease versions, documentation build, formatter/spelling checks, benchmarks, or external linear solvers.
  • A complete independent open-waveguide scattering reference for the asymmetric inclusion, or an accuracy guarantee from the documentation's approximate one-decay-length lead guidance. The implemented complementary-mode boundary is reflective, and lead convergence remains necessary.
  • GitHub CI failure details or deferred-issue evidence. The supplied CI status remains not green; the MERGE verdict is code-review advice and supplies no CI waiver. No PR body, comments, author risk rating, or earlier same-head review was inspected.

AUTHOR_GRADE: {"task":"feature","score":4,"difficulty":4,"rounds":6,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"The delta resolves the reproduced artificial port absorption and nonfinite-frequency diagnostics. All 286 Maxwell, 21 QA and 34 targeted assertions pass; the same conservation regression fails on the preceding head. Reflective higher-mode behavior is documented, with minor equations/allocation documentation still needing alignment."}

Head link: 5d580f4


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d1d4-4b16-70a1-a21c-40a86ca916e6 (no session URL)

Agent-Harness: Claude Code 2.1.322
Agent-Model: claude-sonnet-5-5
Agent-Session: 43e03fde-3384-4386-bae9-03e81f19ba7c
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #80

Reviewed head: 971cc02
Raw SHA-256: 9295ad9aad9e72e77196e5c7ea1473d97cf0b1db3f82df40300575a9e34cbaf3
Source SHA-256: 1776977e90bc23ae2c38152ccc33bb262fb8bc5508ad51145db6b420770a0330
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d222-d3f5-7442-adb9-acc109cbfc37
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: MERGE
  • Reviewed head: 971cc02

Review report

VERDICT: MERGE
Round: 7
Head: 971cc02
Slot: 1
CI: CI is not green
Session: 01a1d222-d3f5-7442-adb9-acc109cbfc37

Risk

medium-low (ML7: additive, documented and tested public Maxwell API; existing calls and defaults unchanged)

Blocking findings

None found.

  • Verdict: MERGE
  • Round: 7
  • Blocking priorities: None
  • Deferred P2 issues: None

Non-blocking findings

None found. The numerical references include independent manufactured fields and closed-form waveguide solutions; the derivative checks compare against finite differences. No existing assertions were deleted, skipped or loosened.

What I ran

Independent blind review by codex-cli 0.164.0, model gpt-6.1-sol. No PR discussion, author risk rating or earlier review was inspected. All commands below completed. Julia used the preserved layered JULIA_DEPOT_PATH; temporary projects, logs and probes stayed outside the checkout in this round's scratch directory. The repository has no committed Manifest or interpreter lock, so I resolved its declared Julia environments into isolated scratch projects.

  • julia --version: 1.13.2.
  • uv run --locked python --version: Python 3.15.0, with the warning that --locked has no effect outside a project. This is a Julia repository with no uv.lock or Python project; no locked project Python interpreter exists.
  • git diff origin/master...HEAD, root instruction-file checks, latest commit attribution, and git diff --check origin/master...HEAD: inspected; whitespace check passed. Final git status --porcelain=v1 was empty and HEAD matched the SHA above.
  • Affected suite: GROUP=Maxwell julia --project="$R/scratch/env" -e 'using Pkg; Pkg.develop(path=pwd()); Pkg.test("FiniteElementMethod")', where $R denotes this round's directory. Actual execution used its absolute path, four Julia threads and a memory-scoped shell timeout. 286/286 passed: adjoint 63, manufactured 4, model 98, ports 121. Observed H(curl) convergence rates were 0.9821, 0.9973 (lossless) and 0.9670, 0.9932 (lossy).
  • Targeted scratch/probes.jl, using the same isolated project: 57/57 passed. Checked all 41 qualified Ferrite names used by the new implementation are public; analytic complex constant fields at length scales 0.01, 1 and 7.3; absorbing-boundary gradients of a complex linear field functional; and unequal, de-embedded ports with one propagating and one evanescent mode. Maximum constant-field error was 7.29e-12. All four mixed-cutoff material sensitivities agreed with central differences within 8.24e-10 relative error. The first probe attempt had three errors from my use of Ferrite's complex-vector norm; converting the scratch probe's vectors to ordinary arrays resolved these, with no checkout changes.
  • QA: copied test/qa/Project.toml into scratch/qa-env, developed this checkout there, then ran include(joinpath(pwd(), "test", "qa", "qa.jl")). Quality Assurance: 21/21 passed, exit 0. Probes and QA used one BLAS/OpenMP thread. Both completed with exit 0.

What I did not verify

The complete unrelated test groups, documentation build, other Julia versions/platforms, and GitHub CI state were not verified. CI remains not green as supplied; MERGE is code-review advice, not authorization to bypass CI. No GitHub writes, commits, pushes or checkout edits occurred.

AUTHOR_GRADE: {"task":"feature","score":5,"difficulty":5,"rounds":7,"author_harness":"Claude Code 2.1.322","author_model":"claude-sonnet-5-5","note":"The additive Maxwell solver and sensitivities passed 286 affected assertions, 57 independent probe assertions and 21 QA assertions, including analytic convergence, mixed-cutoff ports and finite-difference gradients. No blocking defect was established; full docs and CI remain unverified."}

Head link: 971cc02


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d222-d3f5-7442-adb9-acc109cbfc37 (no session URL)

@ChrisRackauckas
ChrisRackauckas merged commit 59959b6 into maxwell/3-sweep-abc Nov 13, 2026
54 checks passed
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