Skip to content

Pure step, record markers and the first part of the redesign - #907

Merged
seabbs-bot merged 38 commits into
mainfrom
claude/amazing-shannon-6nrow8
Dec 1, 2026
Merged

seabbs-bot merged 38 commits into
mainfrom
claude/amazing-shannon-6nrow8

Conversation

@seabbs-bot

@seabbs-bot seabbs-bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

The first part of the redesign tracked in #921.

  • Pure step. A modifier is step(m, θ, v, s) -> (v′, s′), with an optional init(m, θ, history) and an optional step_pullback.
    θ holds the modifier's fields, read at the stratum and time of the step.
    The local derivative comes from one dual-number pass over (v, s, θ), so a modifier needs no hand-written rule.
    ForwardDiff becomes a dependency and its extension is removed.
  • Record markers. record takes Pressure(), Trace() and Resume(), and the call returns y with a field for each, in the order state, pressure, trace.
  • Kernel-free recurrence. Recurrence(; coupling, modifiers) is a recurrence with a unit kernel.
  • Unbounded share. Share(; bounded = false) takes a share with no upper bound.
  • Reactant result rows for the new record scenario, and a check of the package inside Wren models under benchmark/wren/.
  • README: the opening bullets state the motivation without naming the API.
  • NEWS.md is removed; release notes live on the release.

Tested

Locally, on the commit before the record markers were merged:

  • unit suite on Julia 1.11 and 1.13: 40,643 pass;
  • quality suite: pass;
  • Enzyme reverse, split across processes: 14,982 pass, 5 broken (two scenarios listed as an upstream Enzyme bug, as on main);
  • docs build: pass;
  • changed lines covered: 570 of 572, the last two then tested;
  • interleaved benchmarks against main: at parity (median ratio 1.00).

On later commits:

  • CI unit job with the record markers: 7,839 pass after one prose fix;
  • interleaved evaluation benchmarks at 21fb0bb against main: median ratio 0.99, range 0.88 to 1.07;
  • downstream: BVDOutbreakSize fast suite 60,683 pass on ba05903; ComposableTuringIDModels runs unchanged.

Not yet confirmed

Follow-up work is in the PRs listed on #921.

https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s


Generated by Claude Code

A device sparse coupling whose array package gives it no conversion to
CSR (COO or BSR) was stored as given and ran through generic sparse
products. Building a Recurrence with one is now an ArgumentError that
names the type and says to convert to CSR. CSC is still converted
through the array package's own csr_type.

Part of #834.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
Part of #281.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
The bullets no longer name the API, tooling or benchmark figures, which
the performance page holds. The home-page link rewrites for the links
they carried are removed with them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
@seabbs-bot
seabbs-bot requested a review from seabbs as a code owner November 30, 2026 18:28
seabbs-review-bot[bot]

This comment was marked as resolved.

@seabbs-review-bot seabbs-review-bot Bot added the llm-reviewed Reviewed by seabbs-review-bot label Nov 30, 2026
…ME bullet

The refusal of a form with no CSR conversion is tested with stubs in
gpu_arrays.jl, so the conversion item no longer repeats the condition.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
@github-actions

Copy link
Copy Markdown
Contributor

Try this Pull Request!

Option 1: Julia Package Manager

Open Julia and type:

import Pkg
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/EpiAware/ComposableRecurrences.jl", rev="claude/amazing-shannon-6nrow8")
using ComposableRecurrences

Option 2: Local Checkout

If you have the repo locally:

git checkout claude/amazing-shannon-6nrow8
julia --project=. -e "using Pkg; Pkg.instantiate()"

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark comparison vs base

Minimum time per call. Buckets are PR time as a % of base, so lower is faster (🟢 faster, ⚪ within 5%, 🔴 slower). Counts of benchmarks per bucket:

