Repository navigation
feat(iodine): add 1D coupled iodine chemistry aging model, presets, CLI, and web workstation - #31
Conversation
… contract V1 (M1)
…mbly, compiler, and steady/BDF adapters (M2)
… boundary validation for 1D iodine aging (M3)
…, RunStore persistence, and workflow (M4)
…rk suite and numerical refinements
…TTP routes, and workstation panel
…, and preset catalog
… private cross-module loader import
|
Sorry @ShaneLogic, your pull request is larger than the review limit of 150,000 diff characters |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb1a92f13b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| manifest_json = json.dumps(manifest, sort_keys=True, separators=(",", ":")) | ||
| digest = hashlib.sha256(manifest_json.encode()).hexdigest() |
There was a problem hiding this comment.
Include transport inputs in the compiled device hash
When two direct compile_iodine_device_1d calls reuse the same PreparedDevice and kinetics but differ only in an iodine diffusivity or partition factor, those inputs are absent from this manifest, so the digest stays the same. Since CompiledIodineDevice1D.identity uses this hash and downstream state checks compare it, a state from one transport model can be accepted by another, and persisted physics identities collide. Include the compiled transport and partition inputs in the hash.
Useful? React with 👍 / 👎.
| }, | ||
| } |
There was a problem hiding this comment.
Include BDF controls in the aging protocol hash
If two aging protocols differ only in bdf_options—for example, relative tolerance or maximum order—this payload produces the same hash even though run_iodine_aging_protocol uses those controls for integration. The runs can therefore produce different trajectories while sharing protocol_sha256 and the RunStore execution identity; serialize the BDF options into the hashed document.
Useful? React with 👍 / 👎.
| if effective.aging is not None: | ||
| if len(effective.aging.stages) > _MAX_HTTP_STAGES: | ||
| raise ValueError( | ||
| f"HTTP aging stages ({len(effective.aging.stages)}) exceed {_MAX_HTTP_STAGES}" | ||
| ) |
There was a problem hiding this comment.
Cap HTTP aging checkpoint counts
An /iodine/aging request can provide an arbitrarily large list of unique aging.checkpoint_times_s: the deck schema has no list-length cap, and this HTTP guard limits stages and BDF steps but not checkpoints. The aging runner splits integration at each checkpoint and runs the configured probes for each split, so a single request can trigger unbounded solver and probe work and exhaust server workers; cap the checkpoint count here.
Useful? React with 👍 / 👎.
Summary
Adds SolarLab's coupled 1D iodine reaction–diffusion–electrostatics perovskite aging subsystem (
solarlab.iodine_aging.v1/solarlab.iodine-deck.v1) built directly on the sharedSystemLayout/Assembler/StorageProblemarchitecture, verified against Bitton & Tessler (Energy Environ. Sci. 16, 2621–2628, 2023) and integrated across CLI, FastAPI server, and Web workstation.Key Additions (9 commits:
37a5383..bb1a92f)src/solarlab/physics/chemistry/,src/solarlab/equations/,src/solarlab/device/compile_iodine_1d.py)volumetric_mol_escape_s_1/IodineVolumetricEscapeTermwith shared heterointerface seal protection) and outer-contact Faradaic metal corrosion (metal_faradaic_corrosion, $\mathrm{M} + \mathrm{I}^- \to \mathrm{MI}(s) + e^-{\mathrm{metal}}$).src/solarlab/solvers/,src/solarlab/experiments/)< 2e-8), non-destructive frozen-chemistry & dynamicRunStore/ bundle persistence, and mobile vs frozen small-signal AC redox capacitance spectroscopy.src/solarlab/cli.py,src/solarlab_server/routes/iodine.py,web/src/panels/iodine-aging.ts)solarlab.iodine-deck.v1Pydantic V2 schema (keeping the frozen 20-DTO frontend configuration schemaa0b73b19...byte-identical) and 5 packaged YAML presets (bitton_tessler_2023_{blocking,permeable,outgassing,ag_corrosion,self_healing}).solarlabCLI subcommands (iodine-presets,iodine-steady,iodine-impedance,iodine-aging), solver-free-startup bounded/iodine/*FastAPI routes, and interactive?view=iodine-agingbrowser panel.docs/contracts/IodineReactionAgingContractV1.md(35normative contracts), updatedPublicAPI.json,README.md, andexamples/research_1d/.Verification & Qualification Scope
scripts/test_all.py, 8 isolated suites):4,130 passed, 0 failed, 0 errorsvitest+tsc && vite build):965 passed, clean production bundleruff,mypy(328files),lint-imports --no-cache(12/12contracts kept),solarlab check-install --require-no-legacyall greenscientific_qualification = Falseandscientific_acceptance = "not_evaluated".