Skip to content

fix(deck): named errors and validator parity for four deck rules - #127

Merged
SMI-Lab-Inha merged 2 commits into
devfrom
fix/deck-rule-parity
Nov 8, 2026
Merged

SMI-Lab-Inha merged 2 commits into
devfrom
fix/deck-rule-parity

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

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.

  • Finite-EI line type with MassDenInAir ≤ 0. It was refused natively, but only from inside the build: by the damping resolution, by "mass_per_length must be finite", or at dynamic init. The validator accepted it. It is now a named error, LINE TYPE "x": MassDenInAir must be > 0 on a finite-EI line, and the validator mirrors it.
  • One line mixing EI = 0 and finite-EI sections, standalone. It was refused with "mixed EI=0 and finite-EI dynamic decks are not supported by this entry point", which is misleading, since two-line mixed decks run. The validator accepted it. The message now names the line, and the validator mirrors it on the deck-driver route.
  • 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>p channels. The validator now mirrors two native rules:
    • on the aggregate, a Coupled or Vessel point reached only by finite-EI lines is refused;
    • on a standalone multibody march with no EI = 0 line, any Point channel is refused.

Tests.

  • test_deck_driver gains 3 named-error checks; all 3 failed before the fix.
  • 19 parity cases run against the validator (9 failed before), and 14 standalone ones against the driver.
  • CTest 368/368 on the default and Prescott kernels; pytest passes.

Found by differential fuzzing of the validator against the native parser.

…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>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T15:31:45.569133Z c822a22 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 CableDyn | 🛠️ Build #35735216 | 📁 Comparing c822a22 against latest (e8f88f5)

  🔍 Preview build  

6 files changed · ± 6 modified

± Modified

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: c822a22526

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@SMI-Lab-Inha
SMI-Lab-Inha merged commit 58519a2 into dev Nov 8, 2026
22 checks passed
@SMI-Lab-Inha
SMI-Lab-Inha deleted the fix/deck-rule-parity branch November 9, 2026 08:55
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.

1 participant