Group 🟢 <50% 🟢 50–75% 🟢 75–95% ⚪ 95–105% 🔴 105–125% 🔴 125–150% 🔴 >150%
Evaluation · · · 1 1 2 13
ForwardDiff · · · 2 2 5 5
Mooncake reverse · · · · · · 14
Enzyme reverse · · · · · 6 8
Evaluation — 17 benchmarks (by time change)
Benchmark base PR time memory
Evaluation / Matrix random_walk T30_L1_S1 50.0 ns 100.0 ns 🔴 2.0× ⚪ 1.0×
Evaluation / Matrix bvd_patches_call T200_L20_S5 30.27 μs 60.08 μs 🔴 1.99× ⚪ 1.0×
Evaluation / Matrix strata_mixing T200_L20_S5 15.05 μs 29.46 μs 🔴 1.96× ⚪ 1.0×
Evaluation / Matrix tv_piecewise_renewal_primary_k5 T200_L20_S1 3.28 μs 6.28 μs 🔴 1.92× ⚪ 1.0×
Evaluation / Matrix renewal T200_L20_S1 1.84 μs 3.53 μs 🔴 1.91× ⚪ 1.0×
Evaluation / Matrix bvd_patch T200_L20_S5 22.55 μs 42.68 μs 🔴 1.89× ⚪ 1.0×
Evaluation / Matrix tv_piecewise_primary_k5 T200_L20_S1 1.11 μs 2.1 μs 🔴 1.89× ⚪ 1.0×
Evaluation / Matrix delay_fixed T200_L20_S1 380.0 ns 711.0 ns 🔴 1.87× ⚪ 1.0×
Evaluation / Matrix overview T200_L20_S3 9.84 μs 17.91 μs 🔴 1.82× ⚪ 1.0×
Evaluation / Matrix bvd_patches_call T200_L20_S1 10.71 μs 18.22 μs 🔴 1.7× ⚪ 1.0×
Convolution body / package 210.3 ns 347.9 ns 🔴 1.65× —
Evaluation / Matrix tv_piecewise_secondary_k5 T200_L20_S1 902.0 ns 1.48 μs 🔴 1.64× ⚪ 1.0×
Evaluation / Matrix bvd_renewal_call T200_L20_S1 5.65 μs 8.58 μs 🔴 1.52× ⚪ 1.0×
Evaluation / Matrix conv_fixed T200_L20_S1 1.53 μs 2.15 μs 🔴 1.41× ⚪ 1.0×
Convolution body / BLAS axpy per lag 579.9 ns 772.1 ns 🔴 1.33× —
Evaluation / Matrix tv_piecewise_renewal_secondary_k5 T200_L20_S1 3.49 μs 4.2 μs 🔴 1.2× ⚪ 1.0×
Convolution body / native axpy per lag 465.9 ns 488.8 ns ⚪ 1.05× —
AD gradients — 42 benchmarks (by time change)
Benchmark base PR time memory
AD gradients / Matrix strata_mixing T200_L20_S5 / Mooncake reverse 64.81 μs 132.84 μs 🔴 2.05× ⚪ 1.0×
AD gradients / Matrix strata_mixing T200_L20_S5 / Enzyme reverse 41.21 μs 82.66 μs 🔴 2.01× ⚪ 1.0×
AD gradients / Matrix bvd_patch T200_L20_S5 / Mooncake reverse 81.77 μs 155.13 μs 🔴 1.9× ⚪ 1.0×
AD gradients / Matrix bvd_patches_call T200_L20_S5 / Mooncake reverse 106.93 μs 196.98 μs 🔴 1.84× ⚪ 1.0×
AD gradients / Matrix bvd_patches_call T200_L20_S1 / Mooncake reverse 37.71 μs 69.31 μs 🔴 1.84× ⚪ 0.99×
AD gradients / Matrix bvd_patches_call T200_L20_S5 / Enzyme reverse 78.02 μs 139.6 μs 🔴 1.79× ⚪ 1.0×
AD gradients / Matrix random_walk T30_L1_S1 / Enzyme reverse 130.0 ns 230.0 ns 🔴 1.77× ⚪ 1.0×
AD gradients / Matrix renewal T200_L20_S1 / Mooncake reverse 8.67 μs 15.21 μs 🔴 1.75× ⚪ 1.0×
AD gradients / Matrix overview T200_L20_S3 / ForwardDiff 1.86 ms 3.25 ms 🔴 1.75× ⚪ 1.0×
AD gradients / Matrix overview T200_L20_S3 / Mooncake reverse 40.48 μs 70.84 μs 🔴 1.75× ⚪ 1.0×
AD gradients / Matrix bvd_patch T200_L20_S5 / Enzyme reverse 59.82 μs 104.07 μs 🔴 1.74× ⚪ 1.0×
AD gradients / Matrix overview T200_L20_S3 / Enzyme reverse 28.53 μs 49.06 μs 🔴 1.72× ⚪ 1.0×
AD gradients / Matrix random_walk T30_L1_S1 / Mooncake reverse 641.0 ns 1.1 μs 🔴 1.72× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_renewal_secondary_k5 T200_L20_S1 / Mooncake reverse 13.39 μs 22.51 μs 🔴 1.68× ⚪ 1.0×
AD gradients / Matrix renewal T200_L20_S1 / Enzyme reverse 4.99 μs 8.3 μs 🔴 1.66× ⚪ 1.0×
AD gradients / Matrix bvd_patches_call T200_L20_S1 / ForwardDiff 970.54 μs 1.61 ms 🔴 1.66× ⚪ 1.0×
AD gradients / Matrix delay_fixed T200_L20_S1 / Mooncake reverse 6.51 μs 10.65 μs 🔴 1.64× ⚪ 1.0×
AD gradients / Matrix bvd_patches_call T200_L20_S1 / Enzyme reverse 28.32 μs 46.33 μs 🔴 1.64× ⚪ 1.0×
AD gradients / Matrix bvd_renewal_call T200_L20_S1 / Mooncake reverse 17.06 μs 27.83 μs 🔴 1.63× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_primary_k5 T200_L20_S1 / Mooncake reverse 9.98 μs 16.17 μs 🔴 1.62× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_renewal_primary_k5 T200_L20_S1 / Mooncake reverse 16.27 μs 26.32 μs 🔴 1.62× ⚪ 1.0×
AD gradients / Matrix conv_fixed T200_L20_S1 / Mooncake reverse 7.33 μs 11.67 μs 🔴 1.59× ⚪ 1.0×
AD gradients / Matrix bvd_patch T200_L20_S5 / ForwardDiff 9.03 ms 13.79 ms 🔴 1.53× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_secondary_k5 T200_L20_S1 / Mooncake reverse 9.9 μs 14.98 μs 🔴 1.51× ⚪ 1.0×
AD gradients / Matrix bvd_patches_call T200_L20_S5 / ForwardDiff 31.89 ms 48.17 ms 🔴 1.51× ⚪ 1.0×
AD gradients / Matrix bvd_renewal_call T200_L20_S1 / ForwardDiff 543.3 μs 818.59 μs 🔴 1.51× ⚪ 1.0×
AD gradients / Matrix bvd_renewal_call T200_L20_S1 / Enzyme reverse 12.58 μs 18.89 μs 🔴 1.5× ⚪ 1.0×
AD gradients / Matrix strata_mixing T200_L20_S5 / ForwardDiff 7.38 ms 10.98 ms 🔴 1.49× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_renewal_primary_k5 T200_L20_S1 / Enzyme reverse 11.34 μs 16.8 μs 🔴 1.48× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_renewal_primary_k5 T200_L20_S1 / ForwardDiff 422.24 μs 609.18 μs 🔴 1.44× ⚪ 1.0×
AD gradients / Matrix random_walk T30_L1_S1 / ForwardDiff 1.32 μs 1.83 μs 🔴 1.39× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_renewal_secondary_k5 T200_L20_S1 / Enzyme reverse 9.03 μs 12.51 μs 🔴 1.39× ⚪ 1.0×
AD gradients / Matrix delay_fixed T200_L20_S1 / Enzyme reverse 1.94 μs 2.66 μs 🔴 1.37× ⚪ 1.0×
AD gradients / Matrix delay_fixed T200_L20_S1 / ForwardDiff 240.16 μs 322.63 μs 🔴 1.34× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_secondary_k5 T200_L20_S1 / Enzyme reverse 6.12 μs 8.1 μs 🔴 1.32× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_primary_k5 T200_L20_S1 / Enzyme reverse 6.95 μs 9.04 μs 🔴 1.3× ⚪ 1.0×
AD gradients / Matrix conv_fixed T200_L20_S1 / Enzyme reverse 1.86 μs 2.35 μs 🔴 1.26× ⚪ 1.0×
AD gradients / Matrix conv_fixed T200_L20_S1 / ForwardDiff 206.25 μs 258.01 μs 🔴 1.25× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_primary_k5 T200_L20_S1 / ForwardDiff 402.71 μs 479.59 μs 🔴 1.19× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_secondary_k5 T200_L20_S1 / ForwardDiff 396.14 μs 469.8 μs 🔴 1.19× ⚪ 1.0×
AD gradients / Matrix tv_piecewise_renewal_secondary_k5 T200_L20_S1 / ForwardDiff 567.54 μs 593.93 μs ⚪ 1.05× ⚪ 1.0×
AD gradients / Matrix renewal T200_L20_S1 / ForwardDiff 350.73 μs 351.36 μs ⚪ 1.0× ⚪ 1.0×

