Skip to content

Stop documenting NormalDerivative through PDEBase, which Symbolics now owns - #167

Merged
ChrisRackauckas merged 8 commits into
SciML:masterfrom
xtalax-droid:forge/docs-normalderivative
Nov 18, 2026
Merged

ChrisRackauckas merged 8 commits into
SciML:masterfrom
xtalax-droid:forge/docs-normalderivative

Conversation

@xtalax-droid

Copy link
Copy Markdown
Contributor

Problem

The Documentation check fails on current Symbolics (7.49). Symbolics now defines NormalDerivative itself, so PDEBase.NormalDerivative is Symbolics' binding and its docstring lives in the Symbolics module. Documenter only collects docstrings from the modules it is given (here PDEBase), so it reports "no docs found for 'PDEBase.NormalDerivative'" in the @docs block of docs/src/api.md, and every [NormalDerivative](@ref) link stops resolving (8 errors, makedocs stops before rendering).

Change

Remove the PDEBase.NormalDerivative entry from the @docs block in docs/src/api.md, and write the name as a plain code span instead of an @ref link in the docstrings that mention it. Only docs and docstring text change; no code. It works whether PDEBase's fallback or Symbolics supplies the type.

Tests

The docs build passes locally with this change (checked on the equivalent change on another branch; the CI Documentation job on this PR is the real check). Runic is clean. Codex: approve, 0 findings.

Context

The same hunks are on #164 (commit 05caf82). Git merges identical hunks cleanly, so merging either first is expected to be conflict-free.

🤖 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 5, 2026 23:29
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>
…ns it

Symbolics 7.49 defines NormalDerivative, so Documenter (which collects
docstrings only from PDEBase) finds none for PDEBase.NormalDerivative and every
reference to it fails to resolve.

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>
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>
@xtalax-droid

Copy link
Copy Markdown
Contributor Author

Pushed 839e833 and a merge commit of #165, in response to review feedback on this branch.

  • Docs with the fallback. With Symbolics before 7.49, PDEBase defines, exports and documents its own NormalDerivative fallback. Removing it from the API page made checkdocs = :exports fail the docs build with "1 docstring not included in the manual" there. The page now has an @autodocs block filtered to NormalDerivative: it includes the fallback docstring while PDEBase defines it and renders nothing once Symbolics owns the type. The docs build exits 0 with no Documenter errors under both Symbolics 7.39.2 and 7.49.
  • Core failures. The Core jobs on this PR fail only at test/strongform_library.jl:207 and :212 (PDESystemLibrary 0.1.11 has 428 systems, adds trans_sin), which Tolerate PDESystemLibrary corpus growth in strongform and box tests #165 fixes. This branch now includes Tolerate PDESystemLibrary corpus growth in strongform and box tests #165's commit through a merge, so its CI shows the result independent of merge order.

🤖 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 pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Nov 18, 2026
…ranch

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 pushed a commit to xtalax-droid/PDEBase.jl that referenced this pull request Nov 18, 2026
…tor-ops 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>
xtalax and others added 2 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>
@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #167

Reviewed head: 62da88b
Raw SHA-256: b3b49c56d8533a157a099b56cd8b872c093ff313689d936d8319c529ab5d2131
Source SHA-256: b82d6ae905999c629c286ead9df2c670e58b7d272595b2776bd9685cd4e4f1ef
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1eec9-b1c3-7e91-a253-d4d0a644a59d
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: low (L2)
  • Verdict: MERGE
  • Reviewed head: 62da88b

Review report

VERDICT: MERGE
Round: 1
Head: 62da88b
Slot: 1
CI: CI is not green
Session: 01a1eec9-b1c3-7e91-a253-d4d0a644a59d
Reviewer: codex-cli 0.169.0; model: gpt-6.2-sol

Risk

low (L2: the Core suite retains its corpus checks across both PDESystemLibrary releases, with documentation-only changes outside tests)

Blocking findings

  • Blocking priorities: none

Non-blocking findings

  • test/to_box_bcs.jl:410 accepts a second :trans_sin under PDESystemLibrary 0.1.11. Appending that name in a probe left both round-trip guard expressions true. The StrongForm guard rejected the same duplicate through allunique(names). Check the exact number of :trans_sin entries in the round-trip test so it also catches the duplicate when run independently.

