Repository navigation
Conversation
Nitir4
requested review from
Alomir,
dlebauer,
mdietze and
mswilburn
as code owners
October 12, 2026 10:59
This branch has not been deployed
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.
Summary
Reject negative
leafAllocation,woodAllocation, andfineRootAllocationduring model setup. For example,(-0.125, 0.25, 0.25)previously passedensureAllocation()because the derived coarse-root fraction was positive (0.625). It now reports the supplied values throughlogError()and exits withEXIT_CODE_BAD_PARAMETER_VALUE(3).Keep the existing individual upper bounds and coarse-root remainder check. Add a focused allocation regression, document the input constraints, and update the changelog.
This addresses the allocation lower-bound subtask of #278. The broader parameter, climate, and event validation work remains outside this PR. No nonfinite-input or rounding-tolerance changes are included.
How was this change tested?
make test: all 26 registered test executables passed, including 17 allocation cases. Four active smoke scenarios (niwot,russell_1,russell_2,russell_3) matched model, event, and configuration references. The smoke summary reports 5/5 with one forced pass becauserussell_4is skipped.make testrun: passed. The unit wrapper's PASS/FAIL table was also inspected rather than relying only on its shell exit status.--dry-run --Werror.git diff --check: passed.No smoke reference outputs were changed. Local clang-tidy was unavailable.
Reproduction steps
The new
testAllocation.cexercises negative values in each supplied allocation, a small negative value, valid zero/interior/exact-boundary cases, individual values at or above one, and a sum above one. It checks error code 3 and preserves the supplied fractions.make make -C tests/sipnet/test_sipnet_infrastructure testAllocation cd tests/sipnet/test_sipnet_infrastructure ./testAllocationExpected final line:
PASSED testAllocation (17 cases).Related issues
Checklist
docs/CHANGELOG.mdupdated.