@github-actions

Copy link
Copy Markdown
Contributor

📖 Documentation preview is ready!

View the docs for this PR at: https://EpiAware.github.io/ComposableRecurrences.jl/previews/PR907/

This preview will be updated automatically when you push new commits.

claude added 10 commits December 1, 2026 00:50
A modifier that acts on each stratum or group is written as
step(m, θ, v, s), with init(m, θ, history) and an optional
step_pullback. θ holds the modifier's fields, each parameter read at the
stratum and time, so the rule differentiates the step with one
forward-mode pass over (v, s, θ) and never rebuilds the type.

Transform and the depletion forms Hazard, Floor and Truncate are pure
steps. A coupling or modifier written with forward! takes the rule with
a pullback! or islinear, and plain AD otherwise.

ForwardDiff is a dependency: the dual-number code moves from its
extension into src, and the struct-rebuild fallback, the rebuilds field
and the widths of _fit go.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
Adds test/unit/pure_step.jl: a pure step against a hand loop, its rule
against ForwardDiff for each parameter form, group steps, ties, single
precision, a depletion form, the step check of PieceInterface and
JLArrays with scalar indexing off. Test modifiers without a pullback!
become pure steps, and the items that pinned the fallback's internals
go. The AD fixtures write their pointwise modifiers as pure steps where
the package has them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
The first example of Writing new types is a struct with init and step,
its optional step_pullback, and a group step. Adjoints and backends
replaces the fallback table with the two-row rule and describes the
local derivative. The benchmark modifier is a pure step, and
benchmark/step_pullback_ab.jl times a rule with step pullbacks hidden.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
Timed against the local derivative on Mooncake and Enzyme reverse, in
alternating fresh processes, the step pullbacks of Floor and of
Transform's +, * and clamp show no gain, so they go. Truncate's is
1.17 to 1.22 times faster and stays. Hazard's shows no gain in time but
stays for the empty pool, where a dual pass multiplies the zero pool by
the infinite slope of its power.