What I ran

  • GROUP=Core julia +1.12 --startup-file=no --project=. -e 'using Pkg; Pkg.test()' passed on Julia 1.12.7 with PDESystemLibrary 0.1.11 and Symbolics 7.49.0. StrongForm reported 7,615 passes and seven existing broken expectations, with 421 systems accepted and seven rejected as expected. The box boundary suite passed all 1,416 assertions.
  • julia +1.12 --startup-file=no --check-bounds=yes --project=core-env-base run_affected.jl base ran both affected files on the base with the same resolved dependencies. Both length assertions evaluated to 428 == 427, and the previous @test_broken for :trans_sin reported Unexpected Pass.
  • julia +1.12 --startup-file=no --check-bounds=yes --project=core-env-old run_affected.jl head ran the head against PDESystemLibrary 0.1.10. It found 427 systems and zero :trans_sin entries and reported 9,010 passes and seven existing broken expectations. The probe_guards.jl runs in both test environments rejected an unexpected extra system and a catalog with the wrong presence of :trans_sin.
  • julia +1.12 --startup-file=no --project=. ../../build_docs.jl ran the repository's strict docs build and doctests from scratch copies of docs/, with the deployment call omitted. Documenter 1.20.0 rendered the local NormalDerivative API entry with Symbolics 7.48.0 and omitted it with 7.49.0. The base build with 7.49.0 failed with [:docs_block, :cross_references] for NormalDerivative.
  • git diff --check origin/master...HEAD, Runic --check --diff on changed Julia files, and typos on changed files exited 0. uv run --locked python --version reported Python 3.15.0 and warned that --locked had no effect outside a Python project.

What I did not verify

Hosted CI, docs deployment, QA, downstream jobs, and Julia versions or architectures beyond the local Julia 1.12.7 x86-64 runs.

AUTHOR_GRADE: {"task": "test", "score": 4, "difficulty": 2, "rounds": 1, "author_harness": "Claude Code 2.1.325", "author_model": "claude-sonnet-5-5", "note": "Both dependency compatibility failures reproduced on the base and the changed checks passed on the head. The round-trip guard can independently accept a duplicate trans_sin entry."}

Head link: 62da88b


🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol
Conversation: local session 01a1eec9-b1c3-7e91-a253-d4d0a644a59d (no session URL)

xtalax and others added 2 commits November 18, 2026 13:32
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

Thanks for the review. Pushed 8445723 on #165, now merged into this branch: the box round-trip test also requires allunique(names), so a duplicate :trans_sin (or any repeated name) fails that test when it runs on its own, like the StrongForm one. test/to_box_bcs.jl passes 1417/1417 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

@ChrisRackauckas

Copy link
Copy Markdown
Member

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

PR: #167

Reviewed head: ebe0b24
Raw SHA-256: a094d454c470819072da186861aac5791a54430394a73c9238846f3e593b1ff1
Source SHA-256: 2058af4969d045e0f3e5fbfce10fc3604e39b8db9c01afcb85b630799e304ef4
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1eefc-d132-7833-b5cf-0b3362ebdb5f
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

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

Review report

VERDICT: MERGE
Round: 2
Head: ebe0b24
Slot: 1
CI: green
Session: 01a1eefc-d132-7833-b5cf-0b3362ebdb5f
Reviewer: codex-cli 0.169.0; model: gpt-6.2-sol

Risk

low (L2: the corpus guards retain per-system coverage and add explicit checks for the newly registered fixture)

Blocking findings

  • Blocking priorities: none

Non-blocking findings

None.

