Cover crystallization-on-resume with an unmocked test - #873
Merged
Merged
Conversation
A resume must restore the crystallization flag from the whole stored history, not just the resumed row. Without that, a mantle that crystallized and later remelted comes back molten on resume and degasses trapped volatiles on the first resumed step. This adds an integration test that builds a remelting history on disk, an early solid row followed by a molten resume row, then resumes on all-dummy backends with volatile freezing on and escape drawing from the bulk reservoir. It checks that the flag comes back set, that the resumed leg stays molten so only the restore can set it, that escape runs over the resumed leg, and that the atmospheric hydrogen inventory does not grow across the resume seam. The test fails when the restore reads only the resumed row and passes when it reads the whole history.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #873 +/- ##
==========================================
- Coverage 93.51% 92.70% -0.82%
==========================================
Files 113 113
Lines 16878 18155 +1277
Branches 3006 3420 +414
==========================================
+ Hits 15783 16830 +1047
- Misses 1091 1278 +187
- Partials 4 47 +43
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The frozen-mantle atmosphere check now asserts that the atmospheric hydrogen inventory does not rise across the resume seam, with a float-noise band, and adds a zero-baseline precondition and a collapse floor. This replaces a single loose growth tolerance that only separated a fully broken restore from a correct one and let a partial degassing leak pass. The freeze-runner helper no longer sets escape.reservoir to 'bulk'. A frozen mantle forces atmosphere-only escape whatever the reservoir setting is, so the override was not needed to reach the escape path under test; the helper docstring now states this. Mark the test physics_invariant, since it asserts a conservation bound on the atmospheric hydrogen inventory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add an unmocked integration test for the crystallization-on-resume path, which had no unmocked coverage. The test runs two resume legs on dummy backends with volatile freezing and bulk-reservoir escape, injects an early row below the crystallization threshold to build a remelting history, and confirms the restored crystallized flag survives a molten resume row. Closes #786.
Validation of changes
The test passes on current source and fails, at the crystallized assertion, when the whole-history restore is reverted to a resume-row-only read. It runs on dummy backends, so it proves the control-flow and reservoir-bookkeeping consequence of the fix, not physically faithful melt or solid partitioning; a partitioning-magnitude test would belong on an aragog or SPIDER slow tier.
Checklist