Skip to content

Add a facet normal normal(Γ) for boundary conditions on boundary pieces - #164

Open
xtalax-droid wants to merge 43 commits into
SciML:masterfrom
xtalax-droid:forge/facet-normal
Open

xtalax-droid wants to merge 43 commits into
SciML:masterfrom
xtalax-droid:forge/facet-normal

Conversation

@xtalax-droid

Copy link
Copy Markdown
Contributor

Problem. A boundary condition on a boundary piece could not contain the outward normal. NormalDerivative(Γ) covers ∂ₙu, but absorbing (radiation) and impedance (Robin-type) terms of a vector-valued field, such as Σ_d n_d ∂_c E_d or n × (n × E), need the normal components themselves. A Cartesian derivative of a trace on a non-box piece was rejected outright.

Change.

  • PDEBase.normal(Γ) for a BoundaryPiece returns a Vector{Num} of PDEBase.FacetNormal(Γ)(d) terms, one per spatial dimension. d is the position in indvars(v).
  • In the strong-form analysis a component becomes the slot N[d] on a piece and the numeric ±1 or 0 on a piece that is a face of a box.
  • to_box_bcs lowers the same way, so box discretizations are unaffected.
  • A Cartesian derivative of a trace on a piece is accepted when the same condition also contains normal(Γ) of that piece, and becomes the gradient slot G.
  • A facet normal is an error in a volume equation, under a derivative, as the normal of a different piece than the condition's, in a condition with no derivative of a trace, and when left unreplaced after trace substitution.
  • match_flux, route_natural, d_orders and parse_bcs are unchanged.
  • normal is not exported, because DomainSets exports its own normal; write PDEBase.normal.
  • Nothing that worked before changes meaning. No version bump in this PR.

Tests.

  • Symbolic behaviour, classifier cases and slot output on a piece and on a box face.
  • One negative test per rejected form.
  • A 3-component absorbing-plus-impedance condition through PDESystem → symbolic_discretize → analyse.
  • A box case through to_box_bcs and analyse with exact lowered expressions including sign, and one where indvars order differs from the declared axes.
  • Locally GROUP=Core (apart from test/strongform_library.jl, whose PDESystemLibrary corpus count drifted, 428 systems instead of 427 plus an unexpected pass for trans_sin; it fails the same way without this change), GROUP=QA and the docs build pass. Codex: approve, 0 findings.

How a backend consumes it. Supply slots.N[d] per facet quadrature point as the outward unit normal, in the order of indvars(v). The symbol to match is N[d] in the matched flux, one per component; FacetNormal terms never reach the backend. The flux may now contain products of N with U, a facet bilinear form with a position-dependent coefficient. On box faces N is already numeric.

Review notes.

  • The licence for a Cartesian trace derivative is per condition, so a stray Dx(u(t, Γ)) next to an unrelated normal is accepted and is then the user's contraction.
  • expand_derivatives(Dx(n[d])) is 0 in Symbolics, so the explicit rejection of a derivative of a normal is what protects users; please look at it hardest.
  • A 2D in-plane vector curl-curl condition matches two equations and route_natural reports it as ambiguous (documented); 3D routes uniquely.
  • Complex-valued fields with normal terms are not covered by a test.

🤖 Posted by an AI agent · harness: Claude Code 2.1.318 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

xtalax and others added 3 commits November 5, 2026 23:02
A boundary condition on a piece could not contain the outward normal, so absorbing (radiation) and impedance (Robin-type) terms of a vector-valued field, such as the sum over d of n_d ∂_c E_d or n×(n×E), could not be written. PDEBase.normal(Γ) now returns one symbolic FacetNormal component per spatial dimension. In slot form a component is N[d] on a piece and the numeric ±e on a face of a box, which to_box_bcs also lowers. A Cartesian derivative of a trace on a piece is accepted when the condition also contains the normal of that piece. Misplaced normals are errors.

Agent-Harness: Claude Code 2.1.318
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Describe PDEBase.normal(Γ), the licensed Cartesian trace derivative and the slot mapping in the boundary, strong-form and classifier pages, and list FacetNormal in the API page.

Agent-Harness: Claude Code 2.1.318
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
PDESystemLibrary 0.1.11 adds trans_sin to all_systems (428 systems), which broke the exact 427 pins and the trans_sin @test_broken. The corpus pins are now lower bounds so both 0.1.10 (427) and 0.1.11 (428) pass; trans_sin is covered by the golden gate and accepted.

Agent-Harness: Claude Code 2.1.318
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
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: #164

Reviewed head: 1423de9
Raw SHA-256: 2567a16d130a359c880d73869f482fea676b718919499fa826df38f4c43aa005
Source SHA-256: fce6b62ad50bac38f3720aae0c053abbd7bfd45d8343942be01155a360da6260
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d257-8185-73f2-bad6-f982d6dadb70
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: medium-low (ML7)
  • Verdict: CHANGES
  • Reviewed head: 1423de9

Review report

VERDICT: CHANGES
Round: 1
Head: 1423de9
Slot: 1
CI: CI is not green (regress:tests / Core (julia lts, ubuntu-latest) / Tests - Core (Julia lts); tests / Core (julia 1, ubuntu-latest) / Tests - Core (Julia 1); tests / Core (julia 1, ubuntu-latest, x86) / Tests - Core (Julia 1))
Session: 01a1d257-8185-73f2-bad6-f982d6dadb70

Risk

medium-low (ML7: additive public FacetNormal and normal(::BoundaryPiece) API used in mesh and box boundary lowering).

Blocking findings

  1. [P2] src/StrongForm/boundary.jl:148 — Preserve boundary conditions when a normal component vanishes. Confirmed by running: for scalar heat on a mesh, n[1] * NormalDerivative(Γ)(u(t, Γ)) ~ 0 produces a natural condition with Φ = 0. At the valid flat-facet unit normal N = (0, 1) and gradient G = (7, 3), the written residual is 0, while the compiled conormal residual is -3. The new normal substitution exposes a scale λ = -N₁ to the existing match_flux cancellation at lines 244–251; that scale can vanish on an entire facet. Preserve the multiplier in the boundary representation, or reject a match whose scale cannot be established as nonzero. Add the horizontal-facet counterexample.

  2. [P2] src/classify.jl:424 — Check normal ownership in periodic conditions. Confirmed by running on (x, y) ∈ Rectangle(0..1, 0..2): normal(Γ_top)[2] * u(t, Γ_left) ~ u(t, Γ_right) is accepted as :periodic, and to_box_bcs silently lowers it to u(t, 0.0, y) ~ u(t, 1.0, y). _check_normals returns before checking any normals whenever two locations are present, allowing a third piece's normal despite the documented rejection of normals from another piece. Validate each normal's attachment for periodic conditions, or explicitly reject normals in that condition class; add this negative test.

  • Verdict: CHANGES
  • Round: 1
  • Blocking priorities: P2, P2
  • Deferred P2 issues: None supplied to this blind review.

Non-blocking findings

  • docs/src/boundaries.md:130, test/facet_normal.jl:54, docs/src/strongform.md:54 — The component formula is -(n × curl E), although the test comment and strong-form example identify it as n × curl E. Independent Julia/Python algebra with E = (0, x, 0) and n = (1, 0, 0) gives the documented cross product (0, -1, 0) and the component formula (0, 1, 0). Align the formula or its description, including the relative impedance sign, and add a direct cross-product reference.

  • test/strongform_library.jl:207, test/strongform_library.jl:212, test/to_box_bcs.jl:408 — The local suite failures reproduce on unmodified default-branch commit e1bb4815bdf28789be12dde17fa3849fa13ae763. Both source heads use PDESystemLibrary 0.1.11, receive 428 systems against the expected 427, and encounter an unexpected pass of the trans_sin quarantine. Reconcile these corpus fixtures with supported library releases in a separate task.