Also fixes what the full suite and the quality checks found: test and
fixture modifiers that relied on the rebuild fallback become pure
steps, the AD registry lists the scenarios that take plain AD by
design, and the dual-number helpers pass Aqua and ExplicitImports.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
Its coupling has no pullback!, so its call takes plain AD on both
reverse backends.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
The modifier holding a tuple of 35 or 40 active scalars takes the rule
again, with its local derivative in two passes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
…init on a device

The step check of PieceInterface changes the modifier's own float
parameters while holding θ and asks for the same result, so a step that
reads a field instead of θ fails rather than giving a zero gradient.

A pure step's init reverses per stratum or group as its step does, in
order on the host and as a kernel on device arrays, so a pure step with
an init and array parameters takes the rule on a device.

The docs navigation file is the kit's again, and the forms page says how
to write a form whose power of the pool is zero at an empty pool.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
A stateless step is chosen by dispatch, so the analysis does not narrow
the modifier to the built-in stateless types, and init has a method for
a type no modifier has, so its method table is not empty.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s

Copy link
Copy Markdown
Collaborator Author

Scope change: this branch now also carries stage 1 of the piece-interface redesign, stacked on the small fixes above and on current main.

It was pushed here so the work is not lost with the build container; it is not yet fully verified and should not be merged as it stands.