What I ran

  • GROUP=Core julia +release --startup-file=no --project=. -e 'using Pkg; Pkg.test()' passed on Julia 1.13.2 with PDESystemLibrary 0.1.11. StrongForm reported 421 accepted systems and seven expected higher-order rejections, with 7,615 assertions passing and seven existing broken markers. Box boundary tests passed 1,417 assertions.
  • With PDESystemLibrary pinned to 0.1.10 in a copy of the resolved test environment, I ran test/strongform_library.jl and test/to_box_bcs.jl via SafeTestsets. They passed 7,597 and 1,414 assertions, respectively, with the same seven StrongForm broken markers.
  • julia +release --startup-file=no --project=<test-env> ../scratch/corpus-probe.jl ran the exact old and new guards against both library versions and passed 12 probe assertions per version. With 0.1.11, both old size assertions failed at 428 systems and the old @test_broken unexpectedly passed. Both new guards passed on 0.1.10 and 0.1.11 and rejected incorrect :trans_sin membership, duplicate names, and extra unrelated entries.
  • julia +release --startup-file=no --project=<test-env> ../scratch/transport-probe.jl passed 9/9 checks on :trans_sin. It checked the residual u_t + 2u_z - sin(z), the two essential faces, and the fixture’s analytic function against the solution obtained by integrating along characteristics.
  • I ran docs/make.jl from docs/ in isolated checkouts with Documenter 1.20.0. With Symbolics 7.49.0, the base exited 1 with no docs found for 'PDEBase.NormalDerivative' and unresolved cross-references. The reviewed build rendered and exited 0. With Symbolics 7.48.0, it also exited 0 and emitted the local PDEBase.NormalDerivative anchor.
  • git diff --check origin/master...HEAD, Runic --check on the changed Julia files, and typos on the changed files all exited 0. uv run --locked python --version printed Python 3.15.0 and warned that --locked has no effect outside a project. The checkout has no uv.lock.

What I did not verify

QA, other Julia versions and platforms, or deployment of the rendered docs. The full Core run used PDESystemLibrary 0.1.11. The 0.1.10 run covered the two changed test files.

AUTHOR_GRADE: {"task":"test","score":5,"difficulty":2,"rounds":2,"author_harness":"Claude Code 2.1.325","author_model":"claude-sonnet-5-5","note":"Both corpus versions and both docstring owners passed. The old corpus assertions and docs failures reproduced on the base."}

Head link: ebe0b24


🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.2-sol
Conversation: local session 01a1eefc-d132-7833-b5cf-0b3362ebdb5f (no session URL)

@ChrisRackauckas
ChrisRackauckas merged commit 4a9a326 into SciML:master Nov 18, 2026
27 checks passed
ChrisRackauckas pushed a commit that referenced this pull request Nov 19, 2026
Tolerate library growth in the PDESystemLibrary corpus pins
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-Review: unreviewed
Expand Symbolics vector operators to Differential form before analysis
Symbolics 7.49 adds lazy Grad, Divergence, Curl and Laplacian terms that d_orders ignored and the StrongForm whitelist rejected. expand_vector_operators rewrites them eagerly into Differential terms, keeping divergence form and handling traces, at the start of both symbolic_discretize paths and parsed_boundary_map.

Agent-Review: unreviewed
Expand vector operators in array-valued equation sides
Scalarized array sides were returned without rewriting their components.

Agent-Review: unreviewed
Stop documenting NormalDerivative through PDEBase, which no longer ow…
…ns it

Symbolics 7.49 defines NormalDerivative, so Documenter (which collects
docstrings only from PDEBase) finds none for PDEBase.NormalDerivative and every
reference to it fails to resolve.