What I ran

  • AI review produced with codex-cli 0.164.0, model gpt-6.1-sol; the session ID above has no available session URL. Reviewed only checkout code, the diff, tests, and supplied instructions. Root AGENTS.md and CLAUDE.md were absent.
  • git diff origin/master...HEAD, git diff --check origin/master...HEAD, and final git --no-optional-locks status --porcelain: whitespace check passed; checkout remained clean at the required head.
  • uv run --locked python --version: Python 3.15.0. uv warned that --locked has no effect outside a project.
  • Julia 1.13.2, with the supplied layered JULIA_DEPOT_PATH preserved and the requested TMPDIR. Scratch environments used source archives of head/default, project dependencies plus test extras, and frozen manifests. Compared all 222 non-PDEBase dependency entries: versions and tree hashes were identical. Main versions: ModelingToolkit 11.46.1, ModelingToolkitBase 1.80.0, Symbolics 7.48.0, SymbolicUtils 4.56.1, SciMLTesting 2.13.3, PDESystemLibrary 0.1.11. Verified the baseline loaded without FacetNormal.
  • On both environments: GROUP=Core julia --startup-file=no --project=<scratch environment> -e 'using Pkg; Pkg.test("PDEBase"; julia_args=["--startup-file=no"], allow_reresolve=false)'. Both exited 1 at strongform_library.jl: 7613 passed, 1 failed, 1 errored, 7 broken in that file, with the same corpus failures described above.
  • Separately ran the affected tests through SafeTestsets. Head results: classify.jl 204/204, facet_normal.jl 79/79, strongform_boundary.jl 103/103, strongform_pieces.jl 39/39 passed. Core also passed d_orders.jl 15/15 and mesh_parse_bcs.jl 44/44. Head to_box_bcs.jl had 1414 passed, 1 failed; the baseline rerun reproduced its corpus-count failure, with the same pass counts.
  • julia --startup-file=no --project=../scratch/reviewer-env ../scratch/probes.jl: 0 passed, 2 failed, confirming the two blockers. Independent cross-product algebra confirmed the sign discrepancy. Publicness probes returned true for all SymbolicUtils bindings used by the new constructor, including BSImpl.Term.

What I did not verify

  • QA, documentation builds, LTS/x86 lanes, compatibility minima, or a real mesh backend solve/downstream integration.
  • Core files after the first failing library file, except the separately exercised affected files.
  • CI logs or upstream dependency bisection. The CI line is supplied dispatch metadata; the default-branch comparison establishes the local fixture failures only.
  • A project-pinned Python interpreter: this Julia checkout contains no Python project/uv.lock. The Python version above is uv's outside-project selection.

AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":3,"rounds":1,"author_harness":"Claude Code 2.1.318","author_model":"claude-sonnet-5-5","note":"Positive feature tests pass, but independent probes confirm a changed boundary zero set and missing normal validation for periodic conditions. Local corpus failures reproduce on the default branch with identical dependencies."}

Head link: 1423de9


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d257-8185-73f2-bad6-f982d6dadb70 (no session URL)

…o-location conditions, fix the curl sign

match_flux cancelled a scale such as -N1 that vanishes on a whole facet, so n[1]*NormalDerivative(Γ)(u) ~ 0 was routed as a zero natural condition; it now refuses a scale that holds a normal slot. A facet normal in a periodic (two-location) condition was never attached-checked and lowered silently; it is now an ArgumentError. The component formula is -(n × curl E); docs and the test comment now say so, with a cross-product reference test.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Pushed ef81ab6 addressing all three points.

  1. match_flux no longer cancels a scale that contains a normal component. n[1] * NormalDerivative(Γ)(u) ~ 0 is now rejected as not a conormal condition instead of being routed as a zero natural condition. The horizontal-facet counterexample is a test.
  2. A facet normal in a condition with calls on more than one location, such as normal(Γ_top)[2] * u(t, Γ_left) ~ u(t, Γ_right), is now an ArgumentError. A negative test covers it through classify_condition and to_box_bcs.
  3. The component formula is -(n × curl E), so the docs and the test comment now say -n × curl E + γ n × (n × E). A cross-product reference test (including E = (0, x, 0), n = (1, 0, 0)) was added.

The touched test files pass locally. The remaining Core failures come from the PDESystemLibrary 0.1.11 corpus counts, which #165 addresses separately.


🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

…ns it

Symbolics now defines NormalDerivative, so PDEBase.NormalDerivative is Symbolics' binding and Documenter, restricted to modules = [PDEBase], finds no docstring for it: the @docs entry and every [NormalDerivative](@ref) failed the docs build. Drop the entry and write the name as a code span, which works whether the fallback or Symbolics supplies the type.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed 05caf82 for the failing Documentation check. Symbolics now defines NormalDerivative itself. Documenter only collects docstrings from the modules it is given (here PDEBase), so it found no docstring for PDEBase.NormalDerivative and every [NormalDerivative](@ref) link stopped resolving. The docs for that symbol are unchanged on master, so master is expected to fail the same way with current Symbolics (not built separately).

The commit removes the @docs entry and writes the name as a plain code span. It works whether the PDEBase fallback or Symbolics supplies the type. The docs build passes locally with no Documenter errors, and only docstring text changed.


🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

… LinearAlgebra

LinearAlgebra is not a test dependency, so the file failed to load on CI.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed a882ac0. The Core lts job failed because test/facet_normal.jl imported LinearAlgebra.cross, and LinearAlgebra is not a test dependency of this package ("Package LinearAlgebra not found in current path"). The test now defines the three-component cross product locally. test/facet_normal.jl passes 98/98 locally and Runic is clean.


🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

xtalax and others added 9 commits November 18, 2026 07:35
Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
… in box lowering

to_box_bcs substituted the numeric normal before checking where it occurred, so Dx(n[1]) lowered to Dx(-1) and n[1]*u(t, Γ) to -u(t, 0, y). The box path now runs the same two checks as the strong-form path, through helpers shared in facet_normal.jl.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…rmalDerivative, and in analyse

A derivative spelled with endpoint arguments now counts as the derivative of a Robin condition, NormalDerivative of an expression holding a normal is rejected in box lowering, and analyse rejects a normal in an essential box-face condition before the numeric normal replaces it.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…tion needs

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
With Symbolics before 7.49 PDEBase defines and exports NormalDerivative, and checkdocs = :exports fails the docs build if its docstring is not in the manual. An @autodocs block filtered to that name includes it then and is empty once Symbolics owns the type.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…on holds a facet normal

The syntactic check let a derivative with a zero normal coefficient, or one cancelled across the sides, through to an essential condition. to_box_bcs now checks the lowered residual, and slot_condition (hence analyse) the slotted one, so slot_condition matches its docstring.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…es, and reject a normal as differentiation variable

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…mal as differentiation variable as a normal, skip expansion without a normal

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed a merge of #165 and five commits (f9b128a, aafb38b, 4612021, 1eaf79b and later, through 29cc220) in response to review findings on this branch.

  • Box lowering enforces the facet-normal rules. to_box_bcs previously replaced the normal by its numeric value before checking where it occurs, so Dx(n[1]) + Dx(u(t, Γ)) ~ 1 and n[1] * u(t, Γ) ~ 1 lowered silently. Both are now rejected, with the same wording as the strong-form path (the checks are shared helpers in src/facet_normal.jl).
  • The check runs on the residual, not on syntax. After the face endpoint is substituted, a normal is rejected under a derivative, as a differentiation variable, and in any condition whose residual has no spatial derivative of a field. That covers a zero normal coefficient (n[2] * Dx(u(t, Γ)) + n[1] * u(t, Γ) ~ 1 on a left face), a derivative cancelled across the two sides, a coefficient that vanishes at the face endpoint, and Dt-only conditions. analyse and slot_condition perform the same check. Robin conditions with an endpoint-form derivative, the Dt cases and the u(t, y, x) axis-swap assertions lower as before.
  • Docs. The NormalDerivative fallback docs fix from Stop documenting NormalDerivative through PDEBase, which Symbolics now owns #167 is mirrored here (a filtered @autodocs block). The docs build exits 0 with Symbolics 7.39.2 and with 7.49 locally.
  • Core. The merge of Tolerate PDESystemLibrary corpus growth in strongform and box tests #165 removes the corpus-count failures on this branch. Locally: facet_normal 114, classify 204, strongform_boundary 103, strongform_pieces 39, strongform_analyse 147, d_orders 15, mesh_parse_bcs 44, to_box_bcs 1415, and strongform_library 7614 pass with 7 broken (the intentionally rejected cases), 0 fail.
  • Known limit. A derivative of a field in a variable it does not depend on, such as Differential(x)(q(t)) for a time-only q, still counts as a derivative.

🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

xtalax and others added 4 commits November 18, 2026 12:37
The size checks accepted any library of at least 427 systems, so a dropped model slipped through. The count excluding :trans_sin must now be exactly 427, and :trans_sin must be present exactly when PDESystemLibrary is 0.1.11 or newer.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…branch

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
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: #164

Reviewed head: 0348f17
Raw SHA-256: 1156bb4c555061d560f6ee2c6f308b2c6c64090bb705a986b44934ac4a4b4f4c
Source SHA-256: dccbe872dc3f41e8cbb50d17f4cc54309091b9b8fb7fa69e043e2b3868fb3845
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1eeec-5140-7e30-aa35-022fdbf819ec
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H1)
  • Verdict: CHANGES
  • Reviewed head: 0348f17

Review report

VERDICT: CHANGES
Round: 2
Head: 0348f17
Slot: 1
CI: CI is not green
Session: 01a1eeec-5140-7e30-aa35-022fdbf819ec
Reviewer: codex-cli 0.169.0; model: gpt-6.2-sol

Risk

high (H1: public match_flux and route_natural reject a valid conormal multiple accepted on the default branch)

Blocking findings

  1. [P2] src/StrongForm/boundary.jl:250 — Preserve conormal matches with provably nonzero normal-dependent scales. Confirmed by running with q = N₁G₁ + N₂G₂ and B = (1 + N₁²)(q - 3). The default branch and previous head returned 3 from match_flux(q, B, slots) and (1, 3) from route_natural. The reviewed head returns nothing and raises “not a conormal condition,” respectively. Since 1 + N₁² ≥ 1 for every real normal, the written condition is exactly q = 3. Retain the rejection for a scale such as N₁ that can vanish, and accept a scale whose nonvanishing can be proven. Test both cases through the public helpers.
  2. [P2] src/StrongForm/boundary.jl:184, src/box_lowering.jl:177 — Preserve the zero natural condition at a degenerate box face. Confirmed by running uₜ = ∂ₓ(x∂ₓu) on [0, 1] with x * normal(Γlo)[1] * Dx(u(t, Γlo)) ~ 0. The previous head lowers this to -x * Dx(u(t, 0.0)) ~ 0 and analyse returns (equation = 1, flux = 0). The endpoint spelling still works on the reviewed head, but the equivalent facet-normal spelling raises “no derivative of a trace” in both entry points. Both the written residual and the conormal vanish on this face. Let the existing vanishing-flux route check a volume gradient term whose entire face residual is zero, and preserve equivalent box lowering. Keep rejecting cases where a gradient-free, nonzero residual remains, and test degenerate and nondegenerate diffusion.
  3. [P2] src/facet_normal.jl:78 — A derivative in a coordinate absent from the field bypasses the box guard. Confirmed by running Dx(w(t)) + normal(Γlo)[1] * u(t, Γlo) ~ 1, with w(t) declared as a time-only field. expand_derivatives(Dx(w(t))) gives 0, but to_box_bcs outputs Dx(w(t)) - u(t, 0.0) ~ 1. This is the gradient-free condition -u(t, 0.0) ~ 1 that the guard is meant to reject. Use the declared arguments of each field when deciding whether its differential counts, while preserving legitimate Dx(u(t, 0.0)) endpoint traces of fields declared with x.
  • Blocking priorities: P2, P2, P2

Non-blocking findings

  • src/classify.jl:414 — Confirmed by running that Differential(normal(Γlo)[1])(u(t, Γlo)) ~ u(t, Γhi) still classifies as :periodic, and a differential with the opposite face's normal as its variable classifies as :boundary. to_box_bcs rejects both. Inspect the differential's variable during classification too, so the public classifier enforces the documented normal-ownership rule.
  • docs/src/boundaries.md:130 — From the divergence identity, curl(curl E) has outward flux n × curl E when written as the divergence of its antisymmetric gradient tensor. The example correctly computes the opposite-signed trace for the boundary residual it writes. Describe it as that signed trace or name the signed volume operator explicitly.
  • test/strongform_library.jl:209, test/to_box_bcs.jl:409 — The version-aware corpus assertions passed with PDESystemLibrary 0.1.11 and both suites still exercised the full corpus. The fixture repair is independent of facet-normal handling and can ship separately.

What I ran

  • Read the checkout, the full PR diff, the supplied delta, and the review for the earlier head. The supplied delta matched git diff 1423de94ead7b01d64aa3f2f95b90f547c19bbc2 HEAD byte-for-byte. Root AGENTS.md and CLAUDE.md were absent. git diff --check origin/master...HEAD, Runic --check --diff on changed Julia files and typos --format brief on changed files all exited 0. The checkout remained clean.
  • uv run --locked python --version returned Python 3.15.0. uv reported that --locked has no effect outside a project. This Julia checkout has no Python project or uv.lock.
  • GROUP=Core julia --startup-file=no --project=<scratch-test-env> -e 'using Pkg; Pkg.test("PDEBase"; julia_args=["--startup-file=no"], allow_reresolve=false)' exited 0 with Testing PDEBase tests passed. Julia 1.13.2, Symbolics 7.49.0, SymbolicUtils 4.56.1, ModelingToolkit 11.46.1, ModelingToolkitBase 1.81.0, SciMLTesting 2.13.3 and PDESystemLibrary 0.1.11. classify.jl passed 204/204, facet_normal.jl 114/114, strongform_boundary.jl 103/103, strongform_library.jl had 7,615 passes and 7 existing broken cases, and to_box_bcs.jl passed 1,417/1,417. The first offline resolution attempt found no eligible cached PDESystemLibrary version. Resolving the declared test extras before the locked run recovered it.
  • Ran flux_probe.jl with julia --startup-file=no --project=<scratch-test-env> on the reviewed, previous and default heads, and ran box_probe.jl with the same invocation on the reviewed and previous heads. All 222 non-PDEBase manifest entries matched across the three environments. The probes produced the outcomes above. The reviewed head rejects N₁q ~ 0 where both earlier environments produced zero flux, and rejects a periodic pair with an explicit facet-normal coefficient where the previous head lowered it.
  • Ran docs/make.jl with julia --startup-file=no --project=. in a scratch docs checkout, omitting the publication call. Documenter 1.20.0 completed doctests, cross-reference and document checks, and HTML rendering. The API page contains FacetNormal. The supplied layered Julia depot and requested temporary directory were used throughout.

What I did not verify

  • Julia LTS or 32-bit lanes, QA, dependency minima (including PDESystemLibrary 0.1.10), or an actual downstream mesh solve.
  • Remote CI failures or issue state. The CI line is supplied metadata.

AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":2,"author_harness":"Claude Code 2.1.325","author_model":"claude-sonnet-5-5","note":"Core and docs pass and both original reproductions now reject, but the new guards regress a valid public conormal match and a degenerate natural condition and admit a gradient-free box condition."}

Head link: 0348f17


🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol
Conversation: local session 01a1eeec-5140-7e30-aa35-022fdbf819ec (no session URL)

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #164

Reviewed head: 9b1f3fa
Raw SHA-256: 989e1471045e4d87f854c38acb25cd82b6d900b369b86ae1e1bcd5aebf747679
Source SHA-256: a557ba7cdd7498da3e200b81c5c2cec4750e3d6da90327d6a52b23d8972895fb
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1ef63-4c51-7270-99c0-68e38d4c36a7
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H1)
  • Verdict: CHANGES
  • Reviewed head: 9b1f3fa

Review report

VERDICT: CHANGES
Round: 4
Head: 9b1f3fa
Slot: 1
CI: green
Session: 01a1ef63-4c51-7270-99c0-68e38d4c36a7
Reviewer: codex-cli 0.169.0; model: gpt-6.2-sol

Risk

high (H1: the documented public conormal-matching API rejects a valid boundary condition that the default branch matches)

Blocking findings

  1. [P2] src/facet_normal.jl:85 — Box lowering can still accept a gradient-free condition and now also rejects a valid derivative through a coordinate coefficient. With w(t, y) declared, I ran to_box_bcs on the left-face condition Dy(Differential(k)(w(t, y))) + n[1]*u(t, Γl) ~ 1. It returned the equation with the derivative intact, although expand_derivatives returned 0 for that term. The effective condition is -u(t, 0, y) ~ 1, which should trigger the facet-normal guard. Replacing the derivative term with Dx(Dy(x*w(t, y))) gave the opposite error. The previous head lowered it, whereas this head said “no derivative of a trace” even though expansion returned Dy(w(t, y)). The chain check ignores the parameter derivative and requires a single field call to declare every spatial variable, even when the product rule differentiates the coordinate coefficient. Check the derivative with the fields expressed in their declared variables so the zero check respects the product and chain rules and preserves derivatives of endpoint traces.
  2. [P2] src/StrongForm/boundary.jl:255 — The sign check recognizes the unweighted unit-normal sum and still rejects a strictly positive weighted sum. With q = N[1]*G[1] + N[2]*G[2] and B = (N[1]^2 + 2*N[2]^2)*(q - 3), the default branch returned 3 from match_flux and (1, 3) from route_natural. This head returned nothing and raised “not a conormal condition,” respectively. On the unit circle the multiplier is 1 + N[2]^2 ≥ 1, so the condition is exactly q = 3. Recognize complete sums of positively weighted component squares by using the smallest weight as a strict lower bound. Keep the tests for factors that can vanish.
  • Blocking priorities: P2, P2

Non-blocking findings

  • src/StrongForm/boundary.jl:287 — The docstring describes a positive constant plus even powers of normal components. The probes returned 3 for each of -(1 + N[1]^2), 1 + (N[1] + N[2])^2, and N[1]^2 + N[2]^2 as the multiplier of q - 3. Describe the requirement as provable nonvanishing on the unit sphere and include the supported forms for either sign.

What I ran

  • The supplied delta matched git diff <previous-head> HEAD byte for byte. I read the full PR diff and the previous head's findings. The checkout had neither root instruction file. git diff --check origin/master...HEAD, Runic --check --diff on the changed Julia files, and typos --format brief on the changed files exited 0. The checkout remained clean.
  • uv run --locked python --version returned Python 3.15.0. uv reported that --locked has no effect outside a project. This Julia checkout has no uv.lock.
  • GROUP=Core julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()' in a scratch snapshot exited 0 with Testing PDEBase tests passed. Julia 1.13.2 resolved Symbolics 7.49.0, SymbolicUtils 4.56.1 and PDESystemLibrary 0.1.11. The affected files passed classify.jl 204/204, facet_normal.jl 137/137, strongform_boundary.jl 103/103 and to_box_bcs.jl 1,417/1,417. The runner reported eight broken cases in unchanged test files.
  • julia --startup-file=no --project=<scratch-snapshot> probe.jl compared this head, the previous head and the default branch with identical resolved dependencies. The original zero-normal and cross-side cancellations and Dx(Dy(w(t,y))) now raise the intended error. The previously rejected 1 + (N[1] + N[2])^2 multiplier now returns 3 and routes to (1, 3). A lone normal component and a square that can vanish still return nothing.
  • julia --startup-file=no --project=<scratch-snapshot> slot-probe.jl compared this head and the previous head. The expanded StrongForm cancellation previously left G₁ + G₁*P₁ - G₁*(1 + P₁) and now raises “no derivative of a trace.” The face-vanishing factor produced flux 0 with degenerate diffusion and raised “equation 1 has a nonzero flux on that face” with unit diffusion. All Julia runs used the supplied layered depot and temporary directory.
  • Ran docs/make.jl via include_string in a scratch docs project, with deployment and source links disabled. Documenter 1.20.0 completed doctests, cross-reference checks, document checks and HTML rendering, and the generated API page includes FacetNormal. The scratch archive emitted source-link and inventory metadata warnings.

What I did not verify

  • Julia LTS, the 32-bit lane, dependency minima, QA and downstream discretizer solves.
  • Remote CI, issue state and documentation publication. The CI line uses supplied metadata.

AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":4,"author_harness":"Claude Code 2.1.325","author_model":"claude-sonnet-5-5","note":"The Core suite passes and the targeted examples from the earlier head are addressed. Probes show that box lowering still misclassifies mixed derivatives and the public conormal matcher rejects a valid strictly positive scaling."}

Head link: 9b1f3fa


🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol
Conversation: local session 01a1ef63-4c51-7270-99c0-68e38d4c36a7 (no session URL)

xtalax and others added 3 commits November 18, 2026 16:13
…ng it in the declared variables; accept weighted sums of normal squares

The box lowering check now rewrites each field call to its declared variables and applies expand_derivatives to that auxiliary residual, for the check only, replacing the syntactic count. match_flux also cancels a scale holding a positively weighted square of every normal component.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…ck, with collision-free placeholders

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…vative chains with a time derivative, and avoid placeholder collisions

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed 33ae99a, faec495 and 6bc8870 in response to the fourth review.

  • [P2] Derivative check in box lowering. The syntactic derivative count is replaced by a principled check: each field call is rewritten to its declared variables and real derivative expansion (product and chain rules) is applied to that auxiliary residual, for the check only, so the lowered output is never expanded. A derivative that is zero (a time-only field, a parameter derivative, a coordinate the field lacks, a mixed chain) no longer counts, and one that survives through a coefficient counts. Both examples from the review are tests: Dy(Differential(k)(w(t, y))) + normal(Γl)[1] * u(t, Γl) ~ 1 is rejected, and Dx(Dy(x * w(t, y))) lowers again. Derivatives of prescribed data are not solution derivatives, and a spatial derivative inside a time derivative is found. Slotting now treats a derivative in a coordinate the field lacks as zero, so normal(Γ)[1] * Dx(w(t)) + u(t, Γ) ~ 0 is rejected there too.
  • [P2] Weighted sums of squares. match_flux and route_natural cancel a scale holding a positively weighted square of every normal component, using the smallest weight as the lower bound: N₁² + 2N₂² returns 3 and (1, 3). N₁² alone in two dimensions, 1 - N₁², 1 + N₁, N₁ and (N₁ + N₂)² still reject.
  • Non-blocking. The docstring now says "provably nonvanishing on the unit sphere" and lists the supported forms for either sign.

Locally: facet_normal 146, classify 204, strongform_boundary 103, strongform_pieces 39, strongform_analyse 147, d_orders 15, mesh_parse_bcs 44, to_box_bcs 1417, strongform_library 7615 (7 broken, 0 fail); the docs build exits 0 on Symbolics 7.49.

