Auto-mode: Merge accumulate/E4-F1 into main#1286
Conversation
Add the new thermodynamics sidecar validator and thread it through condensation GPU call sites and their tests. Also update the example and benchmark coverage to construct valid configs where required. Closes uncscode#1281 ADW-ID: e2ff36ab
Update benchmark test doubles and guarded CUDA allocations to match the current GPU data contract. Use the CPU gas molar mass directly so benchmark setup does not depend on unavailable device-side state.
Add caller-owned thermodynamics sidecar validation to the GPU condensation path and thread the sidecar through the direct example and benchmark. Expand thermodynamics and condensation regression coverage and update the E4-F1 plan notes to match the validated implementation. Validation: - pytest particula/gpu/kernels/tests/thermodynamics_test.py - pytest particula/gpu/kernels/tests/condensation_test.py - pytest particula/gpu/kernels/tests/condensation_stiffness_test.py - pytest particula/gpu/tests/gpu_direct_kernels_example_test.py - run_linters on repo root Closes uncscode#1281 ADW-ID: e2ff36ab
Update the feature plan to reflect that phase P1 is complete. Set the phase status to Shipped and record its completion date so the plan matches the implemented work. ADW-ID: e2ff36ab
Add a validated, device-resident refresh API for constant and canonical Buck vapor-pressure models. The refresh overwrites every gas output cell in one Warp launch while preserving model order and avoiding host transfers. Add CPU and optional CUDA parity coverage plus validation tests that ensure invalid calls leave caller-owned output buffers unchanged. Closes uncscode#1282 ADW-ID: 8fdba01e
Keep the thermodynamics Warp kernel runtime-compatible while satisfying mypy by widening the internal Warp-facing annotations to Any where required. This preserves the validation path for refresh_vapor_pressure_gpu and keeps the GPU thermodynamics implementation usable for the current validation run. Closes uncscode#1282 ADW-ID: 8fdba01e
Document the concrete-module GPU vapor-pressure refresh API, including constant and canonical Buck semantics, validated device buffers, and the standalone P2 boundary. Record E4-F1 delivery and focused test guidance. Closes uncscode#1282 ADW-ID: 8fdba01e
Refresh caller-owned GPU vapor pressure from the current normalized box temperature after validation and before condensation mass transfer. Add coverage for refresh ordering, stale buffers, supported input paths, and pre-refresh failure atomicity. Closes uncscode#1283 ADW-ID: 3bf00a64
Document the required thermodynamics sidecar and the pre-transfer, device-resident vapor-pressure refresh in user references, implementation plans, and condensation docstrings. Closes uncscode#1283 ADW-ID: 3bf00a64
Update the feature plan to reflect completion of the GPU condensation pre-step refresh work. Mark phase E4-F1-P3 as shipped and record the completion date. ADW-ID: 3bf00a64
Add Warp integration coverage for reusable thermodynamics sidecars and caller-owned mass-transfer buffers in condensation steps. Verify public preflight failures leave caller-owned simulation state unchanged. Closes uncscode#1284 ADW-ID: a0d13612
Record the shipped E4-F1-P4 integration contracts and clarify that caller-owned thermodynamics and output buffers are reusable without mutation when preflight validation fails. Closes uncscode#1284 ADW-ID: a0d13612
Tighten the integration test to snapshot CPU-backed caller-owned state directly, assert buffer reuse stays on the same transfer object, and verify the sentinel overwrite after the first condensation call. Closes uncscode#1284 ADW-ID: a0d13612
Update the E4-F1 plan entry to reflect completion of the integration-test hardening work and record its completion date. Closes uncscode#1284 ADW-ID: a0d13612
Record the shipped E4-F1 P5 contract for caller-owned thermodynamics configuration, derived vapor-pressure refresh ordering, and the current E4-F2 through E4-F7 ownership split. Also sync the E4-F1 plan records with the documented baseline. Closes uncscode#1285 ADW-ID: c7dd00e4
Document the executable CPU latent-heat conservation test and retain the roadmap boundary that temperature-feedback runtime support and GPU parity remain future work.
Update the E4-F1 scope record and the GPU direct-kernel quick start to reflect the shipped thermodynamics contract and keep the example aligned with the keyword-only condensation entry point. No production code or supported-model behavior changed. Closes uncscode#1285 ADW-ID: c7dd00e4
Mark the E4-F1-P5 documentation task as shipped and record the 2026-07-13 completion date in the workflow plan. Closes uncscode#1285 ADW-ID: c7dd00e4
Final Handoff — Branch Accumulation CompleteAll 5 slices have been accumulated onto This PR requires manual review and merge.
Implementation SummaryDiff summary unavailable in finalization context Slices Completed
|
🤖 Agent Developer Workflow
Current Status
Workflow Plan
📋 Recent Activity🔍 Archived UpdatesThis comment is automatically updated as the workflow progresses |
There was a problem hiding this comment.
Pull request overview
This PR merges the E4-F1 “GPU thermodynamics sidecar + vapor-pressure refresh” work into main, adding a required caller-owned thermodynamics configuration for GPU condensation and ensuring WarpGasData.vapor_pressure is refreshed on-device from the current per-box temperature before mass transfer.
Changes:
- Introduces
ThermodynamicsConfigplusrefresh_vapor_pressure_gpu()and validation in a newparticula.gpu.kernels.thermodynamicsmodule. - Updates
condensation_step_gpu()to require keyword-onlythermodynamics=and to refreshgas.vapor_pressureon-device (with float32→float64 temperature casting when needed). - Expands kernel/unit/integration tests, benchmarks, and docs to encode the new contract and refresh ordering/atomicity expectations.
Reviewed changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| readme.md | Documents the new condensation thermodynamics sidecar and vapor-pressure refresh behavior. |
| particula/integration_tests/gpu_thermodynamics_contract_test.py | Adds public-boundary integration contracts for sidecar/buffer reuse and atomic failures. |
| particula/gpu/tests/gpu_direct_kernels_example_test.py | Updates fake Warp stubs and asserts thermodynamics is passed through in the example test. |
| particula/gpu/tests/benchmark_test.py | Benchmarks now allocate/pass ThermodynamicsConfig for GPU condensation. |
| particula/gpu/tests/benchmark_helpers_test.py | Updates benchmark helper fakes/fixtures to accommodate thermodynamics-related allocations. |
| particula/gpu/kernels/thermodynamics.py | New module: thermodynamics sidecar schema, validation, and vapor-pressure refresh kernel/API. |
| particula/gpu/kernels/tests/thermodynamics_test.py | New unit tests for sidecar validation and refresh correctness/atomicity. |
| particula/gpu/kernels/tests/condensation_test.py | Updates exported test-name contract for condensation wrapper tests. |
| particula/gpu/kernels/tests/_condensation_test_support.py | Injects a default thermodynamics sidecar for shared condensation test support; adds refresh parity helpers. |
| particula/gpu/kernels/condensation.py | Requires thermodynamics=, validates it, casts temperature as needed, and refreshes vapor pressure before mass transfer. |
| docs/index.md | Surfaces the new condensation thermodynamics requirement in the docs landing page. |
| docs/Features/Roadmap/data-oriented-gpu.md | Updates roadmap text to reflect the shipped on-device vapor-pressure refresh baseline. |
| docs/Features/data-containers-and-gpu-foundations.md | Adds canonical contract docs for thermodynamics config + refresh ordering/ownership. |
| docs/Examples/gpu_direct_kernels_quick_start.py | Updates runnable example to provide ThermodynamicsConfig and clarifies vapor-pressure buffer semantics. |
| AGENTS.md | Updates the quick reference with the new thermodynamics/refresh contract and import boundaries. |
| .opencode/plans/sections/features/E4-F1/testing_strategy.md | Marks plan phases shipped and records the testing strategy that was implemented. |
| .opencode/plans/sections/features/E4-F1/success_criteria.md | Checks off shipped success criteria and clarifies delivered metrics/contracts. |
| .opencode/plans/sections/features/E4-F1/scope.md | Updates scope to match shipped behavior and clarifies out-of-scope items. |
| .opencode/plans/sections/features/E4-F1/phase_details.md | Records phase completion and delivered artifacts per phase. |
| .opencode/plans/sections/features/E4-F1/overview.md | Updates plan overview/value proposition to reflect shipped issues and contracts. |
| .opencode/plans/sections/features/E4-F1/open_questions.md | Resolves and records parameter-width and integration-boundary decisions. |
| .opencode/plans/sections/features/E4-F1/infrastructure_reuse.md | Notes reuse of shared infra in the added integration tests. |
| .opencode/plans/sections/features/E4-F1/implementation_tasks.md | Marks implementation tasks completed and records delivered items. |
| .opencode/plans/sections/features/E4-F1/documentation_updates.md | Summarizes shipped documentation updates and deferred ownership. |
| .opencode/plans/sections/features/E4-F1/change_log.md | Adds dated entries for each shipped phase (P1–P5). |
| .opencode/plans/sections/features/E4-F1/architecture_design.md | Updates architecture notes to match shipped refresh + integration ordering. |
| .opencode/plans/features/E4-F1.json | Marks plan phase statuses as shipped with completion dates. |
| .opencode/guides/testing_guide.md | Adds the thermodynamics test module to the recommended Warp validation command list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| _validate_array_metadata( | ||
| "gas.molar_mass", | ||
| gas_molar_mass, | ||
| (n_species,), | ||
| wp.float64, | ||
| device, | ||
| caller_name, | ||
| ) |
| monkeypatch.setattr( | ||
| benchmark_module, | ||
| "wp", | ||
| types.SimpleNamespace( | ||
| float64=np.float64, |
ADW Code ReviewPR: #1286 - Auto-mode: Merge accumulate/E4-F1 into main Summary
No critical issues were found. Five warnings should be addressed before merging. Warnings (Should Fix)
Suggested Direction
Positive Observations
Inline CommentsDetailed, actionable feedback is being posted on changed lines where the platform permits it. This review was generated by the ADW Multi-Agent Code Review System. |
|
WARNING: Update the migration example contract This example omits the required Construct/pass a |
|
WARNING: Validate optional-buffer dtypes before refresh Shape/device checks alone allow incompatible buffers to fail or compute after vapor pressure has already been mutated. Require |
|
WARNING: Avoid duplicate thermodynamics validation Condensation validates the sidecar, then the public refresh path validates it again; each pass performs four Keep full validation in the standalone public API, but call a private prevalidated launch helper here to avoid redundant CUDA synchronization. |
|
WARNING: Require strictly positive molar masses The current check allows zero, which later causes division by zero. Please require finite values greater than zero for both reference and gas molar masses, with a zero-value regression test. |
|
WARNING: Validate Normalize and require a finite, nonnegative Please follow coagulation's validator and add a regression asserting no mutation on failure. |
Fix SummaryApplied the retained review-fix plan for issue #1286; the branch was already up to date, so no new commit was needed. Changes Made
Review Comments Addressed
Files Changed
Automated fix by ADW workflow |
Target Branch:
mainAuto-mode completed for
accumulate/E4-F1.