Bringing MIME into full compatibility with, and adoption of, MADDENING v0.2.0, including all existing experiments. This document is a handoff for a dedicated agent.
- MADDENING v0.2.0 is released (tag
v0.2.0). New surfaces: thestatic_datachannel +StaticArraywrapper;halo_width()(replacing the deprecatedrequires_halo); compile-time edge-validation warnings (ShapeMismatchWarning/DtypeMismatchWarning/UnitMismatchWarning);BinaryStateEncoderfield-subscriptions + zstd; AWS/GCP cloud providers; preempt/resume snapshots; profiler endpoints (/sim/profile); checkpoint schema versioning;GraphManager.validate_sharding();MigrationError. - Work from MIME
main(HEAD1432ac5when this was written). The repo may be checked out onfeat/fvm-float64-audit— that branch predates the v0.2 integration; do not base work on it. Another agent may be active in this repo — check before switching branches; use agit worktreeif in doubt. mainalready has: themaddening>=0.2.0,<0.3pin, therequires_halo→halo_widthnode migration, and a green suite (626 passed against MADDENING v0.2).- Test:
cd MIME && source ../.venv/bin/activate && python -m pytest -q(shared venv/home/nick/MSF/msf/.venv;-m 'not slow'is the default lane). - Scope boundary: this is compatibility + v0.2-surface adoption + MIME's own v0.2 release. MIME node physics improvements and new node types are a SEPARATE later cycle — not in this list.
Suggested order: §1 → §2 (clean baseline) → §3 (the big one) → §4 → §5 → §6 → §7.
The node migration is done; residue remains:
- Migrate the two test-stub classes
_FieldStub(tests/verification/test_coupling_group_field_body.py:64) and_BodyStub(:102) fromrequires_halotohalo_width(). They currently emit aFutureWarningon subclassing (MADDENING v0.2's__init_subclass__); v0.3 turns that into aMigrationError. - Rewrite tests that assert the deprecated property to assert
halo_width()instead:tests/nodes/lbm/test_iblbm_fluid_node.pyTestRequiresHalo(:236-238) →halo_width() == {0:1,1:1,2:1};tests/nodes/test_external_magnetic_field.py:109andtests/nodes/test_phase_tracking.py:127→halo_width() == {}. - Update stale docstrings/comments mentioning
requires_halo:src/mime/core/node.py:7,40,src/mime/nodes/environment/fvm/fluid_node.py:287,src/mime/nodes/environment/lbm/fluid_node.py:99.
Done when: grep -rn requires_halo src/ tests/ is empty (or only
intentional compat references); suite green; subclassing a MIME node
emits no FutureWarning.
-
.github/workflows/ci.ymlchecks out MADDENING with noref:— it builds against MADDENINGmain/HEAD, not a released tag. Pin it toref: v0.2.0(or, once MADDENING is on PyPI, installmaddeningfrom PyPI and drop the source checkout). - Reconcile the CI
jax==0.5.1/jaxlib==0.5.1pin againstpyproject.toml'sjax>=0.4— pick one consistent constraint. - Run the full suite (
-m 'slow or not slow') against thev0.2.0tag; confirm 0 failures and no escalating warnings.
Done when: CI is green pinned to MADDENING v0.2.0.
The main engineering item. MIME nodes hold large non-evolving arrays
as plain instance attributes closed over in update() (re-baked into
the JIT'd HLO every step) or — worse — thread them through state.
v0.2's static_data channel is purpose-built for exactly these
(meshes, wall masks, lookup tables, basis functions, NN weights):
wrap each in StaticArray and expose it via the node's static_data
property. Contract: static_data is not checkpointed — keep the
provider/config in self.params so it rebuilds on resume.
Candidates:
- FVM — the
FVMMeshpytree (owner / neighbour / Sf / n / area / d / w / V / x / …).src/mime/nodes/environment/fvm/mesh.py:100-112literally calls it a "closed-over pytree … potentially a 1 GB FVM mesh".make_piso_step()is rebuilt everyupdate()(fvm/fluid_node.py:367), re-baking the mesh into HLO each step. - LBM —
_pipe_wall/_pipe_missingmasks (lbm/fluid_node.py:181,184). Also: stop threading the static pipe-wall through state —initial_state()putssolid_maskin state (:226) andupdate()returns a fresh one every step (:323) though only the UMR portion moves. Split static vs dynamic. - Stokeslet —
_R,_lu,_piv(BEM LU factors,stokeslet/fluid_node.py:265-307),_body_mesh/_wall_mesh, andWallTable.data(the(n_rho,n_rho,n_dphi,n_dz,3,3)Green's-function tensor,stokeslet/cylinder_wall_table.py:54). - MLPResistanceNode — MLP weights + normalization stats
(
stokeslet/mlp_resistance_node.py:217-225). - GNN flux corrector —
EdgeMLPParamsweight tuples (fvm/gnn.py:116,238). - DefectCorrection — pipe masks
(
defect_correction/fluid_node.py:164-171).
Done when: these arrays no longer re-bake into HLO per step;
static_data_hash() is stable across steps and changes when geometry
changes; suite green; a before/after recompile or step-time
measurement shows the win.
MIME builds unit-tagged EdgeSpecs (lbm/fluid_node.py:445-484,
stokeslet/fluid_node.py:486-520, stokeslet/mlp_resistance_node.py),
so v0.2's compile-time edge validation now inspects them automatically.
- Confirm no MIME graph emits a spurious
ShapeMismatchWarning/DtypeMismatchWarning/UnitMismatchWarningatcompile(). (A prior smoke check found zero — verify it still holds.) - Add a test that compiles the representative experiment graphs
with warnings recorded and asserts no
EdgeValidationWarning.
Done when: a test pins MIME's graphs as edge-validation-clean.
Every existing experiment must run correctly on v0.2.
- Run each experiment end-to-end against v0.2.0:
experiments/ar4_helical_drive/,experiments/dejongh_confined/,experiments/umr_confinement/, plus theGraphManager-basedsrc/mime/experiments/dejongh.py/dejongh_new_chain.py. - Re-run the
MIME-VER-*verification benchmarks (tests/ verification/, ~20 files incl. the FVM / LBM / stokeslet suites) and confirm the reports underdocs/validation/benchmark_reports/still hold. - The long de Jongh / GNN cloud sweeps
(
scripts/run_confinement_sweep.py,sky_tasks/gnn_sweep.yaml,jobs/production_h100.yaml,jobs/rehearsal_a100.yaml) are multi-hour — wire them to v0.2's preempt/resume snapshots + checkpoint schema versioning so a reclaimed spot VM resumes instead of restarting from zero.
Done when: every experiment + verification benchmark is confirmed green on v0.2.0; the cloud sweeps survive a simulated preemption.
MIME is still version = "0.1.0", tagged only v0.1.0. Mirror what
MADDENING did for its v0.2.0 release:
- Bump
pyproject.tomlversion0.1.0→0.2.0; reviewclassifiers(stillDevelopment Status :: 2 - Pre-Alpha),keywords,description. -
CHANGELOG.mdcurrently has only an[Unreleased]section — write a real[0.2.0]entry (and ideally backfill[0.1.0]). - Add release notes under
docs/(there is nodocs/release_notes/) — a v0.2 "what's new" page plus a migration note. -
docs/_static/switcher.jsonhas a singlelatestentry — add av0.2versioned row, and bumpMIME_VERSIONSinMICROROBOTICA/docs/Makefile(currentlylatest:origin/main) tov0.2:v0.2.0 latest:origin/main. - Tag
v0.2.0—publish.yml(PyPI Trusted Publishing) fires on a GitHub Release. - After tagging, bump the
docs/projects/mimesubmodule pointer in MICROROBOTICA (still at the pre-v0.227c2bbd).
Done when: mime-engine 0.2.0 is tagged, on PyPI, and the docs
site shows a MIME version switcher.
Decide per item whether it earns a place now or is deferred:
- Profiler — MIME's
runner/server.pyexposes ZMQ endpoints; evaluate adopting MADDENING's/sim/profilePerfetto export. -
BinaryStateEncoder— MIME has its owndata/hdf5_schema.py(SweepDataWriter) andviz/streaming_observer.py; field subscriptions + zstd could shrink the wire / disk footprint. -
validate_sharding()— call it if/when MIME shards graphs. - Surrogates — MIME has its own
mime/surrogates/cholesky_mlp.py(andsrc/mime/surrogates/__init__.pyis empty). Evaluate consuming MADDENING's restructuredsurrogates/primitives/— this also intersects MADDENING's deferred "decoder-zoo pull-over from MIME" item. - AWS/GCP cloud providers — the cloud job specs (
jobs/*.yaml,sky_tasks/) currently target RunPod; the v0.2 providers add AWS/GCP.
MIME node physics improvements, accuracy work, and new node types. This list is compatibility + v0.2-surface adoption + the v0.2 release prep only.
Note that these physics improvements will also be shipped with mime-engine v0.2 however the primary goal is to get these things ready first.
DO NOT release mime v0.2 after these things are done. As more things will have to be done after that are out of scope. These include:
- Migrating all fluid nodes to follow a shared contract to make them truly swappable.
- Updating node specific stuff in runner/server.py to a better design pattern
- Improving the robot arm ar4 robot arm simulation experiment.
DefectCorrectionFluidNode,LBMFarFieldNode, andStokesletFluidNodeextend MADDENING'sSimulationNodedirectly, bypassingMimeNode— keep that in mind when touching base-class behaviour.- MIME's nodes carry
maddeningcompliance metadata (NodeMeta,stability,ValidatedRegime) — preserve it through any refactor.