Known limits, not changed here: NormalDerivative(Γ)(f) for a field f that lacks some coordinates still slots a gradient for every dimension (existing behaviour of the NormalDerivative slot sum); an opaque coefficient of both x and a field can be mistaken for a solution derivative; and a vanishing-coefficient condition at a degenerate face (x * normal(Γl)[1] * Dx(u) ~ 0 at x = 0) is accepted by lowering, as documented, because the flux check lives in analyse (it errors for unit diffusion).

🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #164

Reviewed head: 6bc8870
Raw SHA-256: 07a7aa9940ec60827d27f50189d46563a71aad2dc2afe63c0b9e2054345df250
Source SHA-256: c9db54a9186249dd2424e96730f71e4a1fad5fdf125efa2dbca25d956520973f
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1efa1-8990-7fe3-9f16-77887bec0b82
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H1)
  • Verdict: CHANGES
  • Reviewed head: 6bc8870

Review report

VERDICT: CHANGES
Round: 5
Head: 6bc8870
Slot: 1
CI: green
Session: 01a1efa1-8990-7fe3-9f16-77887bec0b82
Reviewer: codex-cli 0.169.0; model: gpt-6.2-sol

Risk

high (H1: the documented public conormal matcher rejects a valid boundary condition accepted by the default branch)