What stage 1 adds:

  • A piece can be written as a pure step with its parameters as data: step(m, θ, v, s) -> (v′, s′), with optional init and step_pullback.
  • The package takes the step's local derivative with one dual pass, so such a piece takes the rule without a hand pullback.
  • Transform and the Hazard, Floor and Truncate forms use it.
  • The rebuild fallback (src/adjoints/fallbacks.jl) and the ForwardDiff extension are removed; ForwardDiff becomes a dependency.
  • Couplings and whole-step pieces without a pullback! take plain AD for now.

Verified so far: the non-AD suite and quality checks before the rebase onto main.
Still to do: the full AD jobs after the rebase, the docs build, and GPU runs.
The PR description will be rewritten once that is done.


Generated by Claude Code

…ures

The rule called directly on a recurrence with a part that has no
pullback throws an ArgumentError naming the part, where it failed with
a MethodError inside a step. The device rule fixtures without a
pullback are pure steps. The chunked dual pass and the init pass take
their running cotangents through helpers, so no closure captures a
reassigned variable.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s

Copy link
Copy Markdown
Collaborator Author

CI on 74bc387, for the record:

  • ad / ReverseDiff (compiled): 13 failures in "Convolution transpose of normalised increments of a table, entry by entry". Not from this PR: main at 7b6a4ee fails the same job with the same 13. Filed as ReverseDiff compiled tape gives wrong values for the transpose of normalised table increments #913.
  • opencl, JET (Julia 1.12) and unit (Julia 1.11): caused by the stage 1 commits on this branch (device fixtures without a pullback, two closures in the new dual pass, and the dual pass not inferring on 1.11). Fixes are in progress and will be pushed together.
  • The benchmark comparison shows the branch slower in most groups. It is being checked locally against main with an A/A before anything is concluded.

Generated by Claude Code

…1.11

The matrix coupling's first column now assigns and the rest accumulate.
With ForwardDiff loaded when the package precompiles, the zeroing pass
compiled to a library memset call, which costs more than the loop at a
few strata (5 to 15% of a coupled run).

The dual pass hands its tag to the closures as a static parameter: a
closure that captures a type as a value does not infer it on Julia 1.11.

The A/B script also times ForwardDiff gradients and the primal.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.78378% with 83 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/adjoints/local.jl 92.53% 18 Missing ⚠️
src/interface/canonical.jl 81.05% 18 Missing ⚠️
src/interface/duals.jl 84.37% 15 Missing ⚠️
src/interface/declarations.jl 82.85% 12 Missing ⚠️
src/modifiers/transform.jl 76.19% 5 Missing ⚠️
src/operators/recurrence.jl 96.66% 3 Missing ⚠️
src/depletion/truncate.jl 90.00% 2 Missing ⚠️
src/parameters/recent.jl 0.00% 2 Missing ⚠️
ext/ComposableRecurrencesEnzymeExt.jl 0.00% 1 Missing ⚠️
src/adjoints/adjoints.jl 66.66% 1 Missing ⚠️
... and 6 more
Flag Coverage Δ
ad-forwarddiff 38.75% <26.82%> (-0.34%) ⬇️
ad-mooncake-forward 50.84% <39.34%> (+<0.01%) ⬆️
ad-reversediff 39.91% <27.06%> (-0.32%) ⬇️
unit 96.16% <95.90%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/adjoints/executor.jl 94.88% <ø> (ø)
src/couplings/builtin.jl 99.50% <100.00%> (+0.02%) ⬆️
src/depletion/pool.jl 94.11% <ø> (-0.01%) ⬇️
src/interface/trace.jl 88.46% <ø> (ø)
src/kernels/computed.jl 93.38% <ø> (ø)
src/modifiers/allocate.jl 95.92% <ø> (+0.76%) ⬆️
src/operators/convolution.jl 96.91% <ø> (ø)
src/operators/pressure.jl 96.33% <ø> (+0.91%) ⬆️
src/operators/recurrence_adjoint.jl 91.76% <100.00%> (+0.52%) ⬆️
src/operators/trace_run.jl 90.70% <100.00%> (-0.28%) ⬇️
... and 17 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