Agent-Review: unreviewed
Merge the corpus-pin fix (#165) into the vector-ops branch
Agent-Review: unreviewed
Merge the NormalDerivative docs fix (#167) into the vector-ops branch
Agent-Review: unreviewed
Merge the corpus-pin fix (#165) into the docs branch
Agent-Review: unreviewed
Expand vector operators inside nested equation groups, array equation…
…s and reject symbolic indices

Nested equation vectors are expanded in place and keep their shape, an array-valued equation becomes one scalar equation per component so StrongForm.analyse accepts it, and indexing an operator result with a symbolic index throws an ArgumentError instead of a raw indexing error.

Agent-Review: unreviewed
Document the NormalDerivative fallback only while PDEBase defines it
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-Review: unreviewed
Reject mismatched array equation sides and keep the system descriptio…
…n when expanding vector operators

Lowering an array-valued equation zipped its sides and dropped surplus components, and rebuilding the PDESystem reset its description.

Agent-Review: unreviewed
Keep complex sides and vectors of unknown length working when expandi…
…ng vector operators

Sides are no longer scalarized or wrapped when they are scalar expressions, which crashed on complex sides and made the equation split into real and imaginary parts early, and an operator applied to a vector of unknown length is wrapped without forcing a scalar type.

Agent-Review: unreviewed
Detect and expand vector operators in complex-valued sides
The detector skipped Complex{Num} sides, so a complex boundary pair bypassed expansion.

Agent-Review: unreviewed
Merge the NormalDerivative fallback docs fix (#167) into the vector-o…
…ps branch

Agent-Review: unreviewed
Evaluate array operations on expanded operator results and expand Div…
…ergence and Curl of vectors of unknown length

Expressions such as dot(g, g), (2g)[1] and sum(g) over a gradient are evaluated per component after the rewrite, so they no longer leave array literals that StrongForm.analyse cannot evaluate. Divergence and Curl of a vector of unknown length take the components their coordinates require.

Agent-Review: unreviewed
Expand operators nested in a vector of unknown length before taking i…
…ts components

The unknown-length fallback indexed the unexpanded argument, leaving lazy operators in the result.

Agent-Review: unreviewed
Take dot from Symbolics instead of importing LinearAlgebra in test/ve…
…ctor_operators.jl

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

Agent-Review: unreviewed
Evaluate broadcast and mixed array operations on operator results and…
… tighten the tensor flux tests

A broadcast term carries its function as a constant argument, which is now unwrapped before calling it, so sum(g .^ 2), sum(g .* g), sum(sin.(g)) and dot(A, g) expand per component. The unknown-shape flux test now checks both components in order, a concrete tensor flux is compared with a reference, and the optimisation driver docstring lists the vector expansion as its first step.

Agent-Review: unreviewed
Leave indexed fluxes of unknown shape unscalarized
Scalarizing a product with an unknown-shape matrix threw a TypeError, so such terms now stay as indexed expressions.

Agent-Review: unreviewed
Pin the PDESystemLibrary corpus per supported release
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-Review: unreviewed
Merge the strict corpus pins (#165) into the vector-ops branch
Agent-Review: unreviewed
Require unique system names in the box round-trip corpus check
Agent-Review: unreviewed
Merge the unique-name corpus check (#165) into the vector-ops branch
Agent-Review: unreviewed
Evaluate matrix products and contractions of operator results per com…
…ponent

Operator results are now Julia arrays of expressions, so g' * A * g and dot(g, A * g) reduce to the scalar residual instead of leaving array expressions that cardinalization and StrongForm.analyse reject. A vector of unknown length contracted with an operator result takes that result's length, and the comment on nested equation groups states that the rewrite preserves nesting while the later complex splitting does not handle it.

Agent-Review: unreviewed
Scalarize known-shape symbolic tensors in contractions with operator …
…results

A parameter matrix such as M[1:2, 1:2] in g' * M * g is expanded into its components, so the contraction reduces to a scalar residual.

Agent-Review: unreviewed
Take the contraction length from the first known-length array argument
dot(Z, g) with an unknown-length Z used Z's length as the range endpoint, which only worked when the known-length operand came first.

Agent-Review: unreviewed
Resolve unknown-length vectors only in contractions and test a varyin…
…g tensor flux

Registered functions and other operations with independent operand lengths keep an unknown-length vector as it is, dot of vectors of different lengths throws an ArgumentError, and the nonsymmetric tensor flux test uses a spatially varying tensor with hand-computed flux and divergence values.

Agent-Review: unreviewed
Detect dot by name so QA's public-access check passes
Symbolics.LinearAlgebra is not public in Symbolics.

Agent-Review: unreviewed
Never resolve vectors of unknown length to an operator result's length
Resolving them changed the value of functions with independent operand lengths and let dot of mismatched vectors evaluate. dot with an unknown-length operand now raises an ArgumentError, dot is recognised by identity so a user's own function of that name is untouched, and every other operation keeps its operands as written.

Agent-Review: unreviewed
Identify LinearAlgebra's dot without non-public Base names and accept…
… a colon slice of an operator result

Base.PkgId and Base.loaded_modules fail the QA public-access check, so the stdlib module is recognised by name and path. sum(g[:]) selects every component and no longer counts as a symbolic index.

Agent-Review: unreviewed
Keep dot with an unknown-length vector symbolic and identify it throu…
…gh the LinearAlgebra dependency

dot of a lowered gradient with a vector of unknown length stays a call, so LinearAlgebra checks the real length once the vector is bound, as on the base revision. dot is matched with op === LinearAlgebra.dot, which adds the LinearAlgebra standard library as a dependency.

Agent-Review: unreviewed
Evaluate the lowered expression in the dot and sum_both tests and use…
… a faithful LinearAlgebra look-alike

The tests now evaluate the lowered residual itself, restore the unknown-length independent-operand case, and use a package named LinearAlgebra under a stdlib path for the same-named dot, so a truncation or a return to the name-and-path check fails them. dot is imported from LinearAlgebra, which PDEBase now depends on.

Agent-Review: unreviewed
Merge branch 'master' into forge/vector-ops

Require a declared length for divergence and curl operands and keep a…
…rithmetic with unknown-length vectors symbolic

Lowering divergence or curl of an unsized vector dropped components beyond the coordinates without the dimension error the operators raise, so such operands now raise an ArgumentError asking for a declared length. Elementwise arithmetic with an unknown-length vector stays a call around the lowered components and is checked by Julia once the vector is bound. The look-alike LinearAlgebra fixture is loaded with an ordinary import, and the duplicated dot-length test is replaced by the declared-length divergence and curl cases.

Agent-Review: unreviewed
Report a missing declared length when a summed vector operand cannot …
…be scalarized

A sum such as g + a with an unsized a has an inferred shape, and scalarizing it threw a TypeError before the declared-length check could run.

Agent-Review: unreviewed
Defer every operation above an unsized vector as a call on the lowere…
…d components

An operand of unknown extent anywhere beneath an expression now keeps all enclosing operations symbolic, so sum(2 * (g + p)), dot(g, g + p) and deeper nestings evaluate or raise DimensionMismatch once the vector is bound instead of being scalarized early. The docstring states the declared-length requirement of Divergence and Curl, and the oversized operator constructions are labelled as constructor controls.

Agent-Review: unreviewed
Expand tuple-valued boundary conditions and derivatives of operator r…
…esults

A tuple of boundary conditions bypassed the operator detector, and Differential applied to a lowered gradient was called on a plain Julia vector. Tuples are now detected, expanded and kept as tuples, and a derivative of an operator result is taken per component.

Agent-Review: unreviewed
Treat a concretely indexed unsized vector as a scalar and check decla…
…red extents early

An unsized array indexed with a concrete index no longer defers the enclosing expression, scalar parameters are wrapped so products with lowered gradients evaluate per component and a derivative of the result is taken per component, a derivative of an array expression that contains an unsized vector is rejected with an ArgumentError, and dot compares declared symbolic extents before anything is scalarized.

Agent-Review: unreviewed
Defer sized operands that cannot be scalarized and distinguish indexe…
…d parameters from indexed composites

A sized operand built from an unsized parameter, such as p[1] * q2, stays in the deferred call when it cannot be scalarized, which restores its evaluation after binding. Only a bare parameter indexed by a literal or an Int symbol counts as a scalar, an index into a composite such as (g + p)[1] is rejected under the derivative rule, and the docstring states that exception.

Agent-Review: unreviewed
Reject any derivative of an unresolved unsized expression and accept …
…integer-typed index expressions

A scalar derivative of an index into a composite, such as Dt((g + p)[1]), is now rejected like the whole-array derivative, because the derivative would act on the unknown elements. A scalar lookup of a bare unsized parameter now accepts any integer-typed index expression such as i + 1, unless the index expression itself contains an unsized array.

Agent-Review: unreviewed
Narrow the derivative rule back to array operands and composite lookups
A derivative of a scalar reduction that contains an unsized vector, such as Dt(dot(g, p)), Dt(sum(g + p)) or Dt(sum(p) * g[1]), is deferred again and evaluates after binding. Only a derivative applied to an array operand that contains an unsized vector, or to an expression containing a lookup into such a composite, is rejected. The p[i + 1] test now binds the lowered expression and the docstring states the narrower rule.

Agent-Review: unreviewed

Agent-Harness: Claude Code 2.1.318
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
Agent-Harness: Claude Code 2.1.325
ChrisRackauckas pushed a commit that referenced this pull request Nov 19, 2026
Bump version to 0.1.42
The additive Grad/Divergence/Curl/Laplacian expansion (#166) and the NormalDerivative docs change (#167) are on master since 0.1.41. This is a one-line change.

Agent-Review: unreviewed

Agent-Harness: Claude Code 2.1.325
Agent-Model: claude-sonnet-5-5
Agent-Session: a20a681b-e8cc-4c82-a40d-a5b8349014e2
Co-authored-by: Claude Code <agent@noreply.juliahub.com>
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