Blocking findings

  1. [P2] src/box_lowering.jl:201 — The derivative check still accepts a condition that reduces to essential data. On the left face, with e = u(t, 0.0, y), to_box_bcs accepted n[1]*Dx(Dy(u(t, Γleft))) + u(t, Γleft) ~ -Dy(Dx(e)). It returned -Dx(Dy(e)) + e ~ -Dy(Dx(e)), which reduces to e ~ 0 for a smooth field. Symbolics kept the two mixed-partial trees distinct after expansion. The guard rejected the same input when both sides spelled the derivative Dx(Dy(...)). Normalize the mixed-partial order of expanded field derivatives before assigning placeholders, and test cancellation across the two spellings.
  2. [P2] src/StrongForm/boundary.jl:271 — The weighted-square proof discards the positive lower bound when the sum includes a negative constant. For q = N[1]*G[1] + N[2]*G[2] and B = (N[1]^2 + 2*N[2]^2 - 1//2)*(q - 3), the default branch returned 3 from match_flux(q, B, s) and (1, 3) from route_natural(B, [G], N, s). The reviewed head returned nothing and raised “not a conormal condition,” respectively. The multiplier is exactly 1//2 + N[2]^2 on the unit circle. Include the signed constant in the lower bound and require the resulting bound to be strictly positive. Keep a negative control with the offset -1, which permits a zero.
  • Blocking priorities: P2, P2

Non-blocking findings

  • test/facet_normal.jl:403 — The product-rule regression checks only whether lowering returns a PDESystem. The probe returned Dx(Dy(x*w(t, y))) - u(t, 0.0, y) ~ 1. Assert the lowered residual explicitly so the test also catches a lost derivative or an incorrect normal sign.

What I ran

  • Compared the supplied delta with git diff <previous-head>..HEAD byte for byte. Read the full branch diff and the previous head's findings. Neither root instruction file was present. git diff --check origin/master...HEAD, Runic --check --diff on changed Julia files, and typos --format brief on changed files exited 0. The checkout remained clean.
  • uv run --locked python --version returned Python 3.15.0. uv warned that --locked had no effect outside a project. This Julia checkout has no uv.lock.
  • GROUP=Core julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()' in a scratch snapshot exited 0 with Testing PDEBase tests passed. Julia 1.13.2 resolved Symbolics 7.49.0, SymbolicUtils 4.56.1 and PDESystemLibrary 0.1.11. Affected tests passed in classify.jl (204/204), facet_normal.jl (146/146), strongform_boundary.jl (103/103) and to_box_bcs.jl (1,417/1,417). The runner reported eight broken cases in unchanged files.
  • Ran Julia probes on the reviewed head, the previous head and the default branch with identical resolved dependencies and the supplied layered depot. The previous parameter-chain false acceptance and coordinate-product false rejection now produce the intended outcomes. StrongForm now rejects the normal-bearing condition whose sole derivative acts on a time-only field. Both signs of the unshifted weighted multiplier return flux 3. A lone normal component and the weighted multiplier with a zero still fail to match. The probes reproduced both blocking findings.
  • Ran docs/make.jl in the scratch docs project with source links and deployment disabled. Documenter 1.20.0 completed doctests, cross-reference checks and HTML rendering. The generated API page contains FacetNormal.

What I did not verify

  • Julia LTS, the 32-bit lane, dependency minima, QA or downstream discretizer solves.
  • Remote CI, issue state or documentation publication. The CI header uses supplied metadata.

AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":5,"author_harness":"Claude Code 2.1.325","author_model":"claude-sonnet-5-5","note":"The previous concrete reproductions now behave as intended. Targeted probes still show a mixed-derivative cancellation bypass and a regression in the public conormal matcher."}

Head link: 6bc8870


🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol
Conversation: local session 01a1efa1-8990-7fe3-9f16-77887bec0b82 (no session URL)

xtalax and others added 4 commits November 18, 2026 17:21
…rmal scales with their signed constant

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…ach side's normals before the sides are subtracted

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
… slot_condition

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed 62ff7f7, aa99545, 4470203 and 3431bcb in response to the fifth review.

  • [P2] Mixed partials. The box derivative check keys its placeholders on a canonical derivative chain, so Dx(Dy(f)) and Dy(Dx(f)) are the same derivative (ordered by the system's variables, time first; repeated variables such as Differential(x, 2) are expanded). n[1] * Dx(Dy(u(t, Γleft))) + u(t, Γleft) ~ -Dy(Dx(u(t, 0.0, y))) is rejected as the essential condition it reduces to; the canonical order is used only inside the check, never in the lowered output. Cancellation across the two spellings is tested in both orders.
  • [P2] Signed constant. match_flux now computes a numeric lower bound for a normal-dependent scale including its signed constant, and a scale must be bounded strictly above zero: N₁² + 2N₂² - 1//2 matches as flux 3 (and (1, 3) through route_natural), N₁² + 2N₂² - 1 still rejects, and so do the earlier controls (N₁, N₁² alone, 1 - N₁², 1 + N₁, (N₁ + N₂)²).
  • Non-blocking. The product-rule regression now asserts the lowered residual (Dx(Dy(x * w(t, y))) - u(t, 0.0, y) - 1).
  • Also. NormalDerivative(Γ)(w) is slotted over the field's own coordinates only, and slot_condition checks each side's facet normals before the sides are subtracted, so a misplaced or differentiated normal cannot cancel (a time-derivative cancellation such as Dt(u) + Dx(u) ~ Dt(u) still works, tested).

Locally: facet_normal 154, classify 204, strongform_boundary 103, strongform_pieces 39, strongform_analyse 147, d_orders 15, mesh_parse_bcs 44, to_box_bcs 1417, strongform_library 7615 (7 broken, 0 fail). The branch Codex review approves; its one minor finding (a differentiated normal inside a NormalDerivative that cancels across the sides in slot_condition) is left open.

🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #164

Reviewed head: 3431bcb
Raw SHA-256: 6f392c464b25c146b7d12b913b2ab4a298f079eb3c33b2f87393a5ed5d1777fe
Source SHA-256: 7ebc4ca8d5be23b0e1f7c531641c57315599076e809856d23beded431b67818e
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1eff7-ac22-79a0-9882-ba551dc988ee
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H1)
  • Verdict: CHANGES
  • Reviewed head: 3431bcb

Review report

VERDICT: CHANGES
Round: 6
Head: 3431bcb
Slot: 1
CI: green
Session: 01a1eff7-ac22-79a0-9882-ba551dc988ee
Reviewer: codex-cli 0.169.0; model: gpt-6.2-sol

Risk

high (H1: the documented public conormal matcher rejects valid boundary conditions accepted by the default branch)

Blocking findings

  1. [P2] src/StrongForm/boundary.jl:184 — A facet normal under a NormalDerivative evades the per-side check. On the left box face, let a = NormalDerivative(Γ)(PDEBase.normal(Γ)[1] * u(t, Γ)) and use a + Dx(u(t, Γ)) ~ a. The probe returned G₁ from slot_condition and routed the equation to flux 0 in analyse. The same equation raised “derivative of an expression containing the facet normal” in to_box_bcs. The StrongForm check examines Differential before subtraction but misses NormalDerivative, whose invalid operand then cancels. Apply the check to both operators and add the canceled-operand case alongside the Cartesian regression.
  2. [P2] src/StrongForm/boundary.jl:272 — The weighted-square proof still rejects an equivalent form of the prior strictly positive multiplier. With q = N[1]*G[1] + N[2]*G[2] and B = (3//2 - N[1]^2)*(q - 3), the default branch returned 3 from match_flux(q, B, s) and (1, 3) from route_natural(B, [G], s.N, s). The reviewed head returned nothing and raised “not a conormal condition,” respectively. On the unit circle, 3//2 - N[1]^2 == N[1]^2 + 2*N[2]^2 - 1//2, and the head accepts the latter. Collect signed weights, use zero for missing components, and add the smallest weight to the constant offset. Keep 1 - N[1]^2 as a negative control because it vanishes at N = (1, 0).
  • Blocking priorities: P2, P2

Non-blocking findings

  • src/StrongForm/boundary.jl:167 — The slotting docstring describes a sum over all spatial gradient slots. For w(t, y) on the left face, the probe returned 0 on this head and -G₃ on the previous head. Document that the sum runs over the field's declared spatial coordinates and that derivatives in omitted coordinates are zero.

What I ran

  • Compared the supplied delta byte for byte with git diff 6bc88705f62b87ac5676b023a385fe7d9a782373..HEAD. Read the full diff and the previous head's review. The checkout contained neither root instruction file and was clean after verification. git diff --check origin/master...HEAD, Runic --check --diff on changed Julia files, and typos --format brief on changed files all exited 0.
  • uv run --locked python --version returned Python 3.15.0 and warned that --locked has no effect outside a project. This checkout has no uv.lock.
  • GROUP=Core julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()' in the head snapshot exited 0 with Testing PDEBase tests passed. Julia 1.13.2 resolved Symbolics 7.49.0, SymbolicUtils 4.56.1 and PDESystemLibrary 0.1.11. Affected tests passed in classify.jl (204/204), facet_normal.jl (154/154), strongform_boundary.jl (103/103) and to_box_bcs.jl (1,417/1,417). Eight cases were reported broken in unchanged files.
  • Ran julia --startup-file=no --project="$tree" probe.jl from scratch for the head, previous head and default branch with the same resolved dependencies and the supplied layered depot. All three probe processes exited 0. The cross-head results are reported above. The two prior mixed-partial spellings and two higher-order variants were accepted before and now raise “no derivative of a trace.” An uncanceled mixed derivative and the product-rule example still lower with the expected sign. Both signs of the prior shifted multiplier now return flux 3. Both forms that vanish on the unit circle return nothing. A canceled wrong-piece normal and a canceled Cartesian derivative of a normal are now rejected.

What I did not verify

  • Julia LTS or 32-bit, dependency minima, separate QA or docs builds, and downstream discretizer solves.
  • Remote CI and issue state. The CI header uses the supplied classification.

AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":6,"author_harness":"Claude Code 2.1.325","author_model":"claude-sonnet-5-5","note":"Both exact prior reproductions are fixed and the product-rule assertion is stronger. An equivalent conormal remains rejected and a canceled normal derivative bypasses StrongForm validation."}

Head link: 3431bcb


🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol
Conversation: local session 01a1eff7-ac22-79a0-9882-ba551dc988ee (no session URL)

xtalax and others added 4 commits November 18, 2026 18:53
…uare weights, document the normal-derivative coordinates

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
… reject non-finite constants from a zero normal component

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed 06ff86c, 001bb81, a251d73 and c3f0759 in response to the sixth review.

  • [P2] NormalDerivative operands. The per-side facet-normal check in slot_condition now covers NormalDerivative as well as Differential, so a + Dx(u(t, Γ)) ~ a with a = NormalDerivative(Γ)(normal(Γ)[1] * u(t, Γ)) is rejected ("derivative of an expression containing the facet normal"), as it already was in to_box_bcs. The cancelled-operand case is tested next to the Cartesian regression.
  • [P2] Signed square weights. match_flux bounds a normal-dependent scale below by collecting signed per-component square weights (zero for a missing component) and using the unit-sphere identity Σ Nᵢ² = 1, so 3//2 - N₁² matches as flux 3 through match_flux and route_natural. The bound uses exact arithmetic (an integer wrap-around could otherwise turn a vanishing scale into a positive bound). 1 - N₁², N₁² + 2N₂² - 1, N₁, N₁² alone, (N₁ + N₂)² and 1 + N₁ still reject.
  • Non-blocking. The slotting docstring now says the normal-derivative sum runs over the field's declared spatial coordinates and that a derivative in an omitted coordinate is zero.
  • Also. A scale is accepted when it is provably nonvanishing as a product, quotient or integer power of provably nonvanishing factors, so a condition divided by a strictly positive normal-dependent factor such as (q - 3)/(2 + N₁²) matches as flux 3 while (N₁⁴ - 1)/(N₁² - 1) and a bare N₁ factor are rejected. A condition that divides by a facet-normal component that is zero on the face (-Dx(u(t, Γl)) ~ 1 / normal(Γl)[2] on a left face, which lowered to 1//0) is now an ArgumentError in to_box_bcs, slot_condition and analyse.

Locally: facet_normal 165, classify 204, strongform_boundary 103, strongform_pieces 39, strongform_analyse 147, d_orders 15, mesh_parse_bcs 44, to_box_bcs 1417, strongform_library 7615 (7 broken, 0 fail); the docs build exits 0 on Symbolics 7.49 (checked after the docstring edit).

Known limit: the non-finite check runs before the face endpoint is substituted, so a denominator that vanishes only after both the endpoint and a zero normal component are substituted (1 / (x + normal(Γ)[2]) at x = 0) is not yet caught.

🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #164

Reviewed head: c3f0759
Raw SHA-256: 781bc3e41a047219dc0b2d44cece151ab1c3c493e4deb51610ee65ec25990351
Source SHA-256: 94aa42e28f19c33297d275b40d76be81f00b3ef242bd6bdf401b6dcab3b64340
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1f067-4149-7200-b092-f4c185113dd5
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H1)
  • Verdict: CHANGES
  • Reviewed head: c3f0759

Review report

VERDICT: CHANGES
Round: 7
Head: c3f0759
Slot: 1
CI: green
Session: 01a1f067-4149-7200-b092-f4c185113dd5
Reviewer: codex-cli 0.169.0; model: gpt-6.2-sol

Risk

high (H1: the public conormal matcher and router reject a well-defined boundary condition accepted on the default branch)

Blocking findings

  1. [P2] src/StrongForm/boundary.jl:202, src/box_lowering.jl:246 — The finite check runs before all face values have been substituted. On the left face x = 0, -Dx(u(t, Γ)) ~ 1 / (x + n[2]) has a zero denominator. The probe returned (1//0) - G₁ from slot_condition, prescribed flux 1//0 through analyse, and got a right-hand side of 1 / x on the x = 0 trace from to_box_bcs. The public route_natural also accepted a residual with 1 / N[2] after substituting the numeric normal (-1, 0), returning (1, -1//0). Check for nonfinite values after applying the endpoint and normal substitutions, including in the public router, and add regressions for both paths.
  2. [P2] src/StrongForm/boundary.jl:360 — The denominator guard rejects valid nonlinear boundary data. With q = N[1]*G[1] + N[2]*G[2] and B = q - 1/(1 + N[1]^2 + U[1]^2), the default branch and preceding head returned the prescribed flux 1/(1 + N[1]^2 + U[1]^2). The current matcher returned nothing and the router raised “not a conormal condition.” The denominator is at least 1 for every real state and normal. Extend the bound to recognize squares of real state slots and retain the test that rejects a denominator that can vanish.
  • Blocking priorities: P2, P2

Non-blocking findings

  • src/StrongForm/boundary.jl:345 — The match_flux docstring rules out multipliers beyond the listed positive forms and their negatives. The probe matched (q - 3)/(2 + N[1]^2) to flux 3. Document that a provably nonzero reciprocal can also be cancelled.

What I ran

  • Compared the supplied delta byte for byte with git diff 3431bcbe3cbcd8c3ff30a8c5d3e89801a0710d9f..HEAD. Read the whole PR diff and the preceding head's review. The checkout stayed clean and contained neither root instruction file. git diff --check origin/master...HEAD, Runic --check --diff on changed Julia files, and typos --format brief on changed files all exited 0.
  • uv run --locked python --version returned Python 3.15.0 and warned that --locked has no effect outside a project. The checkout has no uv.lock.
  • GROUP=Core julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()' in a scratch snapshot exited 0 with Testing PDEBase tests passed. Julia 1.13.2 resolved Symbolics 7.49.0, SymbolicUtils 4.56.1 and PDESystemLibrary 0.1.11. The suite passed classify.jl (204), facet_normal.jl (165), strongform_boundary.jl (103) and to_box_bcs.jl (1,417). Eight cases were reported broken in unchanged test files.
  • Ran julia --startup-file=no --project="$tree" probe.jl against scratch snapshots of the current head, preceding head and default branch with the same resolved dependencies. All three exited 0. Both prior blockers reproduced on the preceding head and are fixed here. The canceled NormalDerivative raises the expected error, and both signs of the valid signed-square multiplier route to flux 3. Both signs of the vanishing multiplier and the removable singularity were rejected. Direct division by the zero normal component raises ArgumentError through slotting, analysis and box lowering. The endpoint variant and the positive mixed denominator produced the results above.

What I did not verify

  • Julia LTS, 32-bit, minimum dependency versions, separate QA and docs builds, and downstream solves.
  • Remote CI or issue status. The CI field uses the supplied status.

AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":7,"author_harness":"Claude Code 2.1.325","author_model":"claude-sonnet-5-5","note":"The Core suite passes and both prior blockers are fixed. The face check still permits nonfinite flux after endpoint substitution, and the denominator guard rejects a valid conormal condition."}

Head link: c3f0759


🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol
Conversation: local session 01a1f067-4149-7200-b092-f4c185113dd5 (no session URL)

xtalax and others added 2 commits November 18, 2026 20:57
…d count even powers of state slots as nonnegative

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…tions of the normal

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed 343ec27 and 4ee96eb in response to the seventh review.

  • [P2] Finite check after substitution. A condition holding a facet normal is now checked for non-finite values after the numeric normal and the face endpoint are substituted: on the slot path the residual restricted to the face (as well as the flux B), on the box path the endpoint-substituted residual and each lowered side at the face, and in the public route_natural after the numeric normal is substituted. -Dx(u(t, Γ)) ~ 1 / (x + normal(Γ)[2]) at x = 0 is an ArgumentError in to_box_bcs, an error in slot_condition and analyse, and route_natural rejects 1 / N[2] with the numeric normal (-1, 0); regressions cover all three. A valid 1/x coefficient in a condition without a facet normal is untouched.
  • [P2] Denominator guard. Even powers of state, gradient and coordinate slots are nonnegative in the nonvanishing proof (parameter slots are not), so 1 + N₁² + U₁² is provably at least 1 and q - 1/(1 + N₁² + U₁²) matches through match_flux and route_natural. 1 - N₁² - U₁² and (N₁⁴ - 1)/(N₁² - 1) still reject.
  • Non-blocking. The match_flux docstring now says a provably nonzero reciprocal, or a product or quotient of provably nonzero factors, can be cancelled and that even powers of state slots count as nonnegative.
  • Also. A scale built from a non-algebraic function of the normal, such as exp(log(N₁)), is refused.

Locally: facet_normal 173, classify 204, strongform_boundary 103, strongform_pieces 39, strongform_analyse 147, d_orders 15, mesh_parse_bcs 44, to_box_bcs 1417, strongform_library 7615 (7 broken, 0 fail); the docs build exits 0 on Symbolics 7.49 (checked after the docstring edit).

Known limits, not changed here: simplification that cancels a singular term before the face check, such as x / (x + n[2]) or z - z with z = 1 / (x + n[2])^2, can still hide a division by zero on the face; and exp(log(N₁)) in a gradient coefficient that simplifies to a constant scale is not caught.

🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #164

Reviewed head: 4ee96eb
Raw SHA-256: f1a0211bdf4ab1ced840b9ddfb01e18af657f6b4b81bdd9eb7bb3d48e81a281a
Source SHA-256: 001b67924d4f11122fcff1a91feb9257210139b7e79c5056d634bcf8d8794b69
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1f0a9-2b59-7bb1-902a-23ae5868e0f0
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: high (H1)
  • Verdict: CHANGES
  • Reviewed head: 4ee96eb

Review report

VERDICT: CHANGES
Round: 8
Head: 4ee96eb
Slot: 1
CI: green
Session: 01a1f0a9-2b59-7bb1-902a-23ae5868e0f0
Reviewer: codex-cli 0.169.0; model: gpt-6.2-sol

Risk

high (H1: the documented conormal matcher and router now reject valid scales that the default branch accepted)

Blocking findings

  1. [P2] src/StrongForm/boundary.jl:193 — Subtracting the equation sides before the finite check can erase a pole on the whole face. On the left face x = 0, set p = (1 / (x + n[2]))^2 and use n[1] * Dx(u(t, Γ)) + p ~ p. The probe got -G₁ from slot_condition and a prescribed flux of 0 from analyse. to_box_bcs raised ArgumentError with 1//0 for the same equation. Check both sides with the numeric normal and face coordinate substituted before forming their difference. Extend the test at test/facet_normal.jl:463 to cover a term that cancels during subtraction and exercise analyse as well as box lowering.
  2. [P2] src/StrongForm/boundary.jl:378 — The new guard uses the simplified scale to decide whether to check the original expression's domain. For q = N[1]*G[1] + N[2]*G[2], the matcher returned 3 and the router returned (1, 3) for (1 + exp(log(N[1])) - N[1]) * (q - 3). Substituting the unit normal (-1, 0) in the original scale raised DomainError. Conversely, (1 + abs(N[1])^2) * (q - 3) and exp(log(2 + N[1]^2)) * (q - 3) are defined with positive scales for every unit normal. The default branch and preceding head returned 3 and (1, 3) for both. The current matcher returned nothing and the current router reported “not a conormal condition.” Check domain restrictions on the original coefficients before simplification can erase them, and allow functions whose domains are proven, including abs on real normals and log with a positive argument.
  • Blocking priorities: P2, P2

Non-blocking findings

None.

What I ran

  • Compared delta.diff byte for byte with git diff c3f075966cd94349144f3f8398837394fcf1b000..HEAD. Read the whole PR diff and the preceding head's review. Neither root instruction file was present. git diff --check origin/master...HEAD, julia --startup-file=no --project=@runic -m Runic --check --diff on changed Julia files, and typos --format brief on changed files all exited 0. The checkout stayed clean.
  • uv run --locked python --version returned Python 3.15.0. The checkout has no uv.lock, and uv reported that --locked has no effect outside a project.
  • GROUP=Core JULIA_NUM_THREADS=4 JULIA_NUM_PRECOMPILE_TASKS=4 julia --startup-file=no --project=. -e 'using Pkg; Pkg.test()' in a scratch snapshot exited 0 with Testing PDEBase tests passed. Julia 1.13.2 used Symbolics 7.49.0, SymbolicUtils 4.56.1 and PDESystemLibrary 0.1.11. The affected tests passed classify.jl (204), facet_normal.jl (173), strongform_boundary.jl (103) and to_box_bcs.jl (1,417). Eight cases were reported broken in unchanged test files.
  • Ran julia --startup-file=no --project="$tree" probe.jl and julia --startup-file=no --project="$tree" scales.jl against scratch snapshots of the current head, preceding head and default branch with the same resolved project dependencies. All exited 0. The preceding head returned flux 1//0 through analyse for the one-sided endpoint pole and (1, -1//0) from route_natural for a numeric zero normal component. Both now raise ArgumentError. The mixed denominator 1 + N[1]^2 + U[1]^2, which the preceding head rejected, now routes to its reciprocal. The two-sided pole and the domain checks produced the results above.

What I did not verify

  • Julia LTS, 32-bit, minimum dependency versions, the separate QA group and docs build, or downstream solves.
  • Remote CI and issue status. The CI field uses the supplied status.

AUTHOR_GRADE: {"task":"feature","score":3,"difficulty":4,"rounds":8,"author_harness":"Claude Code 2.1.325","author_model":"claude-sonnet-5-5","note":"The Core suite passes and the earlier one-sided endpoint and mixed denominator probes are fixed. Strong-form analysis still accepts a pole that cancels across both sides, and the new matcher guard rejects valid scales while missing a domain restriction erased by simplification."}

Head link: 4ee96eb


🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol
Conversation: local session 01a1f0a9-2b59-7bb1-902a-23ae5868e0f0 (no session URL)

xtalax and others added 4 commits November 18, 2026 22:12
…ck scale domains on sample normals

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…mal on mesh pieces

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…n the mesh pole check

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
…imension

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed 2cd59e6, 726f887, d04ce97 and 342e1f2 in response to the eighth review.

  • [P2] Poles checked on each written side. Each written side of a facet-normal condition is evaluated as written, with the numeric normal and the face coordinate substituted at once, before any simplification or subtraction (the check does not use substitute, which folds x / (x + n₂) to 1). n[1] * Dx(u(t, Γ)) + p ~ p with p = (1 / (x + n[2]))^2, and n[1] * Dx(u(t, Γ)) ~ x / (x + n[2]), are rejected in to_box_bcs, slot_condition and analyse; a product with a known zero factor counts as zero. On a mesh piece, a written side that divides by a normal expression that is not provably nonzero is rejected, and trace calls count as real values there, so NormalDerivative(Γ)(u(t, Γ)) / (1 + n[1]^2 + u(t, Γ)^2) ~ 0 is accepted while 1 - n[1]^2 - u^2 and n[1] are rejected.
  • [P2] Function-of-normal scales. The blanket refusal is replaced by a domain check on the original, unsimplified coefficients at sample unit normals (the axes and their negatives, the normalised sign vectors, two generic directions); the exact symbolic nonvanishing proof stays the primary check, and the sampling is a documented heuristic. 1 + abs(N₁)² and exp(log(2 + N₁²)) match as flux 3 through match_flux and route_natural; exp(log(N₁)) forms are rejected (they fail at (-1, 0)); the gradient-free data and the returned flux are checked too, so log(1 + N₁) as data is rejected. Sampling runs only for conditions that depend on a normal, and the sign vectors are built only up to six dimensions.

Locally: facet_normal 193, classify 204, strongform_boundary 103, strongform_pieces 39, strongform_analyse 147, d_orders 15, mesh_parse_bcs 44, to_box_bcs 1417, strongform_library 7615 (7 broken, 0 fail).

Known limits, not changed here: the sample-normal check is a heuristic, so data singular only at a normal outside the sample is not caught; on a mesh piece a normal-dependent function that is undefined at some normal but cancels between the two sides (log(1 + n[1]) on both sides) is not yet caught; and the box-face validator walks both branches of an ifelse, so finite piecewise data whose unselected branch divides by zero is rejected.

🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

@xtalax-droid

Copy link
Copy Markdown
Contributor Author

A scope question for the maintainers on this PR. The validation guards in the facet-normal path have been extended over several review rounds, and each round's probes have become more specific inputs. These are the remaining known limits on the current head (each fails with a clear error, or is accepted where a guard cannot see the problem; none changes the result of a condition that does not use normal(Γ)):

  • piecewise data, where the box-face validator walks both branches of an ifelse and so rejects finite data whose unselected branch would divide by zero;
  • coordinate slots in mesh denominators, such as 1 + n[1]^2 + x^2, which the mesh pole check does not yet recognise as at least one;
  • a normal-dependent function that is undefined at some normal but cancels between the two sides of a mesh condition (for example log(1 + n[1]) on both sides);
  • data that is singular only at a unit normal outside the sampled set (the sampled domain check is a documented heuristic);
  • a derivative whose operand coefficient vanishes on the face (Dy(x * u) at x = 0).

Are these specific inputs in scope for merge, or can they be tracked as follow-up issues? If they are in scope, they stay open on this PR.

🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

…roof

The nonvanishing proof relied on the simplifier to turn abs(x)^2 and exp(log(a)) into polynomials, which older SymbolicUtils does not do, so the Downgrade lane rejected (1 + abs(N1)^2) and exp(log(2 + N1^2)) as scales. The bound now handles abs of a real polynomial as nonnegative, exp of a real as positive and exp(log(a)) as a for a positive a.

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Agent-Review: unreviewed
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed 057b7d6, which fixes the Downgrade lane failure on the previous head.

The normal-scale proof relied on the simplifier to turn abs(x)^2 and exp(log(a)) into polynomials, which the older SymbolicUtils used by the Downgrade lane (4.46.4, with Symbolics 7.39.2) does not do, so (1 + abs(N₁)²) and exp(log(2 + N₁²)) were rejected as scales there while the newest versions accepted them. The proof now recognises these forms structurally: abs of a real polynomial is nonnegative, exp of a real is positive, and exp(log(a)) is a for a provably positive a. exp(log(N₁)) is still rejected, by the proof and by the sample-normal domain check. test/facet_normal.jl also tests the proof on those forms directly, so the result no longer depends on what the simplifier does.

The facet-normal test files (facet_normal 198, classify 204, strongform_boundary 103, strongform_pieces 39, strongform_analyse 147, to_box_bcs 1417, mesh_parse_bcs 44) pass both with Symbolics 7.39.2, SymbolicUtils 4.46.4, ModelingToolkit 11.26.7 and ModelingToolkitBase 1.72.0, and with the newest versions (strongform_library 7615, 7 broken, 0 fail).

Known limits, not changed here: exp of a real is given a fixed small positive lower bound, so a scale that subtracts a constant smaller than that margin from an exp can be accepted; and on a mesh piece a normal-dependent function that is undefined at some normal but cancels between the two sides (log(n[1]) on both sides) is not yet caught.

🤖 Posted by an AI agent · harness: Claude Code 2.1.325 · model: claude-sonnet-5-5
Review: unreviewed
Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2

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.

3 participants