Skip to content

Cover crystallization-on-resume with an unmocked test - #873

Merged
timlichtenberg merged 4 commits into
mainfrom
tl/issue786-crystallization-resume-test
Sep 15, 2026
Merged

timlichtenberg merged 4 commits into
mainfrom
tl/issue786-crystallization-resume-test

Conversation

@timlichtenberg

Copy link
Copy Markdown
Member

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

  • I have followed the contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors
  • I have checked that the tests still pass on my computer
  • I have added tests for these changes, as appropriate

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.
@timlichtenberg
timlichtenberg requested a review from a team as a code owner September 11, 2026 19:38
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.70%. Comparing base (f347866) to head (e34238e).
⚠️ Report is 3 commits behind head on main.

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     
Flag Coverage Δ
unit-tests 87.44% <ø> (+0.08%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

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.
@timlichtenberg
timlichtenberg merged commit 487dc87 into main Sep 15, 2026
13 of 14 checks passed
@timlichtenberg
timlichtenberg deleted the tl/issue786-crystallization-resume-test branch September 15, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crystallization-on-resume behaviour is not covered by an unmocked test

1 participant