EarthSciIntegrator: decisions and tradeoff analyses
Facts are in survey.md
and the design is in architecture.md
. This file records each decision and the analysis behind it.
Decisions
| # | Date | Decision |
|---|---|---|
| D1 | 2026-10-13 | A written spec plus a conformance suite, with independent native implementations in Julia and Rust. Python comes later as its own native implementation, not PyO3 bindings to Rust. This is the same pattern as EarthSciAST and EarthSciIO. |
| D2 | 2026-10-13 | The schedule lives in a separate run-config document. The schedule is the splitting tree, the per-operator algorithm, tolerances, subcycling and adjoint settings. The .esm solver block gains an external option that points at the run config, so the .esm itself stays integrator-agnostic. This needs an EarthSciAST spec change: today the solver-block RFC is advisory only and excludes algorithm names. |
| D3 | 2026-10-13 | Algebraic constraints get both paths: (a) a nested, quasi-static nonlinear solve inside a step, done PISM-style with the slow state frozen, and (b) monolithic semi-explicit index-1 DAE integration, M = diag(I, 0), with stiffly accurate Rosenbrock or SDIRK. Amended 2026-10-14 (D35): (a) is implemented in v1; (b) is specified in v1 and implemented after M6, unless eqice test F shows the nested path insufficient (survey §2 marks monolithic DAE ○ for eqice). |
| D4 | 2026-10-13 | Adjoints are method-level discrete adjoints in both languages (option A in §1). Every nonlinear and algebraic solve gets its adjoint from the implicit function theorem. Julia additionally offers Enzyme-on-step (option B) for leaves with no hand adjoint, and as the conformance oracle. Continuous adjoints are not supported. |
| D5 | 2026-10-13 | Gradients are taken with respect to scalar parameters, the initial state, gridded fields and forcing time series. Consequences: vjp_p must handle array-valued parameters. Forcing gradients accumulate per provider record, not per integrator epoch (U7 Decision 7; GEOS-FP’s collections are not co-phased): the in-model time blend chains to both records of the bracket, so the gradient has the size of the forcing dataset over the window. EarthSciASTDiff does not yet produce ∂f/∂(forcing) (“forcing-buffer columns” is unchecked in its README). |
| D6 | 2026-10-13 | The integrator owns partitioning by operator locality (§2.2), and MPI is in v1. • pointwise shards (reseact-style sharding, using its executor contract), with per-cell dt on lane pools by default (D17; per-shard dt remains an option) • column sets • stencil tiles with halo exchange • global solves Hierarchy: rank → tile → shard. Executors: threads, processes and MPI ranks. Proposed: horizontal-only decomposition, so columns stay whole and column operators stay local, as in WRF, PISM and GEOS-Chem. |
| D7 | 2026-10-13 | Compiler contract: option 2 plus small asks (§3). The integrator infers structure from the flattened AST. Upstream asks: • solver.external• a public, thread-safe Rust RHS • Float32 integration not refused • per-term provenance carried through flatten • a range-restricted RHS, needed in v1 because of D6/MPI; in Rust this means running the slab tape ( simulate_array/tape) over sub-boxes with halo reads |
| D8 | 2026-10-13 | All code, including the planner (structure inference, splitting, derivative models, strategy choice), is implemented in both Julia and Rust against one shared spec. The planner’s output is a conformance artifact: a resolved run config plus derived documents, gated by goldens as EarthSciASTDiff does. |
| D9 | 2026-10-13 | First end-to-end milestone: reseact. Re-host the prototype and match its forward run and 48 h CONUS 4×5° gradient. (The prototype’s own sharded-vs-unsharded agreement was 1.3e-11; the gate for the new adjoint is D16’s ≤1e-9, since the arithmetic order differs from Enzyme-on-step.) |
| D10 | 2026-10-13 | Results are bitwise identical for a fixed decomposition (ranks, tiles, shards). All reductions use a fixed order. Different decompositions agree to tolerance, because per-shard dt depends on the shard. Narrowed 2026-11-24 (D97): within a rank, only dt_scope: shard results depend on the decomposition; cell and global results are bitwise invariant to shard, tile and thread counts. |
| D11 | 2026-10-13 | v1 runs on native CPU: Julia’s native in-place f! and Rust’s slab tape, with threads and MPI. Reactant/XLA and GPU come later, behind the same kernel interface. |
| D12 | 2026-10-13 | Distributed global solves use Krylov methods we control (GMRES, BiCGStab) with block-Jacobi ILU(0) or ASM preconditioning, in both languages. No PETSc dependency; a PETSc backend may come later. Amended 2026-10-14 (D32): “our own” means “not PETSc”, not “hand-written”. Julia uses Krylov.jl (gmres, fgmres, bicgstab, block_gmres; M=/N= preconditioners with ldiv; any AbstractVector, so GPU and distributed vectors work). Rust reuses faer’s bicgstab with its Precond traits and writes GMRES(m), ILU(0) and ASM, which no maintained crate provides. Cross-language agreement is at tolerance (conformance tier 3), so the two need not be the same code. |
| D13 | 2026-10-13 | Precision is generic over the scalar type T (f32/f64), and can be mixed per leaf. Time, dt, error norms and global reductions are always f64. |
| D14 | 2026-10-13 | EarthSciASTSplitter is folded into the planner. Its additive-term splitting and locality rules become planner passes 1–3: specified, with Julia starting from its 636 lines and Rust implementing to the spec. It is retired once reseact, its only user, moves to the integrator after M3. |
| D15 | 2026-10-13 | Julia has a GPU path in v1, through XLA (amends D11). The integrator’s kernel layer gets an XLA lowering: each leaf step (RHS, stages, linear solves, controller) is one XLA program, traced by Reactant. CPU stays native in both languages. Rust GPU comes after v1 (XlaBuilder). GPU is an optional conformance capability, so Rust declares it unsupported in v1. Analysis in §4. |
| D16 | 2026-10-13 | M4 gate: the new adjoint matches the prototype’s 48 h CONUS gradient to ≤1e-9 relative, plus exact dot-product and replay gates. |
| D17 | 2026-10-13 | Pointwise leaves default to per-cell dt on lane pools; stencil leaves to global dt. shard and global remain options. Suspended at M2 by D94; restored at M3 by D97. |
| D18 | 2026-10-13 | Precision roles per leaf, amending D13 (architecture §8): f16/bf16 for W, LU factors, preconditioners and stored tables, with equilibration and iterative refinement; f32/f64 for the state; f64 for time, norms, reductions and adjoint accumulators. |
| D19 | 2026-10-13 | A domain violation rejects the step by default. clip must be requested explicitly. |
| D20 | 2026-10-13 | Rank and tile decomposition is horizontal only, so columns stay whole. Chemistry shards may still mix levels. |
| D21 | 2026-10-13 | The auto schedule is a Lie sequence in locality order stencil → column → pointwise. The solver.splitting hint upgrades it to Strang. |
| D22 | 2026-10-13 | No continuous root-finding events in v1. |
| D23 | 2026-10-13 | No multi-domain nesting for now. It is not planned, and no design hooks are reserved for it. |
| D24 | 2026-10-13 | The run config is JSON with its own JSON Schema and an esm_integrator version, independent of esm. |
| D25 | 2026-10-13 | Picard is expressed as a frozen-observed Jacobian (freeze: [...] in the run config). |
| D26 | 2026-10-13 | Accumulated diagnostics are integrated states that the planner adds. |
| D27 | 2026-10-13 | Names: EarthSciIntegrator.jl and the earthsci-integrator crates (core, -planner, -solvers, -mpi). |
| D28 | 2026-10-13 | The GPU gate (M5g) runs two configurations: f64 state, and mixed (f32 transport state, 16-bit W, chemistry on CPU). Either kind of GPU then works when hardware is chosen. |
| — | 2026-10-13 | RFCs are drafted for all upstream asks U1–U15 in rfcs/
, for review before anything is filed upstream. (U14 and U15 were added on 2026-10-13/14 after the first thirteen.) |
| D29 | 2026-10-13 | Numerical precision is separate from semantic precision. A declared element_type (document or variable) stays semantic and binding (esm-spec §11.3.1). An omitted one means “unspecified”: f64 by default, but the run config’s precision roles may choose f32 state or RHS per leaf, with the error judged against tolerances, and the integrator reports what it chose. Mixed precision across leaves is legal because conversions happen at leaf boundaries. Spec change: U14. |
| D30 | 2026-10-14 | EqWeFiC’s WRF meteorology leaves element_type unspecified (D29), so WRF-Chem’s double-precision chemistry can read it without a widening operator. Bit-faithful real*4 rounding is given up; tests already compare f64 runs against real32 WRF at rel 1e-5, and 3-D agreement is statistical. |
| — | 2026-10-13 | GPU hardware target: unknown. Design for both FP64-strong (A100/H100) and FP64-weak GPUs. Precision roles (architecture §8) make that a run-config choice. |
| D31 | 2026-10-14 | The method families are written from scratch in both languages, and this is why. Not because nothing exists: OrdinaryDiffEq.jl has every family, reseact’s native reference already runs SSPRK43 + Rosenbrock23(linsolve=LU) on an EarthSciMLBase BlockDiagonal through OrdinaryDiffEqOperatorSplitting, and diffsol 0.11 (the in-crate Rust solver) has tableau-generic SDIRK/ESDIRK, NDF-BDF and ERK. The reasons are: (i) D4’s method-level discrete adjoint needs the forward step’s stage internals in the same code as its transpose, which neither library exposes as API; (ii) D17’s lane pools need one vectorized step with per-lane controllers, which no library does (EarthSciMLBase’s per-cell reinit! is the slow form of it); (iii) D8’s spec parity needs step semantics the spec owns. diffsol in particular is ruled out by facts, not taste: its adjoint is continuous (uniform checkpoints plus Hermite interpolation), it has no Rosenbrock, IMEX or PI controller, its ERK tableau check is FSAL-only (SSPRK tableaus are rejected), and its solver objects hold Rc/RefCell. What is reused: tableau coefficients and controller constants are taken verbatim, with citation, from OrdinaryDiffEqRosenbrockTableaus, OrdinaryDiffEqSSPRK, OrdinaryDiffEqSDIRK and OrdinaryDiffEqCore (reseact’s traced steps were already copies of OrdinaryDiffEq’s perform_step!); OrdinaryDiffEq and diffsol are the conformance tier-2 oracles for order and trajectory; and SciMLSensitivity.ReverseDiffAdjoint through OrdinaryDiffEq’s own methods is the oracle for each hand-written family adjoint on toy problems (§1.5). |
| D32 | 2026-10-14 | Julia’s linear and nonlinear solvers are library code where the structure allows it. Krylov: Krylov.jl (amends D12). Nonlinear solve nodes: NonlinearSolve.jl (NewtonRaphson, PseudoTransient, TrustRegion, Broyden/Klement; LineSearch.jl backtracking and strong-Wolfe; Anderson through the FixedPointAcceleration extension), driven through a LinearSolveFunction that wraps the structured W and Krylov.jl. The implicit-function-theorem adjoint (one transposed solve), the recover ladder, the Picard-as-frozen-observed Jacobian (D25) and the convergence-on-a-named-observed criterion stay integrator code; SciMLSensitivity.SteadyStateAdjoint is an optional implementation of the first. The batched per-cell solvers (block_lu, sparse_block_lu, banded) stay in-house in both languages: block_lu starts from reseact’s SoA blocksolve algorithm typed over the U10 LaneBlocks layout, with EarthSciMLBase’s BlockDiagonal LU (AoS, generic T, GPU-tested) as its oracle; sparse_block_lu is new everywhere (EarthSciASTDiff emits the Markowitz plan and fill pattern but never executes it). Rust writes all of these; argmin and diffsol’s Newton are tied to dense or Matrix-trait storage. |
| D33 | 2026-10-14 | The Julia implementation speaks SciMLBase. It implements SciMLBase.AbstractODEAlgorithm and the DEIntegrator interface (CommonSolve init/step!/solve!), so solve(esm_problem(...), Schedule(run_config)) works through EarthSciAST’s existing problem surface, and EarthSciAST’s composed data-refresh PresetTimeCallback, output sinks, checkpoint callback, remake, ensembles and name indexing keep working. Architecture §9’s discrete events are DiffEqCallbacks’ PresetTimeCallback, PeriodicCallback and DiscreteCallback, propagated into every leaf and substep. The OrdinaryDiffEqOperatorSplitting failure was dropping callbacks; the remedy is propagation, not a parallel callback vocabulary. Rust has no equivalent surface and defines its own. |
| D34 | 2026-10-14 | Checkpoint schedules are a plan artifact. Because the macro-step count is known in advance (fixed macro dt, tstops from the plan), the planner computes the revolve or multi-level schedule once, with Checkpointing.jl’s algorithms, and writes it into plan.json. Both runtimes execute the schedule; neither implements revolve. No Rust revolve crate exists. |
| D35 | 2026-10-14 | v1 scope cuts. BDF is out of v1 (no gate needs it; stiffly accurate Rodas and SDIRK cover the index-1 DAE path; the variable-order BDF adjoint was the subtlest item in risk 2). The ARK family ships only IMEXEuler in v1 (ARS222, KenCarp3/4 later; reseact measured KenCarp47 at 1.7× the split’s cost). D3b, monolithic DAE integration, is specified in v1 and implemented after M6 unless eqice test F requires it. Amended 2026-11-26 (D122): D3b, index-1 DAE integration with stiffly accurate Rosenbrock and ESDIRK methods and consistent initialization, is implemented now with solve nodes; BDF stays out of v1. |
| D36 | 2026-10-14 | Forward sensitivities, including dt tangents, are in v1 for Julia. The integrator is generic over the scalar type (D13), and EarthSciAST’s f! is ForwardDiff-transparent, so Dual numbers flow through the state, stages, error norm and controller, which gives the controller (dt) tangents reseact’s prototype carried. This is SciMLSensitivity.ForwardDiffSensitivity with convert_tspan=true, applied to our integrator. Survey §2 marks this ● for reseact; the architecture had omitted it. Rust forward sensitivities are post-v1. |
| D37 | 2026-10-14 | The first non-reseact model comes before MPI and GPU. A new milestone M4b runs eqice test F (31×31×61) on shared memory: solve nodes, maps, limits, IMEX columns. It needs no MPI, it is the first science capability that does not exist today, and it is the first test of the planner on a model it was not designed around. M5 (MPI), M5g (GPU) and M5b follow. M6 becomes eqice at ice-sheet scale under MPI, plus D3b if needed. |
| D38 | 2026-10-14 | Julia’s AD fallbacks go through DifferentiationInterface.jl, which is already in the depot: prepare_pullback/pullback! with AutoEnzyme(mode=Reverse) for vjp_u/vjp_p where a band model is unavailable, and AutoForwardDiff pushforwards for jvp. This replaces a dependency on SciMLSensitivity’s EnzymeVJP/ReverseDiffVJP wrappers, which pull in Zygote, ReverseDiff and Tracker. |
| D39 | 2026-10-23 | The adjoint functional’s time-integral term is integrated by the last leaf of the macro-step schedule, so ψ sees the state after every process. adjoint.functional.integrate_in names a different leaf (spec/adjoint.md §2.1). |
| D40 | 2026-10-23 | Forward sensitivities have two modes, amending D36. dt_tangents = false holds the step sequence fixed and is the exact linearization of the adjoint’s frozen-tape map; the M4 dot-product gate uses it. dt_tangents = true carries step-size tangents (reseact’s lane) and is checked only against finite differences of the adaptive map (spec/adjoint.md §2.3). |
| D41 | 2026-10-23 | A Dual number with f64 value type satisfies D13’s “error norms are always f64”. Its partials flow through the error norm into the controller when step-size tangents are on. |
| D42 | 2026-10-23 | SDIRK adjoints solve the exact transposed system at each converged stage. Per-cell and per-column solvers (block_lu, sparse_block_lu, banded) refactor W there; Krylov leaves iterate on the exact system with the forward factorization as a preconditioner. Reusing the forward factorization outright is exact only for Rosenbrock (spec/adjoint.md §4.3, architecture §6.1). |
| D43 | 2026-10-23 | IMEXEuler solves its implicit part to convergence by default. The leaf option implicit_solve: "linearized" takes one linearized step instead, whose adjoint is a one-stage Rosenbrock adjoint (spec/adjoint.md §4.4). |
| D44 | 2026-10-23 | Rust adjoints are gated by finite differences on the frozen tape plus agreement with Julia’s gradient, not by an exact dot-product identity. Rust has no forward sensitivities in v1 (D36) and writes no tangent-linear step per family; the exact dot-product part of the M4 gate is Julia’s (spec/adjoint.md §7.1). |
| D45 | 2026-10-23 | Years and months are not duration units in the run config, because they are not constant durations. Year-scale settings are written in days; calendar-aware periods, if needed, would be a separate construct. |
| D46 | 2026-10-23 | forcing_refresh is the only forcing hit source: the times any provider’s two-record bracket changes. forcing_records is dropped. |
| D47 | 2026-10-23 | frozen is an option of the leaf, coupled or split_explicit node whose stages it feeds, not a standalone schedule node. |
| D48 | 2026-10-23 | When every fires, its child advances by the time since its previous firing, ending at the end of the current step (WRF-Chem chemdt, PISM’s accumulated bed-deformation step). |
| D49 | 2026-10-23 | The macro step has no error control of its own. Leaves adapt inside it; a schedule whose root is a single adaptive leaf takes that leaf’s accepted steps as macro steps. |
| D50 | 2026-10-23 | Under a fixed macro step, every firing times are not tstops. The node fires on the macro step that contains the firing time, as WRF does for radt and chemdt, so periods need not be multiples of step.dt. Under adaptive macro steps, firing times stay tstops. |
| D51 | 2026-10-23 | Picard freezing is written only as method.picard.freeze on a solve node. The operator-level freeze is dropped, so the planner’s frozen_jacobian output has a single trigger. |
| D52 | 2026-10-23 | A leaf whose method has no embedded error estimate must give dt. Omitted dt always means adaptive, and the planner refuses it for ForwardEuler, SSPRK33, SSPRK104, WRF_RK3, IMEXEuler and Theta, rather than defaulting by method. |
| D53 | 2026-10-23 | M1’s toy problems are written by hand in both languages, behind the operator interface (spec/operator-interface.md), with hand-derived derivatives. .esm versions join the conformance suite once U4 gives Rust a public, reentrant right-hand side, and must give the same results. Amended 2026-10-26: U4 shipped in EarthSciAST 0.5.0 (rhs_program in Julia and Rust), so both Julia and Rust run the .esm versions from M2 (spec/toy-problems.md §4). |
| D54 | 2026-10-23 | Method coefficients and controller constants are shared data, spec/tableaus/*.json, generated once from the installed OrdinaryDiffEq packages by tools/tableaus/extract.jl with source citations. Both implementations read the same numbers, which implements D31’s “taken verbatim” and keeps Julia and Rust from drifting. |
| D55 | 2026-10-23 | Kvaerno3/4 use the correct stage-2 time (the row sum $2\gamma$), not OrdinaryDiffEqSDIRK’s $\gamma$, which makes them first order on time-dependent problems. Comparisons against OrdinaryDiffEq’s Kvaerno methods use autonomous problems only. Not reported upstream. |
| D56 | 2026-10-23 | The rule for differences from OrdinaryDiffEq: follow it unless that gives wrong or low-accuracy results. Applied to the smoothed SDIRK error estimate: OrdinaryDiffEq’s is scaled by $h\gamma$, which measured 13–6000 times the tolerance in end-of-run error, so the spec uses Hosea and Shampine’s formula (spec/methods.md §5.5). That fixes the non-stiff case and TRBDF2 on a stiff problem; for SDIRK2 and Kvaerno3/4 on stiff problems it does not, settled for v1 by D59. Not reported upstream. |
| D57 | 2026-10-23 | SDIRK forms its Jacobian on every step attempt in v1. OrdinaryDiffEq-style reuse across steps is revisited at M4b with eqice’s column-solve costs. |
| D58 | 2026-10-23 | KPP’s own step-size rule becomes a controller option at M7 (controller: "KPP"), for WRF-Chem parity. M1 runs KPP coefficients under the PI controller. |
| D59 | 2026-10-23 | v1 keeps Hosea and Shampine’s SDIRK error estimate for all SDIRK methods, and recommends TRBDF2 for stiff adaptive leaves. On a stiff test problem the estimate leaves SDIRK2 and Kvaerno3/4 far above the tolerance at tight tolerances, and no alternative measured so far is both accurate and efficient. They stay available, documented as unreliable there; the estimate is revisited at M4b with eqice’s column solves (spec/methods.md §5.5, §13 item 5). |
| D60 | 2026-10-23 | The run interval comes from the caller, the run config or the model, in that order of preference. The caller is an API argument or a command-line option; the run config’s key is time (start with end or duration, as seconds or RFC 3339 UTC timestamps); the model’s is the .esm solver.time_span, which needs an upstream addition (U16, EarthSciAST#550). The most preferred source that gives an interval gives all of it. The planner resolves it for every run and records it in seconds, but not its source, so the same interval gives the same plan; a timestamp makes model time POSIX time, and start and end are both seconds or both timestamps (spec/run-config.md §1.1). |
| D61 | 2026-10-23 | After an accepted step shortened to land on a stop, the next proposal comes from the shortened size if the leaf’s previous attempt was accepted, and from the unshortened size on the first attempt of the run or after a rejection, as OrdinaryDiffEq does (its loopheader! overwrites the saved unshortened size only after an accepted step). Under D56 the spec follows OrdinaryDiffEq, so adaptive runs match its step counts; the cost is that under splitting each invocation starts from its short landing step. One exception: a stop step shorter than machine epsilon leaves the proposal and controller unchanged, where OrdinaryDiffEq’s would shrink the next step to that size (spec/methods.md §8.6, §10). Found by the Rust M1 implementation. |
| D62 | 2026-10-24 | Rosenbrock23’s error estimate adds $h d f_t$ in its third stage, not OrdinaryDiffEq’s $h f_t$. OrdinaryDiffEq’s term makes the estimate second order on problems that depend on time explicitly, so it overstates the error and takes smaller steps than the tolerance needs: the common case in atmospheric chemistry, where photolysis varies through the day. The solution is unchanged, and fixed-step runs and the oracle still match OrdinaryDiffEq; adaptive step sequences on such problems do not. D56 applied to a low-order estimate, like D55 (spec/methods.md §4.3). Found by the Rust M1 implementation. |
| D63 | 2026-10-24 | The Newton rate $\theta_{\text{prev}}$ of an implicit leaf is 1 at the start of every step attempt and carries across that attempt’s stages only. OrdinaryDiffEq carries it across steps and resets it only in the attempts that follow a rejection, but the tape does not record where rejections fell, so replay could not reproduce such a step bitwise (D10); with the reset the step is a function of $(u_n, h)$ alone, as the Jacobian rule already makes it (D57). The cost is up to one more Newton iteration on the first implicit stage of a step, since with $\theta_1 = 1$ the first iteration converges only when its increment is below $10^{-5}$. $\theta_{\text{prev}}$ and $\eta_{\text{old}}$ (which OrdinaryDiffEq overwrites before use, so it has no effect) leave the controller state and checkpoints (spec/methods.md §5.2, §8.6; spec/tape.md §4). Found by the Julia and Rust M1 implementations. |
| D64 | 2026-10-25 | A term is one additive summand of one U2 contribution. The planner takes each state equation’s equation_contributions (EarthSciAST 0.4) and splits every contribution’s expression with EarthSciASTSplitter’s decomposition (n-ary +, binary and unary -, nothing else); each summand inherits its contribution’s origins. Splitting below the contribution is what lets one component’s mixed pointwise and stencil terms reach different default operators (architecture §3.2 pass 1); splitting no further than + and - keeps the decomposition a few lines that two languages cannot disagree on. A term is named in the plan by (variable, contribution, summand) and carries a provenance label: the component path, coupling:<k>, or several joined by + for a collapsed contribution. The run config’s terms selector matches these labels (spec/plan.md §5.1). |
| D65 | 2026-10-25 | The components selector attributes a term by provenance first, then by what it reads. A term whose contribution has one component origin belongs to that component. Any other term (a couple term, or a collapsed contribution) belongs to the one component, other than its dependent variable’s own, whose variables it reads; if it reads none it belongs to its dependent variable’s component. A term that reads variables of two or more other components belongs to none: a components selector never matches it, and if no other selector takes it while any operator selects by component, the planner refuses with ambiguous_term_owner, asking for a terms or variables selector. The alternative, choosing one owner by a rule, is a silent decision about physics (is a deposition sink scaled by a met field “deposition” or “meteorology”?), which is the kind provenance exists to avoid. Architecture §3.2’s observed inlining for EqWeFiC-style assembly components is deferred to M7 (spec/plan.md §5.1.3). |
| D66 | 2026-10-25 | Locality is read from each term’s own state-Jacobian bands, not from the AST. The planner differentiates a one-term derived document with EarthSciASTDiff and classifies the band entries’ column indices against their row indices per axis (spec/plan.md §5.2). EarthSciASTDiff already lowers index(makearray…), inlines observeds and clips regions, so the radius per direction is the maximum over makearray regions with no second offset analyser to keep in step across two languages. Horizontal offsets are reduced modulo the axis size into $[-\lfloor N/2\rfloor, \lceil N/2\rceil - 1]$, so a periodic seam (cell 1 reads cell N) is a reach of 1, not a global read; a gathered column (contracted band dimensions) or a non-affine column index is global on a horizontal axis and column on the vertical one. |
| D67 | 2026-10-25 | The run config names the grid’s axes: axes: {"horizontal": [...], "vertical": ...}. Locality (column versus stencil), the halo, and the meaning of partition.ranks/tiles all need to know which index sets are horizontal and which one is vertical, and an .esm document does not say (coordinates carries an axis only for source coordinates, and reseact has no coordinates block). Defaults: no vertical axis, and every index set that shapes a state variable horizontal, in index_sets order; more than two horizontal axes then is a refusal (axes_unresolved). |
| D68 | 2026-10-25 | Derived documents are esm 1.3.0 documents in the flattened model’s own component tree, with every name written fully scoped. A single model holding dotted names such as Chem.O3 does not load (both bindings read the dot as a reference to a system Chem, which they then cannot find; checked with EarthSciAST 0.4.0 in Python and Julia), so a derived document declares one model per top-level component, nested subsystems for deeper paths, and writes every reference, left-hand sides included, as its flattened dotted name, which both bindings resolve from anywhere. Flattening a derived document therefore gives back the original flattened names. Every document carries every state (D(x) = 0 where the operator does not write x), every parameter, the ic equations, and the observeds its terms read, so all of a plan’s documents share one state and parameter layout. Pointwise-lifted equations are rewritten as explicitly shaped arrays, D(x) = faq{…}; a lifted state’s index sets are those of the first declared shape with the lift’s extents (states, then parameters, then observeds, each in document order), since EarthSciAST’s lifted_shapes records extents but not index-set names. The bytes are EarthSciASTDiff’s stable_json over that tree (spec/plan.md §6). Amended 2026-11-02: a lifted state’s index sets are the shape EarthSciAST 0.8.0’s flatten records on it (EarthSciAST#623), no longer a search of the declared shapes, so the refusal lift_shape_unresolved is gone (spec/plan.md §6.1.3). The Jacobian document (D69) carries no ic equations, and is not an esm 1.3.0 document: its esm version is the one EarthSciASTDiff writes (1.1.0, or 1.2.0 when an expression carries units). Only the right-hand-side document is esm 1.3.0. Both documents carry the same domain, reduced as EarthSciASTDiff reduces it: temporal’s start, end and reference_time, element_type and array_type (spec/plan.md §6.1). |
| D69 | 2026-10-25 | The Jacobian document is the operator’s right-hand-side document with its state derivatives zeroed, plus a model _jacobian holding one band field J_k per band, built as EarthSciASTDiff’s evaluation document builds its band fields but in D68’s component tree and without coefficient hoisting (eval_cse = false). Evaluating its right-hand side gives every band’s coefficients at once with the stock EarthSciAST compiler. The band positions a runtime needs to scatter those fields (row, col, rows, row_idx, col_idx, contracted) go into plan.json as operators.*.structure.bands, in field order, because the esm schema has no slot for EarthSciASTDiff’s draft "jacobians" block and a derived document must stay a valid .esm. Amended 2026-11-02: the Jacobian document is EarthSciASTDiff 0.3.0’s own evaluation document of the flattened right-hand-side document (evaluation_document, cse = false; EarthSciASTDiff#49 lays it out in D68’s component tree), with its ic equations dropped, its esm version and its model name JacobianEval as EarthSciASTDiff writes them; the band fields are JacobianEval.J_k and the reserved top-level component name is JacobianEval (spec/plan.md §6.2). Amended 2026-11-08 (D90): subtree sharing is on (cse = true, cse_min_nodes = 12), and the planner passes pass 4’s bands to evaluation_document instead of letting it compute them again. |
| D70 | 2026-10-25 | Stiffness, where a leaf’s method is not given, is classified in this order: any term authored by a reaction system; for pointwise operators, the model’s solver.stiffness: "high"; then the Gershgorin bound. The bound is $\rho = \max_r \sum_c |
| D71 | 2026-10-25 | "auto" methods resolve by a fixed table (spec/plan.md §5.5.3): pointwise stiff → Rosenbrock23 at reltol ≥ 1e-3, else Rodas4 (TRBDF2 when an operator of the leaf depends on $t$, until U17, D94), with block_lu for blocks of at most 16 and sparse_block_lu above; pointwise non-stiff → Tsit5; column stiff → TRBDF2 with banded (D59); column non-stiff → Tsit5; stencil and global → SSPRK43, whatever the stiffness, since adaptive error control bounds their step; a stiff global operator, a stiff pointwise leaf whose Jacobian is not block_diagonal (mixed shapes, or an operator without structure.block), or a stencil leaf with a stiff column operator and no dt, is refused (auto_strategy_unavailable). dt_scope resolves to cell for pointwise leaves (D17) and global otherwise (at M2 global for every leaf, D94). Architecture §3.5’s Gershgorin step limit for stencil leaves is not emitted at M2: a step limit is a limit operator, which needs U6 (M4b). |
| D72 | 2026-10-25 | "schedule": "auto" puts one leaf per locality class in the order global → stencil → column → pointwise, each holding every operator of that class sorted by name; a single leaf is the root itself, not a one-child sequence. D21 named stencil → column → pointwise; global, which D21 did not place, goes first because a global operator (a whole-domain solve or reduction) produces what the local ones consume. Without the unwrapping, a model with one locality could not be planned with an adaptive root and no step (D49). solver.splitting: "strang" turns a sequence of two or more leaves into strang. |
| D73 | 2026-10-25 | The resolved schedule is canonical: planner-assigned node ids are dotted paths (root, root.0, root.1.every), the form spec/tape.md already records, and a run config may write a path-form id only on the node whose path it is, so given and assigned ids never collide; a leaf’s operators are always a list; durations are seconds; options with a spec default are written, options that do not apply to the leaf’s method (jacobian and linsolve on an explicit method) are absent rather than defaulted, and options whose default is computed at run time or means “none” (dt0, dtmax, dtmin) appear only when given (spec/plan.md §7.1). |
| D74 | 2026-10-25 | Timestamps from the caller and the run config count from the model’s time origin, exactly as EarthSciAST 0.4’s resolve_time_span converts a solver.time_span timestamp (esm-spec §2.2.7: domain.temporal.reference_time, else domain.temporal.start, else the POSIX epoch, by exact integer arithmetic). Amends spec/run-config.md §1.1, which fixed run-config timestamps at the POSIX epoch: with a model that declares reference_time, the two sources would otherwise put the same written instant at different model times. |
| D75 | 2026-10-25 | M2 plans right-hand-side operators only. Algebraic equations, events, parameter update rules of every kind (schedule and data included), map operators, observed step limits, solve nodes and the constructs of spec/run-config.md §8 rule 16 are refused with a code that names the construct (spec/planner-errors.json). schedule and data updates are out because they need forcing epochs and tstops from providers, which the runtimes gain at M3; the rest need U6 (M4b). Amended 2026-11-02 (D87): data rules are planned and run at M2, both halves: the planner needs no epochs to plan them, and the runtimes build forcing epochs and forcing_refresh tstops from EarthSciIO providers at M2 instead of M3. |
| D76 | 2026-10-25 | Pass 8’s checks and tolerances. rhs_sum: at the three sampled states, the operators’ right-hand sides sum to the flattened model’s within $10^{-12}$ of $\max( |
| D77 | 2026-10-25 | Partition defaults at M2: ranks and tiles [1, 1]; one shard per pointwise or column leaf, and "auto" shards resolve to 1 until M3’s cost model; halo per horizontal axis is the largest radius in either direction over all stencil operators (every rank runs every operator in v1); output_shard is absent until output sinks are planned (U12). |
| D78 | 2026-10-25 | Until M4, checkpoint_schedule is the fixed placeholder {"kind": "all", "macro_steps": 0}, present exactly when the run config has an adjoint key, so plans that will carry a schedule already have the key and none carries a number M2 cannot compute consistently (D34). |
| D79 | 2026-10-25 | Planner refusals carry stable snake_case codes listed in spec/planner-errors.json
, EarthSciAST’s style (solver_time_span_invalid), one per rule of spec/run-config.md §8 and per new M2 refusal. Conformance refusal fixtures assert the code and the run-config pointer, never the message text. Amended 2026-10-26 (M2 stage 1): a refusal whose cause has no run-config key of its own, or whose key is not obvious, gets a fixed pointer, given in its code’s description in spec/planner-errors.json, the one list of them (spec/run-config.md §8 points there and names only examples): "" for a schema failure and for refusals about the caller’s interval, /model for refusals about the model alone, /schedule for a default operator no node advances, the precision entry that set the role for precision refusals, and so on. |
| D80 | 2026-10-25 | M2’s end-to-end runtime gate replays the M1 cases on .esm versions of the toy problems and compares each language’s planned run with its own hand-written M1 run by the cross_language rule of spec/toy-problems.md §2.1. Only cases whose leaves need nothing beyond rhs, jac, jvp_u and vjp_u take part: M2 derives no time-derivative document (EarthSciASTDiff computes wrt = :time bands but neither specifies nor golden-gates them; U17, needed by M3), no parameter Jacobian (U7) and no second-order bands (U8), so Rosenbrock leaves on time-dependent problems, adjoint checks and the map problem wait for M4/M4b (spec/toy-problems.md §4). |
| D81 | 2026-10-26 | Passes 1 and 2 are interleaved, and the model-only refusals come at load. The planner builds the terms and their owners (spec/plan.md §5.1.1–§5.1.2), computes every term’s locality (§5.2), selects operators (§5.1.3), then computes the operators’ classes and radii (§5.2.4). Selection reads a term’s locality (a locality selector, the default operators), so it cannot run before it; as a result band_model_failed precedes every selection refusal. Selection’s own refusals come in a fixed order (map operators, then variables entries, then per term, then selector_matches_nothing). reserved_component_name is checked at load, right after the M2 scope (§4 step 7), and lifted-state shapes are resolved with the axes (§4 step 8, lift_shape_unresolved), even when axes is given, because the default axes need them; neither waits for bands. Amended 2026-11-02 (D68): lifted-state shapes are read from flatten, so lift_shape_unresolved no longer exists. The classical-Rosenbrock precision check of a leaf whose alg is "auto" runs once §5.5.3 has resolved its method. Found by both stage-1 planners (Julia PR #21, Rust PR #20). |
| D82 | 2026-10-26 | Offsets on an other axis do not affect a term’s class; a reach that covers an other axis still makes it global. An other axis is an index set a state uses that the run config’s axes names neither horizontal nor vertical. It is never divided among shards, tiles or ranks, so a fixed offset along it couples entries inside one cell’s block, which every locality class already holds; a reach over the whole of it is a dependence on every entry, which spec/plan.md §5.2.4 has always called global. The rule “lower + upper + 1 exceeds the axis size” is deleted from §5.2.4: reduction keeps every offset in $[-\lfloor N/2 \rfloor, \lceil N/2 \rceil - 1]$, so it could never fire. Amended 2026-11-27 (D123): a reach that covers an other axis keeps the class too. |
| D83 | 2026-10-26 | output.saveat is a duration $d$; the output times are its multiples $k,d$ counted from model time zero (the time origin of D74) that lie in $(t_0, t_f]$, and $t_f$ is not added. Amends spec/run-config.md §7.3, which spoke of “listed” output times although the schema has always made saveat a single duration. Counting from time zero, as hit_multiples does, puts hourly output on the hour with timestamps. Without saveat the output time is $t_f$ alone. The adjoint’s over: "saveat" observation times, and rule 9’s check of them under a fixed step.dt, use these times. Both ends use the landing tolerance of spec/run-config.md §5 (“Fixed boundaries”, $ |
| D84 | 2026-10-26 | Rule 5’s “advanced twice” means named by two leaf or coupled nodes of the tree; a frozen entry counts as advancing for “never advanced” but not for “twice”. A strang that runs a child twice runs it at one place in the tree, which is what the rule’s “outside strang” exempts. A frozen entry makes the operator’s tendency enter a node’s stages, so an operator that appears only there is advanced; it does not count toward “twice”, so one node may freeze an operator that another node names. Rust’s stage-1 reading; Julia counted frozen entries toward both. A default operator advanced by no node is reported at /schedule, since it has no run-config key (spec/plan.md §7.1). |
| D85 | 2026-11-02 | Pass 2 computes every term’s bands from one probe document, whose new states live in the reserved component JacobianEval, and, when the probe fails, finds the failing term by probing halves of the term list. One document per term costs one EarthSciAST load and flatten each, and each document holds the whole model, so their load and flatten cost grows with the number of terms times the model’s size. The probe document gives each term its own new state JacobianEval.term_k, shaped on the term’s equation’s state, so one jacobian_bands call yields every term’s bands (spec/plan.md §5.2.2). Reusing JacobianEval, already refused as a top-level component name (§6.1.4), needs no new reserved name or refusal. A failure on the probe document does not say which term caused it. Falling back to one document per term would pay the whole per-term cost on top of the probe’s, in exactly the case that refuses, so the planner instead probes the first and second halves of the term list in turn, splitting any half that fails, down to single terms, whose own documents it differentiates: about 2 log₂ n probe documents. It reports band_model_failed against the same term, with the same message, as before. The spec fixes only that result, not the search, so the two planners may search differently. On every plan fixture case, the probe’s band lists equal the per-term ones band for band. The probe is taken in batches of consecutive terms with at most 10,000 operator nodes in all, a larger term being a batch by itself, since EarthSciASTDiff’s entries for one of reseact’s advection terms hold about 2.6 GiB of coefficients and a probe of all of them did not fit in memory. The bound is on a batch’s total, not on how many large terms it holds, so that many terms just under the bound cannot make a batch as large as the whole list. Pass 2 keeps no coefficient, so a planner drops each batch’s before probing the next. A failure on a batch’s probe is searched within that batch, which, the batches being probed in order, finds the same term. Each probe also writes the subexpressions its terms share once, as zero-parameter templates of JacobianEval: reseact’s advection term, a graph of about 9,000 distinct nodes in the flattened model, was a 5.6 MB tree in the probe and reloaded as about 169,000 nodes. Templates are part of the format both EarthSciAST loaders read, and EarthSciASTDiff expands them, so this needs no new interface; handing EarthSciASTDiff an in-memory system instead would have needed a way to build one that neither EarthSciAST offers in both languages, and would have skipped the load and flatten that define the band list. |
| D86 | 2026-11-02 | A probe document that succeeds gives every term’s bands; no term’s own document is checked as well. §5.2.2 defines a term’s band list by its own document, and that document can in principle fail where the probe does not, since the probe moves the term onto the new state JacobianEval.term_k, giving the term’s own state the zero right-hand side. Checking each term’s own document after a successful probe would bring back the one-document-per-term cost D85 removes. Instead the probe state is declared, initialized and written as the term’s state: the same shape and default, the same ic equations and the same equation, so the probe holds everything a term’s own document holds. Both planners’ tests check, on every plan fixture case and every refusal fixture that reaches pass 2, that the probe fails exactly when some term’s own document fails, and gives the same bands otherwise. A failure the probe still did not show surfaces in item 4 of the order of refusals (spec/plan.md §4), where each operator’s own document, which holds its terms with their own states, is differentiated: it is band_model_failed for that operator, later in the order and against the operator instead of the term. Pass 2 now reads EarthSciASTDiff’s structure-only entries (EarthSciASTDiff#59), which take no derivative, so a term whose derivative EarthSciASTDiff cannot take (underivable_operator) passes pass 2 and fails its operator’s document in item 4. The planner then differentiates the operator’s terms’ own documents in term order and reports the first that fails, with its message, so the refusal still names the term; only its place in the order moves, after selection. Structure-only entries cost no derivative and hold no coefficient, and their pattern includes the full mode’s (equal unless a coefficient simplifies to zero, which is a cancelling coupling that pass 2 then counts). Amended 2026-11-04: EarthSciASTDiff 0.4.0, the first release with the structure-only mode, refuses in that mode what the full mode refuses, an operator with no derivative rule included (esm-jacobian-spec §2.1), so an underivable_operator term now fails pass 2’s probe and is named by pass 2’s search, with the same message; pass 4’s search remains for a failure only the full mode meets. |
| D87 | 2026-11-02 | Data-fed parameters are planned and supplied at M2: the planner never reads data, and both runtimes fetch it and run leaves that read it. Proposed 2026-11-02; the user’s answers of 2026-11-02 to the proposal’s six questions are folded in. A data-fed parameter is one that a loader_fields entry of the flattened model names (spec/plan.md §4.1). (1) In derived documents it stays a parameter whose update is one data rule naming its source and file variable, and the document carries a stub data_sources entry per source, {"kind": K, "source": {"url_template": "{esm_integrator_forcing}"}}: a substitution-led template that EarthSciAST leaves unchanged at load, so no path enters a golden, and that makes both bindings’ rhs_program take the parameter as a forcing slot (§6.3). The planner writes these declarations itself until two upstream fixes are released (EarthSciAST keeping update through param_to_var, EarthSciASTDiff’s evaluation document carrying update and data_sources; §10 items 16, 17). plan.json gains forcing (shape, source, file variable, cadence, records per sample) and operators.*.forcing, both absent for a model without data, so every existing golden is unchanged. (2) The planner’s checks evaluate a used data-fed parameter at $b (0.5 + r)$, $r$ from D70’s SplitMix64 at sample index $s + 3$ and $b$ its default, which must be nonzero at every element (forcing_without_scale otherwise, checked after pass 3; a parameter no operator and no ic equation reads is not checked). The values check identities, read no file, and are the same in both languages; band-value files list them under forcing. Stiffness rule 4 (D70) does not use them: an operator whose Jacobian reads a data-fed parameter and would be classified by the Gershgorin bound is refused (auto_stiffness_reads_forcing), and the run config names its alg. (3) At run time every operator call takes the forcing set as its last argument (spec/operator-interface.md §8.4). The runtime owns the data but writes no data layer of its own: it loads the plan’s model, builds one provider per data-fed parameter with EarthSciAST’s providers_from_document on EarthSciIO, converts each sample to a buffer with EarthSciAST’s public conversion (the one esm_problem uses), and swaps one immutable set per forcing epoch; forcing_refresh must be in step.hit (forcing_refresh_not_hit). Everything an esm data source can declare is supported at M2 (mirrors, select, codes, record filters, extents, unit conversions, points sources, calendar cadences, custom substitutions bound by the model), so reseact can run end to end. The model locates the data and declares which records a parameter receives (update.from.records_per_sample); cache directory, offline mode and URL overrides are run-time options, outside the run config and the plan; data identity goes in the run’s report, not plan.json. Time interpolation stays the model’s. This rests on upstream work that arrived on 2026-11-02 (EarthSciAST#632, #634, #635, #636; EarthSciIO#27–#30; EarthSciASTDiff#55): update.from.records_per_sample and metadata.esio_format in the esm spec, EarthSciIO template expansion, calendar cadences and document-built providers in every language, and EarthSciAST’s public forcing_buffer. What remains is listed in spec/plan.md §10 items 19 (a records_per_sample follow-up), 21 (EarthSciIO) and 22 (Rust EarthSciAST bugs). (4) Band and locality analysis treat a data-fed parameter as a constant of the state Jacobian, like any parameter; its derivatives are the forcing axis (U7, M4). The gate is three end-to-end cases on checked-in data with exact solutions: data_decay (two-record bracket across files), data_monthly (calendar cadence, custom substitution, mirrors, select, expression unit conversion) and data_points (points source, codes, record filter, extent) (spec/toy-problems.md §4.4–§4.6). Analysis: §7. |
| D88 | 2026-11-04 | At a forcing epoch boundary each data-fed parameter takes its limit from the left, and a step never reuses its first-same-as-last stage across one. A stage at exactly the right end of a step that ends at an epoch start $B_{k+1}$ takes epoch $k+1$’s buffer for a parameter with records_per_sample 2 (time-interpolated: the model’s blend weight wraps to 0 at a record time, so the new bracket gives the continuous value) and epoch $k$’s for one with records_per_sample 1 (step-like, such as a monthly inventory); a step that starts at $B_{k+1}$ takes epoch $k+1$’s for both, so its first stage is evaluated anew rather than reused (spec/operator-interface.md §8.4.1). Replaces D87’s rule that every buffer of the right-end stage is the new epoch’s, under which data_monthly’s Tsit5 run erred by 2.3e-8 against its 1e-10 reference tolerance (the right-end stage carried next month’s rate with weight about 2.3), and the old epoch alone still erred by 2.4e-3 through the reused stage. Found by the Rust runtime (PR #58); decided by the user on 2026-11-04. |
| D89 | 2026-11-06 | Programs are built with EarthSciAST’s native compiler only, outside tests; a Jacobian document gives every state without a default the default 1.0 (zero until the amendment of 2026-11-07). The Rust planner built each program natively and, when the native compiler refused a rule, built it again with the interpreter. That made a refusal silent and the planner’s numbers come from a different evaluator than the runtime’s, which builds natively (spec/operator-interface.md §8.1). Now a native refusal is an error in the planner and in both runtimes, and only tests ask for the interpreter, by name. Planning reseact with the Rust planner also found that a Jacobian document cannot be built when a state has no default: D69 drops its ic equations, so a state only an ic equation starts (reseact’s Transport3D.m) has no starting value, which EarthSciAST refuses at construction. The starting value is never read, so the planner writes it into the document: as it drops the ic equations it gives every state without a default the default 0.0. A first version had every builder (the planner and both runtimes) pass every state element at 0.0 as the build’s caller u0; review found that this left the document unbuildable on its own, made every builder of it, third parties included, remember the special u0, and cost one formatted element name per grid cell at every build (millions on reseact’s grid). The document changes only for a state with no default, so no golden changes. Zero rather than the plan’s $u_0$ keeps the document independent of its right-hand-side document’s initial state (spec/plan.md §6.2 item 4, §8). Amended 2026-11-07 (user decision): the value is 1.0, not 0.0, and a state with a default keeps the model’s: a Jacobian document’s construction values are its states’ defaults, with 1.0 where a state has none. Reseact’s transport Jacobian document has one state without a default, Transport3D.m, and 1,656 of its 1,668 band fields divide by it, so the document evaluated at its own initial state gave 1.83 million non-finite values in 16.6 million slots. No check reads them, but a document that is not finite where it starts misleads anyone who evaluates it there, a third-party builder included. With one, no coefficient divides by a zero the planner wrote, and one is as deterministic as zero; the plan’s $u_0$ is still not used, for the reason above. This does not guarantee a finite document at its construction values: it is finite there whenever it is finite at the model’s own defaults (with 1.0 for each missing one), and a state whose model default is 0.0 keeps it, so a coefficient dividing by that state is still not finite there. A "default": null in the built document counts as no default and gets 1.0 (a model’s own default cannot be null: the schema refuses it). A default is never an expression (the schema allows a number, broadcast over an array state, or inline array data, one value per element), so each element’s construction value is its own default. The Julia planner’s second build of a right-hand-side document without its ic equations, when they read data, gives such a state a placeholder 1.0 that nothing reads (its initial state comes from the build that keeps the ic equations). No existing golden changes, since every state of those fixtures has a default; the fixture inverse_decay (a state with no default that a band coefficient divides by) has its Jacobian document’s 1.0 in its golden (spec/plan.md §6.2 item 4, §8; spec/operator-interface.md §8.1). |
| D90 | 2026-11-08 | The Jacobian document is written with subtree sharing on (cse = true, cse_min_nodes = 12), from the bands pass 4 already computed. D69 wrote the document without EarthSciASTDiff’s coefficient hoisting. EarthSciASTDiff#66 (released in 0.5.0, with #64 and #65) makes subtree sharing a single pass over the distinct subtrees with a deterministic numbering rule that both bindings follow (esm-jacobian-spec §4.1), and #65 makes the band computation faster, so both planners can be held to the same bytes with it on. Without it every band coefficient carries its whole expression: on reseact the transport operator’s 1,668 band fields repeat the same advection and limiter subtrees, so its Jacobian document was the largest artifact of the plan, writing and loading it in the Julia planner took about 450 s and 700 s, and building it took about 50 GB in Julia and 35 GB in Rust. With sharing each repeated subtree of at least 12 nodes is one observed JacobianEval.Jcse<n> that the coefficients reference, which EarthSciAST’s builders evaluate once per cell per evaluation. On reseact the transport Jacobian document is 9.0 MB instead of 333 MB; the Julia planner writes it in 16.6 s and loads it in 7.7 s; and EarthSciAST 0.10.0’s Rust binding builds it natively (esm_problem then rhs_program) in 8 s at a 1.6 GB peak, where the document without sharing took 3.5 min and 35 GB (the Julia build was not measured again). The document’s values are unchanged (the band-value goldens do not move); its bytes, and so the goldens of the Jacobian documents and their sha256 in plan.json, change wherever a coefficient repeats such a subtree. JacobianEval therefore holds Jcse<n> observeds beside the band fields; nothing reads the model’s variables other than J_k by name. EarthSciASTDiff#64 lets the Julia planner pass its pass 4 bands to evaluation_document(flat, entries; ...) as the Rust planner already did, so the bands are no longer computed twice and §6.2’s check that EarthSciASTDiff’s own bands agree with pass 4’s is gone with the second computation. Alternatives: keep sharing off (simplest, but leaves the largest documents and builds as they were), or share with a smaller cse_min_nodes (more observeds, each saving less; 12 is EarthSciASTDiff’s default) (spec/plan.md §6.2). |
| D91 | 2026-11-09 | Pass 8 builds no whole model: Julia’s band check seeds the colouring of the band pattern that Rust’s differences use, rhs_sum compares the operators’ documents with the flattened model structurally, and the planner’s $u_0$ comes from an operator’s right-hand-side document. Measured on full-size reseact (85,176 DOFs, two operators) on 2026-11-09: Julia’s band_model seeded every column in its own ForwardDiff direction, eight to an evaluation, so 10,647 full-grid evaluations per operator per sampled state, projected at about 17.6 h for the three states; and the whole-model build, which existed only for $u_0$ (spec/plan.md §4, §5.5.1, reached from pass 5’s Gershgorin bound as well) and for rhs_sum, took 82 min and 48 GB in Julia, lowering the model twice, and is where the Rust planner was refused on reseact. (1) The colouring. Both planners colour the pattern’s columns greedily in canonical order, each column taking the lowest colour no earlier column sharing a pattern row has taken (Curtis, Powell and Reid; the rule Rust’s finite differences already used, now stated once for both, spec/plan.md §8.2), and Julia seeds each colour as one ForwardDiff direction. Reseact’s chemistry operator needs 11 colours and its transport operator 380: 2 and 48 dual evaluations per sampled state instead of 10,647 each. The guarantee becomes Rust’s: a dependence outside the pattern in a row with no pattern column of its colour still fails exactly; one in a row that has a pattern column of its colour adds to that entry and fails only where it moves the entry by more than $10^{-10}$ of the row’s largest entry. The pattern is EarthSciASTDiff’s structural dependence, so such a dependence is a bug in it, and one that moves no entry by $10^{-10}$ of its row goes unseen. The band-value files do not change: a colour’s partial is the column’s own whenever no other column of the colour enters the row, which a complete pattern ensures, and every fixture’s files were rewritten bit for bit. The same change makes Julia’s loop type-stable (the chunk width a type parameter behind a function barrier), reseeds only a chunk’s columns and reads each row’s pattern entries in place of a set lookup per zero, which changes no value. (2) rhs_sum, structural. The old check built the flattened model and every right-hand-side document and compared $\sum_k f_k$ with $f$ at the sampled states within $10^{-12}$. The new one builds and evaluates nothing: for each state it compares, as multisets of canonical expressions, the summands of the flattened model’s equation (§5.1.1’s decomposition of the equation’s own right-hand side, not of the contributions the terms were read from) with the summands of that state’s equations in all the operators’ documents as EarthSciAST loads and flattens them from their bytes; and in each document it compares every observed’s definitions, every declared state’s and parameter’s shape and default, and the ic equations with the model’s (spec/plan.md §8.1). It catches what the numerical check caught of the planner’s own work: a term lost, doubled, put in another state’s equation or given the other sign, a lifted equation’s indices, an observed, a default or an initial condition written wrongly, and a decomposition of the equation that does not add up to it. It gives up the comparison of compiled programs: a native compiler that compiles one expression differently in two documents is no longer caught here. band_model still catches such a fault where it changes a state derivative (EarthSciAST 0.6.0’s region-selection bug, which evaluated reseact’s transport terms to zero, spec/plan.md §10 item 5, would fail it), but not where it changes only a part that does not depend on the state; the runtime builds only the operators’ documents, never the model, so a fault confined to the model’s own program would not reach a run. Alternatives: a sum document holding all the operators’ terms, compared numerically with their sum (cheaper than the model, since it carries only live observeds, but built from the same terms, so it checks the compiler’s consistency and nothing of the split); each term’s own document evaluated (one build per term, thousands on reseact); the model build kept for conformance only (leaves production plans of large models unchecked and reseact unplannable in Rust); a range-restricted model evaluation (U3, not available, and the build, not the evaluation, is the cost). (3) $u_0$ from an operator’s document. Every right-hand-side document declares every state with the flattened model’s default, holds every ic equation and declares every used data-fed parameter with its default (§6.1, §6.3), so each builds the whole of $u_0$, a state several operators write or none writes included. The planner reads it from the first operator’s document in code-point order and requires every other operator’s document to build the same, bit for bit (an internal error otherwise, since §6.1 makes them equal); unused data-fed parameters, which only the model build bound (to 1), are now bound nowhere. The Rust planner binds every used data-fed parameter to its default with a provider when it builds a right-hand-side document, because EarthSciAST’s Rust initial_state reads an ic equation’s array parameter only from a provider; the values are the ones §6.3 gives. No golden changes: every fixture’s plan.json, derived documents and band-value files are rewritten bit for bit. |
| D92 | 2026-11-09 | Rust’s band check accepts the central difference at a smaller step where a limiter’s kink is within one step of the sampled state. Found on full-size reseact: Rust’s planner refused transport at SuperFast.CH2O[10,1,21] (its own diagonal entry, $t = 6300$), the bands giving $-0.0827215$ and the central difference $-0.0846$, beyond a tolerance of $8.6\times10^{-8}$. At the planner’s step the forward and backward differences were $-0.0865$ and $-0.0827$, the backward matching the bands to $2\times10^{-12}$; at steps 10 and 100 times smaller the central difference matched the bands as well. A flux limiter’s kink lies within one step above the sample, the central difference averages the two sides’ slopes, and the bands, like ForwardDiff, give the slope of the side the sample is on. Decision: an entry whose central difference fails its tolerance is accepted when its band value is within tolerance of the central difference at the step divided by 10, then by 100 (two evaluations each, only for colours with an entry still failing), the tolerance’s rounding term $10^3\varepsilon F_r/\tilde h$ taken at that smaller step and its $10^{-6} M_r$ unchanged; otherwise it is refused as before, the message carrying the three central differences (spec/plan.md §8.2, “Kinks”). The outcome depends only on the values, so it is deterministic; plan.report.json counts the entries so accepted (entries_accepted_at_smaller_step); the band-value files, the off-pattern check and the conformance comparison with Julia’s values do not change. What is given up: on a row smooth near the sample a smaller step’s central difference is as accurate as the full step’s, so no band value wrong beyond the tolerance passes; only the rounding allowance widens, up to 100 times, for the entries the full step failed. A kink within a hundredth of a step of the sample still refuses falsely. Julia needs no change: ForwardDiff differentiates at the sample, taking the branch the program takes there, so a kink near it changes nothing. Alternatives: also accepting a one-sided difference at the full step, as first chosen by the user (“accept a one-sided match”, 2026-11-09) and dropped the same day on review of PR 69: a one-sided difference’s truncation error $\tfrac12\tilde h_c |
| D93 | 2026-11-09 | Rust’s band check also accepts a forward or backward difference at a tenth or a hundredth of the step. Found on full-size reseact with D92 in force: Rust’s planner refused transport at SuperFast.NO[11,5,68] (its own diagonal entry, $t = 6300$), the bands giving $-2.0568\times10^{-4}$ and the central differences $-2.2234\times10^{-4}$, $-2.2097\times10^{-4}$ and $-2.0734\times10^{-4}$ at the step and at its tenth and hundredth, all beyond their tolerances (the full step’s $3.5\times10^{-10}$). A limiter’s kink lies nearer the sample than a hundredth of the step, so every central difference straddles it. With D92’s first version, which accepted one-sided differences at the full step, planning passed, with 53, 76 and 59 transport entries accepted by a fallback at the three samples. Decision: at the step divided by 10 and by 100, an entry the central difference at the full step fails is accepted when its band value is within tolerance of the central, the forward or the backward difference at that step, tried in that order, each with that step’s rounding term $10^3\varepsilon F/\tilde h^{(j)}$ taken over the two values of $f_r$ it uses, and $10^{-6} M_r$ unchanged. One-sided differences at the full step are not accepted. The one-sided differences reuse the two evaluations each smaller step already makes and $f$ at the sampled state, which is evaluated once per sampled state and only when some entry fails, so the cost is one evaluation per sampled state at most; the order stays cheap first (the step over 100 only for colours with an entry the step over 10 left failing). The refusal message gives all three differences at both smaller steps. plan.report.json keeps entries_accepted_at_smaller_step, whose name still fits, and Rust adds entries_accepted_by (central and one-sided at each smaller step) and worst_accepted_at_smaller_step_over_tolerance; the report’s format is not specified and Julia writes neither, so nothing golden changes (spec/plan.md §8.2, “Kinks”). The review’s objection, and the answer. PR 69’s review dropped one-sided differences at the full step because their truncation error, $\tfrac12\tilde h_c |
| D94 | 2026-11-11 | At M2 the planner refuses run settings the runtimes cannot run yet, and an omitted dt_scope resolves to global. Reverted at M3 (2026-11-24): the dt_scope default and refusal by D97, the time-derivative refusal and the TRBDF2 substitution by D102. An end-to-end reseact run on 2026-11-10 found two settings that planned without complaint and failed only when a runtime built the run: a Rosenbrock23 leaf on the time-dependent chemistry (a Rosenbrock method needs the operator’s ft, which a plan’s operators do not provide until U17, spec/operator-interface.md §8.3, D80), and the dt_scope cell that the planner itself had written for the pointwise leaf (D17, D71), which both runtimes leave to M3. Now (1) the "auto" table’s pointwise stiff row resolves to TRBDF2 when an operator of the leaf has structure.depends_on_t true, and a leaf whose run config names a Rosenbrock method and that advances such an operator is refused, unsupported_time_derivative, after the strategies (spec/plan.md §5.5.3); (2) a control.dt_scope of cell or shard is refused, unsupported_dt_scope, with the schedule’s other unsupported constructs (§7.1); and (3) an omitted or "auto" dt_scope resolves to global for every class until M3, which restores D17’s cell default. Keeping the cell default and refusing it would have refused every pointwise leaf that does not name its dt_scope, "auto" schedules included, though both runtimes run those leaves correctly with global; so the default changes instead. That changes dt_scope from cell to global in the planner fixtures’ goldens and nothing else in them. The "auto" table’s pointwise stiff row does not keep its Rosenbrock methods for such a leaf: refusing after resolving would leave an "auto" schedule, which has no leaf to name an alg on, no way out but writing the whole schedule by hand, so the row picks TRBDF2 (the column stiff row’s method, whose error estimate holds on stiff problems, D59) and keeps its jacobian and linsolve; the planner already knows depends_on_t from pass 4 when it resolves the row. Both planners read it from the operator’s structure, the value plan.json carries. Both rules are rule 16’s (“a construct this version specifies but no implementation yet supports”). |
| D95 | 2026-11-12 | An unknown of a solve node whose model variable carries a bound (lb, ub, U18) makes the solve a mixed complementarity problem (spec/run-config.md §4.10, rule 18; spec/adjoint.md §4.6; spec/tape.md §2). Found while moving EqWeFiC’s MOSAIC solid–liquid equilibrium (MESA, WRF-Chem mesa_ptc) out of its .esm files, which must state the physics and leave the solver to the integrator: the unknowns are the solid amounts of fifteen salts, $E_s \ge 0$, with rate $S_s - 1$ (saturation ratio less one), so a salt is either solid and saturated or absent and undersaturated, and none can exceed what its ions allow. Without bounds a ptc or newton solve walks an undersaturated salt below zero, and the model cannot say “stop at zero” without encoding a solver step (a clip) in its equations. Where bounds are written: the model. First specified as a bounds map on the run config’s solve node; moved to the variable specification of the .esm format (lb, ub, each a number or a reference to another variable, parameter or observed; EarthSciAST validates them, U18) on review of PR 74 (the user, 2026-11-12), because a bound changes what the model’s equation means: 0 ~ S_s - 1 is false for an absent salt, so a model without its bound states the wrong physics, and every run config would have to repeat it. MESA’s upper caps differ by salt and cell, hence references. Alternatives. (a) The leaf domain.nonnegative clip: it applies to a time integration’s accepted states, and a solve has none. (b) A smooth reformulation written in the model (Fischer–Burmeister, or $\max(0,\cdot)$ on the unknown): puts a solver choice in the .esm, and Fischer–Burmeister changes the residual whose tolerance the user states. (c) General inequality constraints: more than any known model needs. (d) Bounds in the run config: the first version, above. Methods: projected PTC, semismooth Newton on $z - \operatorname{mid}(l, z + g, u)$, projected Picard, each starting from its starting iterate projected onto the box. Convergence is on that reformulated residual only; rel_change is refused for a bounded solve (rule 18), since a small change in an observed does not show complementarity (the user, 2026-11-12). A bound that is, or depends on, another unknown of the same node is refused too (rule 18): it would move during the solve, and EarthSciAST’s own check covers only dependence on the bounded variable itself. Active set: classified at convergence by the branch mid takes, with a component within the residual tolerance $\epsilon$ of its bound and $ |
| D96 | 2026-11-24 | The M3 gate is agreement between the Julia and Rust runs of reseact, not agreement with the prototype, and the time budget is the prototype’s recorded solve time. Amended by D108 (2026-11-27): where the two runs take different steps, the $10^{-3}$ agreement of (2) below is replaced by a comparison of each run with a tight-tolerance Julia truth run (spec/partitioning.md §9.5); runs with identical steps still agree to $10^{-9}$. The prototype’s native runner (run_reseact.jl in reseact.esm, last changed 2026-09-05) cannot run today’s reseact: the model moved to esm 2.0.0 (reseact.esm 80a27b3, 2026-11-13), which only EarthSciAST ≥ 0.11 reads, while the runner depends on EarthSciASTSplitter (compatible with EarthSciAST 0.1–0.2 only) and on EarthSciAST._provider_const_field, which 0.14.0 no longer has; the environment that last ran it (2026-08-20) runs only the esm 1.0.0 model, which EarthSciIntegrator cannot plan. It also integrates differently in three places: chemistry’s time derivative forced to zero, clipping of accepted states, and halving a failed macro step. The user chose (2026-11-24) not to port it (“we’re not even sure the prototype was correct”). The gate: (1) reference trajectory: EarthSciIntegrator’s Julia run of reseact with the prototype’s schedule and methods (300 s Lie split, transport SSPRK43 reltol 1e-4 abstol 1e-6, chemistry Rosenbrock23 reltol 1e-4 abstol 1e-9, dt_scope: global, domain.nonnegative: "all" with on_violation: "reject") over 24 h of CONUS (13×7×72) from $t_0$ = 5400 s; (2) agreement: the Rust run of the same plan agrees with it at every hourly output by the cross_language rule of spec/toy-problems.md §2.1, each state component relative to its largest magnitude over the run in either result: to $10^{-9}$ when the two runs take the same steps (the M2 one-hour runs agreed to $1.4\times10^{-13}$ with identical steps), and to rtol_steps_differ $10^{-3}$, ten times the leaves’ reltol, when a roundoff-level accept or reject flips the step sequences apart, since the runs then differ by about the global error; agreement is to tolerance, not bitwise (D10). Both runs end with every value finite and none negative; (3) time: the Rust and the Julia solve time (the integration loop, plan loading and program builds excluded) with dt_scope: cell for chemistry is at most 2,182 s, the prototype’s recorded solve time for the same 24 h at 8 threads (reseact.esm logs/reseact-nat24-10032840.out, 2026-08-20, a 16-core node of the same cluster), run at 8 threads on the same node type; build and load times are reported, not gated; (4) invariance: with dt_scope: cell, each language’s final state is bitwise the same at 1, 2, 4 and 8 threads and at shard counts 1, 8 and 64 (spec/partitioning.md §9). The prototype’s recorded digest (ozone minimum, mean and maximum, OH maximum and NO2 mean, hourly; at 25.5 h: 24.77668, 39.33164 and 40.00027 ppb, 3.890e-3 and 9.250e-2, on the 2026-08-20 model) is reported beside ours for information only; the prototype’s clipping, zero time derivative and macro-step halving are not reproduced. Rosenbrock23 needs the chemistry’s ft, which the time-derivative document of D102 supplies. |
| D97 | 2026-11-24 | dt_scope is restored: cell is again the default for pointwise leaves, and its meaning is fixed so that results under cell and global do not depend on how the work is divided. D94’s M2 restriction is reverted: an omitted or "auto" dt_scope resolves to cell for a pointwise leaf and global for every other class (D17), and unsupported_dt_scope now refuses only cell or shard on a column leaf, whose lane pools are specified but not yet implemented (spec/partitioning.md §2.5). cell and shard on a stencil or global leaf, or on a coupled node, are refused (dt_scope_not_local): their cells read each other within a step, so a cell cannot step alone; a bind_dt: "leaf" parameter on a cell or shard leaf is refused (dt_scope_bind_dt), since one scalar parameter cannot hold several step sizes at once. Amended 2026-11-29: as first written, the default cell applied to a pointwise leaf with a bind_dt: "leaf" parameter too, and the refusal looked only at a dt_scope the run config gives, so such a leaf with dt_scope omitted silently ran under cell, the case the refusal exists to prevent. An omitted or "auto" dt_scope on a leaf with a bind_dt: "leaf" parameter (its own or an operator’s) now resolves to global; a given cell or shard is still refused (spec/plan.md §5.5.3, spec/partitioning.md §2.1). Invariance. Under cell each cell is an independent integration whose results are a function of its own inputs (spec/partitioning.md §3), so they are bitwise the same for any shard count, thread count, lane capacity, shard composition and work order. Under global the error norm’s sum keeps M2’s order (ascending DOF index over the leaf, sequential, spec/methods.md §7) whatever the decomposition: the per-DOF ratios may be computed in parallel, but their squares are summed in one fixed sequence, which costs one sequential pass over the leaf’s DOFs per step attempt and makes global results bitwise invariant to shard, tile and thread counts within a rank too, and equal to M2’s. Only shard results depend on the composition (D10). This narrows D10’s “different decompositions agree to tolerance” to shard scope within one rank; across ranks (M5) the global norm is reduced in rank order (architecture §7.4) and depends on the rank count. |
| D98 | 2026-11-24 | Each lane is evaluated at its own time; lane programs need a per-lane time argument, asked upstream as U19. Under cell the cells of one batch are at different times after their first step, and a reseact chemistry right-hand side reads $t$ (photolysis through the solar zenith angle). EarthSciAST’s lane programs (U3; Julia lanes, Rust RhsProgram::lanes, EarthSciAST 0.5.0) take one scalar $t$ per call. Until a release takes a time per lane, a runtime evaluates in one call only lanes whose times are equal bit for bit, which is always correct, since a lane’s value depends only on its own inputs (the U3 contract), and at worst one call per distinct time. With U19 a batch is one call. Lane capacity, padding and grouping never change a value (spec/partitioning.md §3.3). |
| D99 | 2026-11-24 | Executors are stateless, and every reduction has a fixed order independent of the executor (spec/partitioning.md §4, §5; architecture §7.3, §7.4; D10). An executor receives a shard’s lane states, controller states, the forcing sets and parameters, and returns new states, controller states and per-cell step records; it keeps nothing between calls, so any thread may run any shard and assignment may change at any time on any signal, wall-clock time and work stealing included. Threads are a run-time option of the runtime’s API and command line, not a run-config or plan key, because no result depends on them. Integer counts and the minimum or maximum of floating-point values are exact under any order; every floating-point sum is taken in the order the spec names. |
| D100 | 2026-11-24 | Shard composition changes only under rules that keep results deterministic (spec/partitioning.md §6; architecture §7.6). The initial composition is contiguous runs of the leaf’s cells in canonical order. Under cell and global the composition and the order of work may change between any two invocations on any signal, since nothing depends on them; the recommended order is decreasing cost in the previous invocation (step attempts), which balances threads. Under shard the composition is part of the numerics and changes only at macro-step boundaries named by the leaf’s partition.reshard ({"every": k}; default none), on one deterministic signal: each cell’s contribution to its shard’s squared error-norm sums over the step attempts of the leaf’s invocations in the previous macro step, $R_c = \sum_{\text{attempts}} \sum_{j \in c} (e_j/\mathrm{sc}_j)^2$, cells sorted by $R_c$ descending, ties by cell index, then cut into contiguous shards. $R_c$ is computed from values the controller already forms, needs no extra evaluation, and separates stiff cells from quiet ones within a shard, which the shard’s own step count cannot. The tape records each composition change (spec/tape.md §2). Other signals architecture §7.6 lists (solar zenith angle, level) are not specified at M3: the chosen signal covers both, through the error they cause. |
| D101 | 2026-11-24 | Forcing at scale: one resident buffer set per epoch, shared read-only by every thread; per-lane forcing slices are caches (spec/partitioning.md §7). Before a leaf invocation starts, the runtime makes resident every forcing set any call of the invocation can take (spec/operator-interface.md §8.4.1): the set of the epoch containing its start, and, when its end is an epoch boundary $B_{k+1}$, the next epoch’s set too, which a right-end stage reads for two-record parameters. No sampling or decoding happens inside a parallel region. A lane may hold the values its program reads from the forcing set at its own cell (its slice, EarthSciAST’s pre-gathered lane inputs), gathered once per lane and set and reused; a slice gives the values of a full-buffer evaluation bit for bit, so whether and when slices are gathered changes nothing. Different lanes of one batch may take different sets in the same pool step (one ending its step on $B_{k+1}$, another mid-epoch); each takes the set its own step selects. |
| D102 | 2026-11-24 | Plans carry a time-derivative document for every operator a Rosenbrock leaf advances whose right-hand side depends on $t$ (spec/plan.md §6.7; U17 released in EarthSciASTDiff 0.1.0). derived/<operator>.time_derivative.esm, kind time_derivative, is EarthSciASTDiff’s evaluation document of the operator’s time bands (wrt: "time", esm-jacobian-spec §4.2, §8), built as §6.2 builds the Jacobian document, with subtree sharing on; the runtime’s ft evaluates it. Pass 8 checks it like a band model (time_band_model): Julia against ForwardDiff in $t$, Rust against central differences in $t$ with §8.2’s tolerance and kink rule. The document is emitted only where a Rosenbrock leaf needs it, so plans without one are byte for byte unchanged. unsupported_time_derivative is removed: D94’s refusal and its "auto" substitution of TRBDF2 for a time-dependent stiff pointwise leaf are reverted, and the "auto" table’s pointwise stiff row is again Rosenbrock23/Rodas4 (D71). |
| D103 | 2026-11-24 | Stencil leaves run on tiles in shared memory with whole-state halos, and tile count does not change results (spec/partitioning.md §8; U3). Each tile evaluates its owned rows with EarthSciAST’s tile program (Rust RhsProgram::tile, Julia the equivalent), reading its halo from the shared stage state; every stage’s input is complete before any tile reads it (a barrier per stage). The U3 contract makes each tile’s rows bitwise equal to the whole-domain program’s, and the global norm’s order is fixed (D97), so a stencil leaf is bitwise invariant to partition.tiles. Halo exchange between ranks is M5’s. |
| D104 | 2026-11-24 | Run-config and plan additions for M3 (spec/partitioning.md §10). A leaf’s partition gains lanes (the lane capacity, a positive integer; omitted, the runtime chooses) and reshard ("none", the default, or {"every": k} macro steps; only for dt_scope: shard); the plan’s partition gains lanes and reshard by node id, written when the leaf is pointwise or column and the key is given (reshard always for a shard leaf, as "none" when omitted); "auto" shards resolve to 1 as at M2. The plan schema’s derived kinds gain time_derivative. Threads are not a key (D99). |
| D105 | 2026-11-25 | A term’s locality also counts what the operator references it calls read in their array arguments, with face sets paired to their cell axes. reseact’s Transport3D.m has two terms that read no state: -divh_fix (whose definition reads the longitude and latitude flux divergences of Mx and My) and the vertical mass-flux divergence of Mz. By state bands both are pointwise, so they landed in the pointwise chemistry, whose lane programs refuse a whole-array reference and whose time-derivative document then needed a contracted band (the M3 gate, 2026-11-24). The user chose (2026-11-25): (1) a term’s class is also read from its argument bands, its bands with respect to the non-state arrays it passes to operator references, directly or through the observeds it reads, computed by EarthSciASTDiff from an argument probe in which those arrays are states, so references are never expanded and never classified by the rule’s D(…, wrt: X) pattern (spec/plan.md §5.2.2); (2) a face set is declared in the run config’s axes.faces, mapped to its cell axis with cell $i$ owning face $i$, and §5.2.3 pairs it with that axis (the pairing U3’s decomposition already asks the caller to name; nothing in the integrator supplied it before); (3) in an argument band, a dimension on an index set that is neither an axis nor a declared face set reaches nothing, like an other axis’s offsets (D82): such arrays (reseact’s NEI regrid tables on ov.src_cells, ov.tgt_cells) are read whole and never divided among shards, and counting them would make every emission term global; (4) because an undeclared face set is then silently an other axis, the planner warns (likely_face_set in plan.report.json, not a refusal) about every undeclared index set one element longer than an axis. The run config, not the plan, is where faces are declared, beside the axes they stagger off: they are a statement about the model’s grid, as the axes are; the plan will record them when the runtime’s tiles read them. On reseact with lon_nodes, lat_nodes and lev_nodes declared, -divh_fix is stencil (radius 1 on each horizontal axis), the Mz term column, both join transport (stencil, radius 3), and chemistry keeps its 12 species, pointwise. Amended 2026-11-29: an observed declared without a shape key is never an argument variable, since neither EarthSciAST binding infers its shape when it flattens; every such observed a term passes to an operator reference gets an unshaped_argument warning in plan.report.json instead of being skipped silently (spec/plan.md §5.2.2). |
| D106 | 2026-11-25 | Rust’s finite-difference checks scale their rounding floor by a row’s summand magnitude, not by the row’s value (spec/plan.md §8.2, §8.1). The Rust planner’s band_model and time_band_model allow $10^3\varepsilon F/\tilde h$ for rounding, with $F = \max( |
| D107 | 2026-11-25 | Only a planner that differentiates exactly in $t$ checks the time-derivative document; Rust skips time_band_model (spec/plan.md §8.1, §6.7; spec/planner-errors.json). Julia keeps the check against ForwardDiff’s derivative in $t$. The Rust planner has no automatic differentiation, and its central difference in $t$ refused reseact’s chemistry even with D106’s summand floor (time dependence through time-interpolation weights with a floor, solar geometry and rate constants). The plan does not record the check: validation never lists time_band_model, so both planners’ plan.json stay byte-identical; Julia reports the result in plan.report.json, and validation_time_band_model_failed is marked Julia-only ("planners": ["julia"], a new optional field of spec/planner-errors.json). Why: the planners write identical plans, so one exact check covers both; the document checked is EarthSciASTDiff’s, which has its own goldens in Julia, Rust and Python; and a finite difference in $t$ cannot be both strict and reliable here. D106’s floor stays for band_model and its pattern check; its time-band part is removed with the check. |
| D108 | 2026-11-27 | Where the Julia and Rust runs of the M3 gate take different steps, each is judged against a tight-tolerance Julia truth run, and Rust passes if its error is at most twice Julia’s (spec/partitioning.md §9.5). The like-for-like comparison of reseact on one plan showed the two runtimes’ step sequences diverging at the second macro step’s chemistry leaf from a $1.6\times10^{-13}$ relative difference in one step size (rounding in the error estimate), after which OH at a cell at sunrise differed by 2.5 % of its value (1.37e-3 of that cell’s largest value), beyond the $10^{-3}$ criterion for differing steps, while every other species stayed within $10^{-4}$. A fixed tolerance between two runs whose steps differ measures the integrators’ own error twice; a truth run at tolerances 1e3× tighter than the gate tolerances (chemistry reltol $10^{-7}$, abstol $10^{-12}$; transport reltol $10^{-7}$, abstol $10^{-9}$; a 1e4× tighter truth was estimated at about 12 h of solve time) measures each runtime’s error and compares them. The comparison uses the leaf’s weighted error norm at the gate’s tolerances, per species, worst over output times and cells; the relative error per value is reported beside it. Runs with identical steps still agree to $10^{-9}$. Chosen by the user. |
| D120 | 2026-11-26 | A solve node, or a coupled node with algebraic operators, pairs its residuals with its unknowns by structural matching (spec/plan.md §5.9; amends D95, which left the pairing to U6, and U6 as merged, EarthSciAST#700, does not pair). The planner finds a perfect matching between the node’s residual blocks (its implicit equations) and its unknown blocks from the residual’s sparsity pattern, as in DAE structural analysis, working on whole array blocks from the structure-only band lists and never expanding the grid or an operator reference. Canonical rule, so both planners write the same pairing: (1) a node whose residuals and unknowns have different element counts, or whose block dependency graph (an equation reads an unknown, directly or through observeds) carries less than every element in a maximum flow with each block’s element count as its capacity, is structurally singular (solve_structurally_singular), since no element matching can exist; (2) an equation and an unknown are a diagonal pair when their extents are equal and the rows at which the equation’s bands on that unknown have a column equal to the row (same index name, a contracted name whose range holds the row, or a literal equal to the row) cover every element, decided on boxes, so element $i$ pairs with element $i$; (3) among diagonal pairs, Kuhn’s augmenting-path algorithm with equations in residual order and candidate unknowns ordered first by the equation’s own component, then by code point, gives the pairing. The user chose general structural matching over a model-level or run-config pairing (2026-11-26). Alternatives: (a) the model names each bounded unknown’s equation (an esm format change, every binding); (b) the run config names the pairing (D95 put bounds in the model as physics, and the pairing of a bounded unknown is the same kind of fact); (c) Hopcroft–Karp, whose result depends on its phase structure and is harder to pin in two languages than a stated augmenting-path order. Where the canonical order cannot decide: a pairing differs only in which residual is the pseudo-time rate of which unknown. Newton and Picard find the same zeros whatever the pairing, and ptc reaches the same solution when its flow is stable, so an unbounded node takes the canonical pairing. A bounded unknown’s pairing decides its complementarity conditions (D95), so when the diagonal matching is not unique (an alternating cycle exists) and the cycle passes through a bounded unknown, the planner refuses (solve_pairing_ambiguous) rather than pick a physics. Not yet planned: a node with no diagonal perfect matching that is not shown singular by (1) needs an element-level matching, which would write a per-element permutation; it is refused under rule 16 (unsupported_solve_pairing) until a model needs it. Rule 18 reads the pairing: the sign check and the projection of a bounded unknown $z_j$ use the residual paired with it, element by element. MOSAIC’s MESA (one residual 0 ~ g on lev × bin × salt, one unknown e_salt of the same extents) and Kelvin (one residual, one unknown aw) each have a unique diagonal pairing. |
| D121 | 2026-11-26 | The planner writes each algebraic operator’s residual as a derived document, <operator>.residual.esm, in which each paired unknown is a state whose time derivative is its residual, rhs − lhs (spec/plan.md §6.4; architecture §3.2). That is the pseudo-time flow $dz/d au = g(z)$ D95 states, so the document carries D95’s sign and the D120 pairing in its equations, and the planner’s existing machinery applies unchanged: locality and structure from its bands, its Jacobian document from EarthSciASTDiff (<operator>.jacobian.esm, $g_u$ and $g_z$), operator references kept, byte-identical goldens. Every derived document declares the model’s solved algebraic unknowns as states, with a zero time derivative where its operator does not write them, so a right-hand side reading $z$ builds, and its Jacobian document carries $f_z$. The runtimes compile it as they compile a right-hand-side document. Alternative: U6’s strip mode and kernels (EarthSciAST#700, released in 0.15.0): its residual is lhs − rhs, the opposite sign; it pairs nothing; its kernels need the whole model built at run time; and the planner would still have to write a document for the residual’s Jacobian. So architecture §3.2’s and spec/plan.md’s reliance on U6 for residuals is dropped; U6 remains the route for events, parameter updates, maps, limits and conditions. No EarthSciAST change is needed for solve nodes. |
| D122 | 2026-11-26 | Index-1 DAEs (D3b) are implemented now, at M4b with solve nodes, for stiffly accurate Rosenbrock (Rodas3, Rodas4, Rodas5P) and stiffly accurate ESDIRK (TRBDF2, Kvaerno3, Kvaerno4) methods; BDF stays out of v1 (amends D35; spec/run-config.md §4.3, spec/methods.md §14). A coupled node with algebraic operators integrates $M,y’ = F(y)$ with $M = \mathrm{diag}(I, 0)$ over its written states and the unknowns its residuals pair with (D120), $M$ never assembled: it only drops terms on algebraic rows. Consistent initialization solves $g(u, z) = 0$ for $z$ with $u$ held, at the start of every invocation, since an operator split hands the node a $u$ its $z$ was not solved for; its method is the node’s initialize (a solve node’s method, default Newton with backtracking). A bounded unknown in a DAE is refused (unsupported_dae_bounds): a complementarity DAE is not specified. Asked for by the user (2026-11-26), with MOSAIC’s phase state as the first model whose algebraic equations matter; BDF is a separate later step. |
| D123 | 2026-11-27 | An index set the run config’s axes names neither horizontal nor vertical lies inside a cell: a reach over the whole of it keeps the term’s class, and the structure is classified with the horizontal and vertical axes as cell axes (amends D82; spec/plan.md §5.2.1, §5.2.4, §5.4; spec/run-config.md §6.1). MOSAIC’s MESA residual sums over the fifteen salts of one size bin; under D82 that reach made the operator global, a dense solve over every bin. D82’s own reason for ignoring offsets on an other axis, that such an axis is never divided among shards, tiles or ranks, holds for a sum over it as well. The block structure needed EarthSciASTDiff to plan one block per cell over caller-named cell axes, holding every element along the other axes (EarthSciASTDiff#86, which also stops classing a band whose column has another rank than its row as diagonal; the check that found it, on phase_joint, gave a 2 × 2 block where a cell holds three unknowns). The user chose this over a new axes.within_cell list (a second way to say “not an axis”), an index-set attribute in the model (a format change; D67 and D105 put decomposition in the run config) and a per-block solver chosen without the locality change (2026-11-27). With the default axes every state index set is horizontal, so no plan changes unless a run config names axes. |
| D124 | 2026-11-27 | A frozen observed’s value reaches the runtime through a frozen_residual derived document (spec/plan.md §6.5; spec/methods.md §15.2, §15.5). Picard needs the frozen observeds at each iterate, and converged.rel_change needs its observed. The Jacobian document cannot give them (its state equations are zero), and adding states to the residual document would add rows to the operator’s bands and structure. So a frozen_residual document holds one state per observed, its derivative the observed’s value, and the frozen Jacobian document reads the observeds as states renamed from them; the plan entry carries the frozen Jacobian’s band list (frozen_bands). The frozen states live in a model FrozenEval, reserved as JacobianEval is, since EarthSciASTDiff refuses a source with a component named JacobianEval when it differentiates the frozen Jacobian’s source. Chosen by the user over the residual-document alternative (2026-11-27). |
| D125 | 2026-11-28 | A solve’s residual may be scaled per unknown, growth may be uncapped, and recover may switch method (spec/run-config.md §4.10; spec/methods.md §15.1, §15.4, §15.7; spec/plan.md §5.9.7, §6.5, §7.1). MOSAIC’s MESA solve (EqWeFiC, 12 converged reference cases) failed from zero solid with every unscaled method (at most 3 of 12): the bounded reformulation $z - \operatorname{mid}(l, z + g, u)$ compares amounts $z$ with a dimensionless rate $g = S - 1$, so near the root it measures $z$ and the steps barely move. MOSAIC’s own mesa_ptc steps each salt by a fraction of that salt’s amount (its time scale is the liquid electrolyte over the rate). A method’s scale (a number, a parameter, or a state-free observed per unknown) makes the iteration work on $D g$; the convergence test and the active set stay on the unscaled residual, so the solution and tolerance do not change. With MOSAIC’s electrolyte partition of the totals as the scale, pseudo-time with growth: "uncapped" (switched evolution relaxation, the step growing as the residual falls) converges 10 of 12 and Newton with backtracking 8 of 12, together all 12, so recover gains {"method": M}, an attempt with another method (newton or ptc). Bounds and scales may reference a state-free observed, evaluated once per invocation through the frozen residual document (D124), whose observed list the plan entry carries as frozen; a state-dependent reference stays refused. A scale that is not positive fails the invocation at run time; a model floors its scale itself. Chosen by the user over a run-config pseudo-time scale alone (which cannot help Newton, whose mid is unit-dependent) and a method change alone (2026-11-28). |
| D126 | 2026-11-28 | newton.inexact is a Newton–Krylov step with Eisenstat–Walker forcing, preconditioned by the node’s linsolve (spec/methods.md §15.3). The run-config schema has had the option since D95 without a definition. GMRES (right-preconditioned, unrestarted, at most one iteration per unknown) solves the generalized Newton system to the relative tolerance $\eta_k$ of Eisenstat and Walker’s choice 2 ($\eta_0 = 0.5$, $\gamma = 0.9$, exponent 2, the $\gamma \eta_{k-1}^2 > 0.1$ safeguard, $\eta_{\max} = 0.9$); the preconditioner is the per-cell block LU where the plan has blocks (exact for a block-diagonal system) and Jacobi otherwise. Both runtimes implement the same iteration, so their steps agree to rounding. Chosen by the user (2026-11-28). |
| D127 | 2026-11-28 | The adjoint of a solve node and of an index-1 DAE: parameter products as EarthSciASTDiff documents, the replay holds the active set, a scale gets no cotangent, and §5.10 written out (spec/adjoint.md §4.6, §5.10; spec/plan.md §6.6). Five gaps found while implementing §4.6 and §5.10, settled by the user (2026-11-28): (1) the toy solves’ unknowns depend only on parameters, so their adjoint needs $g_p^\top \mu$, which no plan carried; when the run config has adjoint, every algebraic operator gets <op>.vjp.esm, EarthSciASTDiff’s vjp product on the parameters axis of its residual document, and <op>.frozen_vjp.esm of its frozen residual document when a bound references a state-free observed, with the products’ input and output names in the plan entry; plans without adjoint are unchanged, and right-hand-side operators’ parameter products stay M4’s (U7), so a planned DAE adjoint is with respect to the initial state; (2) the frozen-tape replay of a bounded solve at perturbed inputs holds the tape’s active set and solves the free rows, rather than re-solving the complementarity problem; (3) the converged $z$ does not depend on the D125 scale, so a scale gets no cotangent and only bounds carry a derivative; (4) Julia’s tangent through a solve is the implicit-function tangent, not the derivative of the iteration; (5) §5.10’s DAE adjoint, which said it would be written out with M4b, is the exact derivative of spec/methods.md §14.2–§14.3 (the Rosenbrock reverse drops $M\mu_i$’s algebraic rows in the $C$ term; ESDIRK solves with $\sigma M - J$) plus the consistent initialization as a §4.6 solve. |
| D128 | 2026-11-30 | Not used. The M4b and M4 drafts both took D128 for their first decision; both renumbered (M4 to D129 and D130, M4b from D131), so no decision has this number. |
| D131 | 2026-11-30 | banded is a per-column banded LU with partial pivoting, over a column storage whose DOFs are level-major inside each column (spec/operator-interface.md §4, §8.3; spec/methods.md §4.2; spec/run-config.md §4.2). The planner has resolved stiff column leaves to banded since M2 (spec/plan.md §5.5.3), but neither runtime implemented it, so no planned implicit column leaf, and no IMEX leaf with an implicit column part, could run. Level-major order (the leaf’s variables innermost) keeps couplings between variables at one level next to the diagonal; species-major order, the lane order of spec/partitioning.md §2.5, would make the band $(n-1)N_v + k_l$ wide. The arithmetic is dense_lu’s restricted to the band, with LAPACK gbtrf’s placement of row exchanges, so the factors and the forward solve equal dense_lu’s on each column’s matrix bitwise (up to the sign of a zero); the transposed solve has its own fixed order and agrees to roundoff; the half-bandwidths come from the band points of the operators that the method differentiates, so they affect storage, never results. Proposed in M4b run 1, awaiting the user’s confirmation (QUESTIONS Q2): column_block plans (U9) choosing specialised line solvers is a later step. |
| D132 | 2026-11-30 | Maps and observed step limits reach the runtime as derived documents, not U6 kernels (spec/plan.md §5.1.5, §6.8; spec/run-config.md §3.2, §4.10, §5; architecture §3.2, §13). The user’s decision of 2026-11-30 (M4b run 1, Q1 option A), as D121 did for residuals and D124 for frozen observeds: a map operator’s <op>.map.esm and an observed limit’s <O>.limit.esm are §6.5’s frozen residual document for their observeds (the map’s sources in target order; the limit observed), so they compile with the stock compiler, keep operator references, and are golden-gated like every other document. A map’s target must be a state of the source’s shape; a parameter target (unsupported_map_parameter_target) and an adjoint through a map (unsupported_map_adjoint, its map document has no Jacobian yet) are refused for now. The macro step under limits and an adaptive subcycle’s substep are specified to the bit (run-config §5): resolution flooring, the tstop, the stop rule, and the reason string (the observed’s name, max, tstop or remaining). |
| D133 | 2026-11-30 | Nested integer offsets fold (spec/plan.md §5.2.3). A column index that is an offset of the row index, recursively +(a, k), +(k, a) or -(a, k) with a an offset and k an integer constant, has the summed offset, exact in 64-bit integers; before, only the one-level forms r ± δ and δ + r were offsets and a nested one covered the axis. Found by the eqice rewrite (2026-11-30): an observed that gathers a neighbour of another gathered observed gives (j + 1) + 1 or ((j - 1) + 1) - 1, which made eqice’s flow operator global although it reaches two cells, and the IMEX split by locality needs it stencil. No golden changes. |
| D134 | 2026-11-30 | A picard solve node pairs its residuals with its unknowns on the frozen structure (spec/plan.md §5.9.4). The diagonal pairs of §5.9.4 are read from a probe in which the node’s freeze observeds are held, as its frozen Jacobian document holds them (§6.5). Found by the eqice rewrite: both SSA residuals read both velocity components on the diagonal through nuH and beta, so the augmenting paths of §5.9.5 paired the x balance with v unless the y balance came first; with nuH and beta frozen each balance reads its own component on the diagonal. The frozen structure is the system the iteration solves, and the adjoint does not depend on the pairing. The singularity test keeps the full structure. Fixture picard_pairing. |
| D135 | 2026-11-30 | A leaf steps per cell only when every array state of its model is over the leaf’s cells (spec/plan.md §5.5.3; spec/run-config.md §8 rule 19). EarthSciAST’s cell lanes need every state a program holds over the lane sets, and a derived document holds every model state (spec/plan.md §6.1.2), so a pointwise leaf over 2-D cells in a model with a 3-D state could not build its lanes in either runtime (found by the eqice rewrite: state age.age is not over the leaf's cells). An omitted or "auto" dt_scope then resolves to global, and an explicit cell or shard is refused (dt_scope_not_local). Lifting this needs lanes that ignore the states a lane program only carries (an EarthSciAST ask). No golden changes. |
| D136 | 2026-11-30 | A solve node’s linsolve may be gmres with an ILU(0) preconditioner (spec/methods.md §15.3). The user’s decision of 2026-11-30 (M4b run 1, Q5 A): eqice’s SSA is a Picard solve of 2 × 31 × 31 unknowns on a stencil, which a dense LU would factor at every iteration. Restarted right-preconditioned GMRES on the compressed-row matrix the exact step factors, ILU(0) on its own pattern (bjacobi_ilu0, one block on one rank), every sum in a fixed order so both runtimes agree bitwise; rtol 1e-12, unrestarted and at most one iteration per unknown by default. With newton.inexact the tolerance is the Eisenstat–Walker term. fallback and other leaf Krylov options stay unimplemented. |
| D137 | 2026-11-30 | converged.rel_change may use PISM’s norm: norm: {"l1_by": X}, the 2-norm over the slices along index set X of each slice’s 1-norm (spec/methods.md §15.2; spec/plan.md §7.1; spec/run-config.md §4.10). The user’s decision of 2026-11-30 (M4b run 1, eqice item 4): PISM’s SSA Picard loop stops when $(\lVert\Delta\nu H_x\rVert_1^2 + \lVert\Delta\nu H_y\rVert_1^2)^{1/2} \le 10^{-4} (\lVert\nu H_x\rVert_1^2 + \lVert\nu H_y\rVert_1^2)^{1/2}$, and a different norm stops at a different iteration, which the Test F comparison would see. l2 stays the default. The planner resolves X to a stride and count over the observed’s column-major elements, so a runtime needs no shapes. Both nuH and beta are frozen (picard.freeze), as PISM lags both. |
| D138 | 2026-11-30 | step.after evaluates step.limits after the leading solve nodes of the root sequence (spec/run-config.md §5, rule 12; spec/plan.md §7.3). The user’s decision of 2026-11-30 (M4b run 1, eqice item 5): PISM computes the time step after the stress-balance solve, from the new velocities; evaluating the CFL limits at the macro step’s start uses the previous step’s velocities. Only solve nodes may come at or before after: a node that advances in time would need the step size before it is known. The leading solves run at $t_a$ and belong to the macro step (their records carry its Δ), so a replay or rerun from the recorded bounds runs the root unchanged. Before the step stays the default. |
| D139 | 2026-11-30 | A recover action may under-relax frozen observeds: {"underrelax_frozen": {"ssa.nuH": 0.8}} (spec/methods.md §15.7). The user’s decision of 2026-11-30 (M4b run 1, eqice item 6): PISM, when its SSA Picard iteration fails, retries with the effective viscosity under-relaxed, $\bar\nu H_k = 0.8, \nu H(u_k) + 0.2, \bar\nu H_{k-1}$, and solves $A(\bar\nu H_k) u_{k+1} = b$; the existing underrelax scales the step in the unknowns instead. The runtimes have no document that evaluates the residual at given frozen values, so the step solves the frozen system with the residual corrected by $(\bar J - J) z_k$, from the frozen Jacobian at both values: exact when the residual is affine in the unknowns with the frozen observeds held, which a picard iteration presumes, and with the same fixed points otherwise. A picard node only; a name outside picard.freeze is name_wrong_kind (rule 2) and on another method unsupported_solve_option. |
| D140 | 2026-11-30 | The initial state with data is built from a derived document, not the model (spec/operator-interface.md §8.4.5). Found by the eqice agent (M4b run 1): run_plan with a data-fed initial state built the whole model with EarthSciAST, whose Rust evaluator refuses the SSA’s implicit equations (unsupported_construct), although the run never evaluates the model as such. Every derived document carries the model’s ic equations and states, and builds (the runtime has already built it), so the first operator’s derived document, with the model’s providers, gives the same initial state. The buffer check of §8.4.2 step 3 is a test, which may still build the model. D139 is the frozen-observed under-relaxation. |
| D141 | 2026-11-30 | Rust’s band check retries a failing entry at a row-scaled step (spec/plan.md §8.2). Found by the eqice agent (M4b run 1): planning the SSA stage from the C++ velocity of the previous step refused validation_band_model_failed on J[u[15,1], u[16,1]], the bands 5.628e7 against central differences from 4.1e7 to 5.7e7 depending on the step. The column’s velocity is about 1e-23 where the field changes sign, beside neighbours near 1e-17, so its step (about 6e-29) is far below the rounding of the row’s cancelling stencil contributions; the differences are rounding, not curvature (they grow as the step shrinks, so the kink fallback’s smaller steps make it worse). The fix differences that column alone at the step it would need to weigh as much as the row’s largest contribution; the tolerance formula is unchanged, so nothing is loosened. Julia’s ForwardDiff check was never affected. The same stage then refused a zero band value, J[u[31,17], v[31,16]], against differences that grew tenfold per tenfold-smaller step: the eqice agent traced it to rounding in an ice-free edge cell whose terms near 5e-6 cancel to -1.4e-11 (grain about 8.5e-22), read in a column near 5e-22; a zero entry takes $M_r$ in place of $ |
| D142 | 2026-11-30 | An adaptive subcycle may give its own resolution, a duration or "none" (spec/run-config.md §4.8; spec/plan.md §7.1). The user’s decision of 2026-11-30 (M4b run 1, eqice finding 6): D132 floored every adaptive subcycle’s substeps at step.resolution, but PISM floors only the macro step; its hydrology substeps are not floored, so eqice’s hydrology subcycle sets "resolution": "none". Omitted, the floor stays step.resolution. |
| D143 | 2026-11-30 | An IMEXEuler leaf with a column implicit part defaults to banded; a column operator’s kl, ku count only bands into the states it writes (spec/plan.md §5.4, §5.5.3). The user’s decision of 2026-11-30 (M4b run 1, eqice finding 2): eqice’s energy and age leaf is written IMEXEuler with imex (implicit column, explicit stencil), and with linsolve omitted the table refused it, the leaf being a stencil leaf. And the eqice agent found its column operator reported kl = ku = 61 because bands into stored fields it only reads (basal_bc, lambda_b) counted; those are held during the step, and the runtime’s banded solve already takes its bandwidth from the leaf’s states, so only the reported structure changes. Fixture toy_column_imex cases imex_default and stored. |
1. Adjoint strategy: tradeoffs
Goal: a full-simulation adjoint, as in reseact. That means the gradient of a scalar functional of the trajectory with respect to parameters, initial state and possibly gridded fields. It must be exact for the trajectory that was actually computed: reseact checks to 1e-11 against a reference, with dot-product and FD gates.
1.1 Parts every option needs
The bulk of reseact’s tools/adjoint_gradient.jl is this machinery, and it is needed whichever way the per-step derivative is produced:
- A step tape. Record the accepted
(t, dt)sequence, the method per leaf, discrete decisions (event times, which maps fired, clamp masks) and forcing epochs. The backward sweep replays this tape with the controller off. - Checkpointing. A per-macro-step state checkpoint costs about 680 kB per step at CONUS 4×5°. At 0.25° a 5-day run would need about 188 GB, so we need multi-level checkpointing (memory plus disk) and revolve-style schedules for long or high-resolution runs.
- Adjoint of composition. The adjoint of
Lie(A, B)isB*thenA*, and Strang, Sequence, Subcycle and Every compose the same way. Splitting is therefore not a problem for discrete adjoints. - Classification and functionals. Parameters are classified as active or inactive, by where each value is consumed. Cost functionals and observation operators are defined over outputs.
- Validation. Dot-product identity per step, FD of the frozen-dt map, and replay-versus-checkpoint consistency.
- Controller derivative. The derivative of the controller (dt as a function of state) is ignored, which is standard. reseact’s forward-sensitivity lane does carry dt tangents.
1.2 The choice: what does automatic or symbolic differentiation see?
| A. Method-level discrete adjoint (AD sees one RHS / Jacobian evaluation) | B. AD through the step (AD sees one whole step; this is reseact) | C. Continuous adjoint (solve the adjoint ODE backward) | |
|---|---|---|---|
| Who writes the step adjoint | The integrator, once per method family: ERK/SSP, Rosenbrock, SDIRK/ESDIRK, BDF, ARK. It is generic over tableaus. | Enzyme generates it for every method automatically. | Nobody; it is method-agnostic. |
| Model primitives needed | f, J·v, vjp_u, vjp_p. Rosenbrock also needs (∂(J·k)/∂u)ᵀλ, a second derivative. Implicit methods also need a structured W and its transpose solve. | Only f. AD differentiates everything else, including the LU and the controller-free step. | vjp_u, vjp_p. |
| Exact for the computed trajectory? | Yes for explicit and Rosenbrock methods. For SDIRK, BDF and nested solves it is exact up to the nonlinear-solve tolerance, via the implicit function theorem (IFT). | Yes, though differentiating Newton iterations is costly and needs custom IFT rules anyway. | No. Consistent only to tolerance, which fails reseact’s gates and is ill-posed with limiters, maps and splitting. |
| Linear algebra in reverse | Reuses the forward factorization: a Wᵀ solve, batched block LU transposed, Krylov on Jᵀ for the SSA. | AD differentiates the elimination itself. reseact’s unrolled blocksolve is reversed elementwise. | Jᵀ solves from a fresh factorization. |
| Nested SSA and DAE constraints | IFT: one transposed sparse solve with g_zᵀ per step. This is the natural fit. | Needs a hand-written IFT rule, so it falls back to A for this piece. | IFT. |
| Rust parity | Full. Primitives come from the compiler and the rest is plain integrator code. | Weak. Rust Enzyme (std::autodiff) is nightly-only and experimental, as far as I know, and the Julia path depends on Enzyme+Reactant. | Full. |
| Toolchain risk | Low. AD or symbolic differentiation only ever sees straight-line RHS code. | High, and documented in reseact: reverse-over-forward segfault, silently wrong Reactant checkpointing, dJ/dp silently vanishing through closures, stablehlo.case with no reverse rule. | Low. |
| Cost evidence | — | reseact: transport VJP is about 19.6× one RHS (XLA recomputes face chains); ssp_vjp compile takes 195 s. | Extra adaptive backward solve plus interpolation of the forward trajectory. |
| Maps, clamps, events | Hand rules: the VJP of a step map, which the compiler can emit since maps are .esm expressions; clamp → mask; event times frozen from the tape. | Automatic. | Event-time jump conditions; hard. |
| Engineering cost | Highest per method family. BDF needs an adjoint of a variable-step linear multistep method, but with the step sizes and orders fixed by the tape it is a known-coefficient recursion. | Lowest per method. Orchestration (§1.1) is still hand-written. | Low, but it misses the goal. |
1.3 Where the model primitives come from (for A)
- EarthSciAST emits them by source-to-source transformation (recommended):
f,jvp,vjp_u,vjp_p,hvpand the structured Jacobian (EarthSciASTDiff bands) from the same expression tree.- This works the same way for Julia, Rust and later Python, and can be conformance-tested.
- Recurrences (
faqsweeps such as Thomas solves or RRTM) need reverse-mode code generation for loops. The compiler has the structure to do that.
- Julia: Enzyme on the compiled RHS only. This is much smaller and more robust than Enzyme on a step.
- Rust:
std::autodiffon the RHS, if it stabilizes.
1.4 Recommendation
- A is the spec’d contract in both languages. IFT is used for every nonlinear and algebraic solve, and EarthSciAST emits the model primitives.
- Julia additionally offers B (Enzyme on a step) for leaves that have no hand adjoint. B also serves as the conformance oracle that checks A’s hand adjoints.
- C is not supported.
- Rosenbrock’s second-derivative requirement is the main extra primitive A needs. For per-cell chemistry it is a small block-local HVP. Where it is unavailable, running SDIRK in adjoint mode avoids it, since SDIRK needs only first derivatives plus transposed solves.
1.5 SciMLSensitivity.jl (formerly DiffEqSensitivity.jl), considered 2026-10-14
Its catalogue is exactly the B and C columns of §1.2, so it cannot supply A:
| Its algorithms | Column | Why not the contract |
|---|---|---|
BacksolveAdjoint, InterpolatingAdjoint, QuadratureAdjoint, GaussAdjoint | C | Continuous: they integrate the adjoint ODE backward over a checkpointed or dense forward solution. |
ReverseDiffAdjoint, TrackerAdjoint, ZygoteAdjoint, EnzymeAdjoint, MooncakeAdjoint | B | AD through the solver’s steps; they require “the pure Julia solvers written generically”, i.e. OrdinaryDiffEq. The Enzyme and Mooncake variants are documented as experimental, explicit-only, and currently failing on most solvers. |
No method-level discrete adjoint exists in it or elsewhere in SciML. What is reused: ReverseDiffAdjoint through OrdinaryDiffEq as the per-family adjoint oracle (D31); SteadyStateAdjoint, the IFT adjoint of a nonlinear solve, as an optional implementation for solve nodes (D32); the ForwardDiffSensitivity(convert_tspan=true) pattern for forward sensitivities with dt tangents (D36). Its callback handling (freeze firing times, differentiate the affect map by AD) matches architecture §9’s rule but is not lifted, since our maps are compiled .esm kernels with band models (U6, U7). Its VJP wrappers are replaced by DifferentiationInterface (D38).
2. Partitioning and parallelism: tradeoffs
2.1 What “every stage is global” loses
If the RHS is one whole-domain function and parallelism lives only inside it, every stage of every leaf touches the whole state and ends in a barrier. The costs:
- One dt per leaf for the whole domain. One stiff cell, such as the pre-dawn NO minimum, rejects the step for every cell. reseact measured its global chemistry dt at about 6× the per-cell ideal in cell-steps.
- Memory and locality. An implicit leaf holds stage vectors and Jacobians for all cells at once. On EqAtmChem d05 that is 6.7M cells × 64² × 8 B ≈ 220 GB of CBM-Z block Jacobians (est.); run per shard, it is O(shard). Each explicit stage also streams the full state through memory, so tiles cannot stay in cache across stages.
- Parallel efficiency is whatever the kernel achieves. In reseact, transport runs on about one core and XLA:CPU parallel efficiency is about 9%. There is a barrier per stage. Load imbalance cannot be rebalanced: chemistry costs 9.6 s/step pre-dawn against 35 s/step at midday.
- No distributed memory. State, checkpoints and I/O share one address space. That rules out WRF d05 with chemistry, and the roughly 188 GB of 0.25° adjoint checkpoints.
- No heterogeneous executors (processes, devices, ranks). reseact needed separate processes because XLA:CPU executions in one process do not overlap.
- Compile cost grows with the domain on tracing backends. reseact’s lesson was that compile and memory must be per tile.
Gained by staying global:
- simplicity;
- boundary conditions and halos are handled once, by the compiler;
- global operators are natural: SSA, iceberg connected components, global norms;
- a single GPU likes large kernels.
2.2 The partition follows each operator’s locality
| Locality | Partition | Halo | Own dt? | Examples |
|---|---|---|---|---|
| pointwise | shards: any set of cells, bucketed by expected cost | none | per shard or per cell | chemistry, deposition, microphysics rates |
| column | sets of columns | none horizontally | per shard | PBL, enthalpy/age, radiation, HEVI vertical |
| stencil | geographic tiles | stencil radius, exchanged per stage | per tile (multirate, later) | advection, level set, SIA, hydrology |
| global | whole domain or a distributed solver | — | — | SSA, connected components, global reductions |
reseact-style stiffness sharding is the pointwise row. We adopt its executor contract from tools/shard_exec.jl:
- species-major layout at the boundary;
- per-shard partial error norms reduced in a fixed order, for determinism;
- per-epoch lane refresh;
- per-shard dJ/dp;
- executors read no driver state.
Executors are threads by default, then processes, devices and MPI ranks. reseact used processes only because of XLA:CPU.
With per-shard dt, the adjoint tape is per shard, so tape memory scales with the number of shards, not cells.
The hierarchy is rank → tile → shard. In shared memory, tiles are index ranges over one global array and the halo “exchange” is a barrier. MPI later replaces this with real exchange, with no change to the leaf algorithms.
What the compiler must provide:
- Pointwise and column partitions: nothing new. reseact’s capacity builds re-instantiate the operator on a lane grid with gathered inputs, at a build cost that depends only on the lane count.
- Exact stencil tiles: a range-restricted RHS that evaluates cells in a range and reads halo cells from a neighbour buffer. Today’s flat
fcannot do this. A tile re-instantiated as a small model would apply boundary stencils at its edges, so it would not match the global run.
3. Compiler contract: inferring strategy from the AST, integrator side
“Option 2” means: EarthSciAST changes only by solver.external. The integrator takes the flattened AST, infers the structure itself, and compiles each piece with the stock compiler. That is how reseact already works:
- flatten;
- EarthSciASTSplitter classifies terms by locality;
- each part is compiled separately;
- EarthSciASTDiff’s band model gives the Jacobian;
- capacity builds give the shards.
3.1 What option 2 gives
- No waiting on spec RFCs.
- Strategy inference becomes a feature, like DifferentialEquations’ default algorithm choice but structure-aware:
- block-diagonal → batched Rosenbrock;
- banded column → block tridiagonal;
- stencil → SSP-RK with a Gershgorin bound on the band Jacobian as the step limit;
- algebraic → Newton–Krylov.
- It fits the .esm philosophy: solver-relevant classes are derived, not declared.
3.2 What it gives up or makes harder
- Authorial intent that structure cannot show.
- Locality separates pointwise, column and stencil terms. It cannot tell radiation from PBL (both column), acoustic from advective (both stencil), microphysics-after-RK, the
radtcadence, or PISM’s 12-step order. - The run config must name these. After flattening, a term’s component can only be recovered from the namespaced variables it references. That usually works, but it fails when a term references two components’ variables.
- Locality separates pointwise, column and stencil terms. It cannot tell radiation from PBL (both column), acoustic from advective (both stencil), microphysics-after-RK, the
- Derivatives come from separately compiled “derivative models”. This is the band-model trick, and it works (reseact).
- It is fragile across versions. reseact’s band model went silently empty after an upstream node rename (aggregate → faq), which is why
validate_plan(about 338 s) exists. Note what that check is: it compares the gather plan against EarthSciASTDiff’s own index maps at one point and refuses an empty Jacobian (rx_sym_block_jac.jl:288-337). It is not a band-versus-derivative value check; no reusable tool for that exists in any sibling repo (EarthSciASTDiff’s ForwardDiff oracle lives only in its test suite), so architecture §3.2 pass 8 is new integrator work. - EarthSciASTDiff fails loudly on filtered
faqnodes and non-+semirings. It has no ∂f/∂(forcing) (D5), and does not list recurrence (column-sweep) support. - Rust has no AD fallback, so the Rust adjoint depends entirely on EarthSciASTDiff coverage.
- It is fragile across versions. reseact’s band model went silently empty after an upstream node rename (aggregate → faq), which is why
- No exact stencil tiling and no MPI (§2.2). Pointwise and column sharding still work.
- Events, algebraic equations and step maps are refused by every fast compiler. The integrator must strip them from the AST and compile the conditions, affects and residuals as separate observed models, in each language.
- Duplication. AST analysis and surgery would be implemented in Julia and in Rust, and later Python, unless it is done once (§3.3).
- Split parts are full-length RHSs over the shared
u. The Splitter produces no DOF subsets, so work is wasted on zeros. This is fixable on the integrator side.
Unavoidable even under option 2:
solver.external;- a public, thread-safe RHS entry point in Rust: today
debug_eval_rhsis#[doc(hidden)]andEsmProblemis built onRc/RefCell; - Float32 integration not being refused (WRF).
Cheap additions that recover most of the loss:
- a per-term provenance tag carried through flatten (fixes 1);
- a range-restricted RHS (fixes 3).
3.3 Proposal: a planner that writes artifacts
Structure inference runs once, in a planner, which writes portable artifacts:
- a resolved run config: an explicit schedule, inspectable and editable, and the file
solver.externalcan point to; - derived
.esmdocuments: split parts, Jacobian and VJP band models, residual models for algebraic constraints, and event-condition models.
Both runtimes consume these artifacts. Inference is implemented once, and the runtimes stay thin and conformance-testable.
Superseded by D8: the planner is implemented in both languages. The artifact boundary stays, as the conformance seam: both planners must produce equivalent plans for the same document.
4. GPU via XLA: tradeoffs
Feasibility. Writing the integrator’s kernels in XLA works, and has been done:
- reseact’s
tools/reactant_handoff/rx_traced_integrator.jlalready runs SSPRK43, Rosenbrock23 (with the batched 13×13 block solve), the PI controller and adaptivewhileloops as one XLA program per macro step. - Both EarthSciAST bindings already emit the RHS as XLA. Julia emits StableHLO through Reactant. Rust uses
XlaBuildervia the opt-inxla0.4 crate (simulate_array/tape/xla_emit.rs, 2,121 lines), which links a 144 MB prebuiltxla_extension.
So a whole leaf step, RHS plus stages plus linear solves plus controller, can be one XLA program on CPU or GPU. No XLA↔CUDA buffer interop is needed.
What fits XLA’s static-shape, data-parallel model:
- explicit RK stages;
- Rosenbrock and SDIRK stages with per-cell LU, unrolled over the n×n entries and vectorized across lanes (reseact’s
blocksolve); - column Thomas sweeps (a loop over levels);
- error norms, PI control and fixed-tree reductions;
- Newton and Krylov
whileloops. These run forward only, since D4 never reverse-differentiates through them.
What is awkward:
- Lane pools need a fixed lane capacity and refill in masked chunks; finished lanes idle until the chunk ends. reseact’s masked device loop wasted 20–28%.
- Dynamic re-sharding works if the composition is a runtime gather-index input rather than a shape, so nothing recompiles.
- MPI halos and distributed Krylov. XLA has no MPI. The options are:
- split programs per stage and exchange halos on the host — reseact warned these round trips “would DOMINATE on an A100/H100”;
- XLA collectives (
collective-permute, all-reduce) — fine across one node’s GPUs; multi-node needs PJRT’s distributed runtime.
- Determinism (D10) needs XLA’s deterministic-ops mode on GPU. reseact also hit a data race on XLA:CPU (one NaN in about 2,000 calls).
Measured costs (reseact):
- On CPU, XLA was 2.8× slower than native Julia, had about 9% parallel efficiency, and a roughly 3 ms per-call floor.
- Compiles took minutes per program. Pathological ones ran for hours or exhausted memory (HloCSE, LLVM section memory). Compiling per tile bounds this.
- Upstream bugs: miscompiles, and
@compiledonating input buffers.
Effort by language:
- Julia: trace generic kernel code with Reactant; reseact’s integrator is a working template. One source that is both fast native code and traceable is possible but may be suboptimal for one of the two.
- Rust: build programs op by op with
XlaBuilder. This is more verbose, but EarthSciAST’s tape→XLA emitter is precedent.
Recommendation.
- Keep native kernels for CPU (D11).
- Give the integrator’s kernel-primitive layer an XLA lowering for GPU: each leaf step becomes one XLA program, and the host is touched only at macro-step and epoch boundaries and for MPI.
- Accept these rules on the XLA path: fixed lane capacity, composition as gather indices, per-tile programs, deterministic-ops mode, and XLA collectives within a node.
5. Open questions
- The GPU hardware target (D28 keeps both kinds viable).
6. Alternatives recorded but not adopted (2026-10-14 review)
- Sequence the Rust planner after the Rust runtime. The plan artifact is the seam, so the Rust runtime could consume Julia-produced
plan.jsonand derived documents until a Rust planner lands (after M5), with D8 as the end state. Not adopted; D8 and M2 stand as written. Recorded in architecture §15 as the fallback if planner effort threatens M3. - A separate, later Rust M4 gate. Rust’s Rosenbrock adjoint depends on U10 W0 → U7, U8, U9 (filtered
faq) → U12, six upstream RFCs, while Julia’s M4 can use the Enzyme-on-RHS fallback. Not adopted as a milestone change; recorded in architecture §15 risk 3 so that a Rust slip does not hold the Julia gate. - Wrapping OrdinaryDiffEq per leaf for the forward pass of stencil, column and global leaves on Julia’s native path. Rejected for the same reasons as D31 (the adjoint would have to read OrdinaryDiffEq cache internals), but it remains the fastest route to a forward-only M3 transport leaf if M1 slips.
7. Data inputs: tradeoffs (D87, 2026-11-02)
The problem. Real models read gridded data. reseact.esm reads GEOS-FP meteorology (GEOSFP.PBLH, GEOSFP.CLDTOT, winds, temperature and more) as parameters with a data update (esm-spec §5.4, §8.5), mapped by param_to_var onto shaped parameters with a leading two-record axis (Transport3D.F_PBLH[gf_t, gf_lat, gf_lon]) that the model blends in time with a weight it computes from t. Until D87, M2 refused every such model (unsupported_parameter_update, D75), and spec/operator-interface.md §8.1 said derived documents carry no data providers. So pass 8’s checks and §5.5.2’s stiffness bound had no values for these parameters, and a runtime building an operator from derived documents had no way to give its right-hand side time-varying fields. No fixture or toy problem had a data input, so none of this was exercised, and it stops the reseact.esm planner smoke test.
What EarthSciAST already gives. rhs_program takes forcing as an argument: every parameter whose update has from (or a handler) is a forcing slot, a 0-d slot for a scalar, out of the scalar parameter vector; a forcing set is immutable and carries an epoch stamp; refresh is a swap (API_SPEC §5.8). Data providers are always the caller’s: no binding fetches from data_sources on its own (Julia providers, Rust ProblemOptions::providers, the EarthSciIO adapters opt-in). EarthSciASTDiff’s forcing axis takes the forcing set as a list of names (esm-jacobian-spec §4.3) and already uses the leading record axis convention. EarthSciIO’s PrefetchGroup gives the epoch boundaries. The planner half uses these as they are, and needed two upstream fixes to stop patching documents (spec/plan.md §10 items 16, 17, resolved by EarthSciAST#634 and EarthSciASTDiff#55). The runtime half rests on upstream work that arrived on 2026-11-02 and on what is still missing (§10 items 18–22, §7.3 below).
7.1 How a data-fed parameter appears in a derived document
| Option | For | Against | |
|---|---|---|---|
A. A data-fed parameter with a stub data source (update with source and file_variable; one data_sources entry per source whose url_template is the substitution-led {esm_integrator_forcing}) | Both bindings already make it a forcing slot; nothing about locations or records enters the plan; byte-stable, since the template is left unchanged at load; the plan stays valid against a mirror or a local copy of the data | The planner writes the declaration itself (two upstream gaps), and a reader may mistake the stub for a real source | adopted |
B. Copy the model’s data_sources and the full update | Self-contained documents | EarthSciAST resolves a relative url_template to an absolute file:// URL at load, which then reaches the goldens (spec/plan.md §2.1 forbids absolute paths); a relative one would also resolve against derived/, the wrong directory; two copies of where the data is, which can drift | rejected |
C. A plain parameter, built with runtime_array_parameters | No update or stub | That option makes every shaped parameter a run-time slot, so genuinely constant arrays are no longer folded at build (reseact relies on folding its NEI regrid); a data-fed scalar would land in $p$, not in the forcing set | rejected |
| D. A constant state of the leaf (spec/operator-interface.md §1’s “state an operator reads but no operator writes”) | Reuses an existing mechanism | Puts the meteorology into the state vector, the tape and the canonical DOF order; EarthSciASTDiff would differentiate with respect to it as a state; the two-record buffers are not states | rejected |
| E. Keep refusing data until M3 | Nothing to specify now | The M2 reseact.esm smoke test cannot run | rejected |
7.2 What the planner’s checks evaluate data at
| Option | For | Against | |
|---|---|---|---|
| A. Synthetic values from D70’s SplitMix64 stream at sample index $s + 3$, around the parameter’s nonzero default (a used parameter without one is refused) | Deterministic and equal in both languages with no RNG; no file read, so tier 1 goldens need no data; the checks (rhs_sum, band_model) are identities that hold at any finite input; records of a bracket differ, so the time blend is exercised | The values are not physical: a model whose right-hand side is undefined at magnitudes near 1 (a logarithm of a ratio below zero, say) would fail a check that real data would pass; the Gershgorin stiffness bound at these values means nothing | adopted, with stiffness rule 4 refused rather than guessed; falling back to a base of 1 when there is no default was proposed and rejected in review (2026-11-02): a value of order 1 for a pressure or a boundary-layer height is not a scale, so the model must state one |
| B. The real data at the run’s start | Realistic magnitudes, so the Gershgorin bound would mean something | The plan then depends on the data files and their decoding in two languages; goldens would need data files; a plan is no longer a function of the model, the run config and the interval | rejected |
| C. The parameters’ defaults | Simple | reseact’s are 0.0 or absent: the checks would pass vacuously on zero coefficients, and a parameter without a default cannot be evaluated at all | rejected |
D. Representative values in the run config (a new key, say forcing_samples: {"GEOSFP.PBLH": 1000}) as the sampling base | Physical magnitudes when the author gives them; would let rule 4 classify | A new run-config key and rule; the author must know what the bound needs | not adopted (2026-11-02); compatible with A if wanted later |
7.3 How the runtime supplies data
The forcing set becomes the last argument of every operator call at M2 (spec/operator-interface.md §8.4). The runtime owns the data: it builds providers from the model’s own data_sources (not from the derived documents), turns a sample into a buffer exactly as esm_problem does, and swaps one immutable set per forcing epoch; steps never cross an epoch, and time interpolation stays the model’s (D5’s per-record gradients rely on the model’s blend being explicit). Rejected: interpolating in time in the runtime (it would put a second, hidden blend beside the model’s own, and break D5’s accumulation per record); giving each operator its own provider (several decodes of one field per epoch); passing data through $p$ (only scalars, and it would change the parameter vector’s length with the data).
Locating the data. The model locates it: url_template resolves relative to the model’s file (esm-spec §8.2.1), so a plan runs wherever the model and its data sit together. Rejected: naming data files in the run config (a second declaration of what the model already declares, which can disagree with it) or in the plan (the plan would carry paths, which §2.1 forbids, and go stale when data moves). Cache directory, offline mode and URL overrides are run-time options of the runtime’s API: they change where bytes come from, never what is computed.
What the runtimes call (spec/operator-interface.md §8.4.2): EarthSciAST’s providers_from_document (Julia, from its EarthSciIO extension; Rust, feature esio), built on EarthSciIO’s constructor of a provider from a document’s data_sources entry; provider_sample / CadenceProvider::refresh at each epoch; EarthSciAST’s public sample-to-buffer conversion; EarthSciIO’s refresh times for the epochs. The proposal had the runtimes write a small data layer of their own over a subset of esm-spec §8; review (2026-11-02) chose the full feature set instead, through EarthSciAST and EarthSciIO, so that a planned run and EarthSciAST’s solve read the same numbers by construction and reseact runs end to end at M2. The cost is that M2’s runtime half waits for the upstream work below. Rejected as well: building the original model’s whole esm_problem with providers and copying its forcing_buffers at each epoch, which compiles the whole model’s right-hand side only to read its buffers, and whose refresh is a solver callback, not a call a runtime can make at an epoch boundary.
Upstream work (spec/plan.md §10 items 16–22, as of 2026-11-02):
- Arrived: EarthSciAST#636 (
update.from.records_per_sample, overriding the source’stemporal.records_per_sample, reported inloader_fields;metadata.esio_formatdefined in esm-spec §8.1.1), #632 (forcing_bufferin Julia and Rust, which does not applyunit_conversionbecause providers already do), #634 (afterparam_to_varthe source’s declaration survives, so defaults go on sources), #635 (providers_from_documenton EarthSciIO’s document constructor in all three languages); EarthSciIO#27–#30 (esm templates with substitutions and mirrors, exact calendar cadences, document-built providers, a Rust CSV reader); EarthSciASTDiff#55 (the evaluation document keepsdatarules and their sources). - Still missing: #635 does not pass
records_per_samplethrough yet; nojsonreader in any language; the file’s own time axis is used only in Python;determinismis not checked; providers have notime_originshift, so the runtimes convert; and three Rust EarthSciAST bugs (rhs_programmisses array-default data-fed parameters as forcing slots, may return defaults instead of data with qualified provider keys depending on map order, and samples discrete providers only when a solve starts).
7.4 Milestone
Both halves are M2 (decided 2026-11-02, amending D75; the proposal had the runtime half at M3), with the full data layer: the planner half for the reseact.esm smoke test, the runtime half so that a planned run reads data end to end, reseact included, gated by data_decay, data_monthly and data_points (spec/toy-problems.md §4.4–§4.6). M3 keeps reseact’s forward run at scale, shards and lanes, which take forcing slices per lane (architecture §7.3). M4 adds forcing derivatives (U7, U8); M5 rank windows, forcing halos and asynchronous prefetch (U11).
7.5 Questions settled in review (2026-11-02)
First round: the stub data source is accepted; Gershgorin stiffness on operators that read data is refused; a used data-fed parameter without a nonzero default is refused (forcing_without_scale), not sampled around 1; band-value files list forcing values; the two derived-document gaps (§10 items 16, 17) are fixed upstream, with the planner’s patches as the fallback; both halves are M2. Second round: the two-record request and esio_format become esm fields (the run-config forcing.records stand-in is dropped, not kept as a fallback, since the planner and the runtimes read the model’s field); the full data layer is M2’s, through EarthSciAST and EarthSciIO; a file variable’s dimensions map onto a parameter’s by position, as esm_problem does; data identity is recorded in the run’s report, never in plan.json.
Third round, a review of the pull request (2026-11-03), fixed inconsistencies without changing the design: (1) only used data-fed parameters reach the plan: the plan’s forcing lists them, an operator’s derived documents declare as forcing inputs only the parameters in its forcing (another used one, which only ic equations read there, is a plain parameter at its default; an unused one is not declared), so a program’s forcing slots are the data it reads, the runtime builds no provider for data nothing reads, and band-value files list only the canonical forcing order; (2) the set a call takes is chosen by the call’s $t$, so a stage at exactly an epoch’s end reads the next epoch (architecture §7.5), and $F$ is constant on each step’s half-open interval rather than over the closed step, which a two-record blend with a $\mathrm{frac}$ weight needs to be continuous; (3) a refresh time at $t_f$ starts a last epoch that the stages at $t_f$ read, so its records must exist; (4) epochs and forcing_refresh_not_hit follow the parameters operators read, and a parameter only an ic equation reads is sampled once, at $t_0$; (5) a run’s initial state evaluates such an ic equation with the data at $t_0$, from EarthSciAST’s esm_problem with the providers, as EarthSciAST’s own solve does, while the planner’s $u_0$ keeps defaults (spec/operator-interface.md §8.4.5); (6) the wrt prefixes params: and fields: exclude data-fed parameters, which match forcing: only; (7) every call’s forcing argument is written into spec/operator-interface.md §3 and §8.3; (8) forcing_records_invalid covers only a temporal block that is not time-varying, since EarthSciAST already refuses a missing block and a record axis not of size 2 at load, and its fixture was changed to match; (9) run-config’s rule-16 paragraph no longer lists the data refusals.