Repository navigation
fix(deck): overridden waves and current rows keep no stale values; validator checks the effective row - #128
Conversation
|
@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. Keep them coming! 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
The last waves row and the last current row are the ones in effect, and the reader checks the magnitude bounds of a regular, stream or JONSWAP waves row (height, period, gamma) and of a current row (speed, profile depth) once OPTIONS is read, on that row alone. Two values of an overridden row survived into that check: - an Airy or stream waves row kept the gamma of an earlier JONSWAP row, so "jonswap 3 10 2000 0 waves" followed by "airy 2 8 0 waves" was refused for a gamma above 1e3 that the Airy wave does not have; - a profile current row kept the velocity of an earlier uniform row, so "uniform 2000 0 0 current" followed by a profile row was refused for a speed above 1e3 m/s. Both rows now reset what the earlier row set. The physics is unchanged: a regular wave never reads gamma and a profile current never reads the uniform velocity. The Python deck validator applied those magnitude bounds to every row as it read it, and so refused a deck whose out-of-range row a later row overrides (for example "airy 2000 8 0 waves" followed by "none waves"), which the solver runs. It now checks the row rules (positive height and period, gamma >= 1, distinct profile depths, every spectral and wavetrain row) on every row and the magnitude bounds on the waves and current rows in effect, as the native reader does. Editing a waves or current row keeps the full check. Tests: test_deck_driver runs four overridden-row decks and refuses an out-of-range effective row; the parity tests check twenty override cases against the validator and, with the driver, 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>
mypy (strict) refused the loop variable key, which the END CONNECTIONS check of the same function uses as a tuple. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
f2f1654 to
99c8500
Compare
|
Codex Review: Didn't find any major issues. Another round soon, please! 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". |
Two native parser bugs and a validator mismatch, all about OPTIONS rows that a later row overrides.
airyorstreamwaves row after ajonswaprow inherited the stale gamma.jonswap 3 10 2000 0 wavesfollowed byairy 2 8 0 waveswas refused with "gamma <= 1e3". The airy/stream row now resets gamma to 1.profilecurrent row after auniformrow inherited the stale velocity and was refused with "at most 1e3 m/s". The profile row now zeroes it.airy 2000 8 0 wavesfollowed bynone waves) was therefore refused. The validator keeps the per-row rules on every row and applies the magnitude bounds to the effective row only;set_optionkeeps the full check.The physics is unchanged, since neither stale value was read on those paths.
Tests.
test_deck_drivergains 4 overridden-row decks and 2 effective-row refusals. It had 3 mismatches before the fix.Found by the option sweep of an input-robustness fuzz campaign (18,357 cases).