A step's output and its cotangent are numbers and tuples, never a
NamedTuple, and a step always has a float input, so those methods of the
dual pass are removed, with the mirror reader's method for a missing
scalar mirror.

New tests: a blockwise pure step whose state is read, so its `init` is
differentiated in the parameters and the histories; a constant history;
an `Init` set by `forward!` with no `pullback!`; a local derivative
nested in another comparing by value; a constant map.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s

Copy link
Copy Markdown
Collaborator Author

smoke fails on 21fb0bb because the Reactant results file has no rows for the new scenario "Recurrence pressure and a named trace read from one record".
The registry check needs a forward and a reverse row for every scenario.
The rows have to come from a real Reactant run of that scenario, which is in progress and will arrive as a small PR against this branch.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

The benchmark comparison on 21fb0bb reports every evaluation case 1.2× to 2× slower.
An interleaved local run does not reproduce it.

Three alternating rounds of the suite's Evaluation group, main (7b6a4ee) against 21fb0bb, fresh process each, one machine, minimum time per case:

  • median ratio 0.99 over 14 cases;
  • range 0.88 (overview T200_L20_S3) to 1.07 (tv_piecewise_primary_k5);
  • the cases CI flagged worst are at parity: random_walk 1.01, bvd_patches_call S5 1.00, strata_mixing 1.01, renewal 1.01, delay_fixed 1.00.

In the CI table the control with no package code (Convolution body / BLAS axpy per lag) is also 1.33× slower, so the two runners differed.

Not covered by this run: the AD gradient groups at this head.
Those were at parity over six interleaved rounds one step earlier, before the record markers were merged, and are being re-run.


Generated by Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
seabbs-bot and others added 2 commits December 1, 2026 15:55
* Add Wren models that use CR, with hand-loop references

Three Wren models (renewal with delay, stratified renewal with mixing
and depletion, time-varying delay) each written with CR and with hand
loops, plus scripts for gradient checks, Reactant checks and timings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iyRmhVe6dsWT5gvbPS

* Add Wren check results, reproducers and README

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iyRmhVe6dsWT5gvbPS

* Format compile_check.jl helper for Runic

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iyRmhVe6dsWT5gvbPS

* Make Wren checks fail loudly, bound compat, regenerate all results

check_primal.jl and ad_check.jl now exit with an error on a mismatch, a
large gradient error or a CR rule that does not run. run_all.sh now
produces every log in results/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iyRmhVe6dsWT5gvbPS

---------

Co-authored-by: Claude <noreply@anthropic.com>

Copy link
Copy Markdown
Collaborator Author

Downstream check: BVDOutbreakSize feat/cr-elegance against this branch

Run in a separate session and relayed here.

CR tested: ba059035 on this branch, against the original pin 7b6a4ee2 on main.
Julia 1.11.9.
BVDOutbreakSize was unchanged except that its [sources] entry for ComposableRecurrences pointed at that commit.

Run Pass Fail Error Broken
ad_only on this branch 4260 2 0 0
fast on this branch 60683 0 0 0
the two failing ad_only items, original pin 3553 2 0 0

Both failures are in test/test_mooncake_rules.jl and both also fail on the original pin, so neither comes from this branch.

  1. "every rule passes Mooncake's test_rule", testset accumulate_occupancy: confirmed clamp: fails the same way on both versions, with identical numbers.
  2. "each rule beats the rules-off derivation", testset discretise_censored: generation interval: a wall-clock assertion ratio <= 0.8 on a 20 μs call.
    The ratio was 1.006 on this branch and 0.861 on the original pin.

No call on this branch logged "plain AD of the whole operator".

Not run: the full suite, the :slow fits and the :quality items.
The later commits on this branch (typed record markers, Share{B}) were not part of this check.


Generated by Claude Code

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwC7iwncmH7NPsrzAxQM9s
@seabbs-bot seabbs-bot changed the title Small fixes: device sparse error, benchmark link, stale test times, README bullets Pure step, record markers and the first part of the redesign Dec 1, 2026
@seabbs-bot
seabbs-bot merged commit 5c6466f into main Dec 1, 2026
7 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llm-reviewed Reviewed by seabbs-review-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants