Repository navigation
fix(deck): named errors and validator parity for four deck rules - #127
Merged
Merged
Conversation
…route rules
Two decks failed inside the model build instead of with an input error that
names the cause:
- a finite-EI line type with MassDenInAir of zero or less, refused on every
route by the damping resolution ("resolving a -zeta damping ratio needs
positive segment_length, EA, and mass_per_length"), the submerged-weight
load ("mass_per_length must be finite and non-negative") or the dynamic
init. It is now refused where the line types are checked: LINE TYPE
"<name>": MassDenInAir must be > 0 on a finite-EI line (an EI = 0 line type
without mass is already refused as net-buoyant).
- a line combining EI = 0 and finite-EI sections on the standalone finite-EI
march, refused as "mixed EI=0 and finite-EI dynamic decks are not supported
by this entry point", although decks of separate EI = 0 and finite-EI lines
run. The refusal now names the line and what to change.
The Python deck validator accepted four kinds of deck the native reader
refuses, and now refuses them with the native meaning:
- TDP<L> channels on a standalone deck without WtrDpth or bathymetryFile
(CD_Range_Setup; a host gives its own depth);
- Point<P>p channels of a Coupled/Vessel point that only finite-EI lines reach,
on the aggregate (a host route or the standalone mixed deck), whose EI = 0
point store has no live entry for it;
- Point<P>p channels on a standalone multibody march without an EI = 0 line;
- the two finite-EI line rules above.
Each case was found by mutation testing of the shipped decks, which compares
the validator's verdict with the driver's. Tests: test_deck_driver checks the
two named errors; the parity tests check eighteen route cases against the
validator and, with the driver, the standalone ones against the native verdict.
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
The [Unreleased] entries of the open changes are added together in one change, so that they do not conflict with each other. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
Owner
Author
|
@codex review |
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. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.
This PR fixes four places where the Python deck validator and the native parser disagreed, and gives two native refusals messages that name the cause.
LINE TYPE "x": MassDenInAir must be > 0 on a finite-EI line, and the validator mirrors it.TDP<L>channels on a standalone deck with no WtrDpth or bathymetry. Refused natively, accepted by the validator. The validator now refuses them too.Point<P>pchannels. The validator now mirrors two native rules:Tests.
test_deck_drivergains 3 named-error checks; all 3 failed before the fix.Found by differential fuzzing of the validator against the native parser.