Repository navigation
feat: carry the global run's provenance and check the line's wave grid - #76
Conversation
The tension and curvature histories CableXSec reads do not show how the global run formed the line's wave kinematics. In a coupled OpenFAST or FAST.Farm run CableDyn can take them from the SeaState grid: a node outside the grid gets the kinematics of the grid boundary, and a grid with three points across the wave direction interpolates over a large part of a wavelength. CableDyn now stops such runs by default, but waveGridCheck warn lets them finish and older runs never had the check, so a fatigue result could rest on wrong kinematics with nothing in the report to say so. Every set of global histories now carries a GlobalProvenance record: the solver (CableDyn with its version and host, or a declared program such as OrcaFlex 11.6e), the wave route, the fingerprint of the wave components (the sea's identity where a coupled run records no seed), the seed and input file of a standalone run, the grid, and per line the nodes outside the grid, the resolution flags and the spectrally weighted velocity ratio. read_cabledyn_sections reads it from CableDyn's <root>.CD.provenance.json (schema cabledyn.provenance/1, checked field by field; other versions are refused by name, unknown keys ignored, an unfinished run warns), or from the wave-grid messages of a run log, and otherwise records the fields as unknown instead of failing. The record travels with CableDynRead, every section history, the LoadCaseSeries of every reader and the provenance of fatigue_from_series. The policy acts on the analysed line only. Nodes of that line outside the grid with a weighted velocity ratio above wave_grid_tolerance (default 0.01; any node when the ratio is not recorded), or a resolution flag on it, raise WaveKinematicsError under wave_grid_check="error", the default, which matches CableDyn's own default, or warn with WaveKinematicsWarning under "warn". Mooring lines below the grid pass silently and are recorded, so a run whose only grid misses are deep mooring spans reads as before. The sea-state batch passes the options and a per-run log through, writes each run's record and policy outcome to the manifest, and names the runs without a record once in its notes, which cablexsec-batch prints. The record and the options check the read: they enter neither inputs_sha256 nor the assessment digests, so existing digests stay. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
…eries
A review of the provenance record found that it lagged CableDyn and lost
the record on the way to the report.
The log parser only knew the first form of CableDyn's resolution message.
Since CableDyn lists every node of the lines in the water ("for the hull
members and for the lines, which sample the grid in the water at N
CableDyn nodes"), and names WaveMod 6 kinematics that differ across the
grid, such a log gave no finding at all. Both forms are read now, and
the fixture holds the current text.
A coarse grid across the sea interpolates the kinematics wherever the
lines sample it, so a resolution finding now affects the analysed line
even when the message cuts its list short or the record flags only
other lines. Under waveGridCheck warn CableDyn warns once, so a log
coverage warning no longer counts the lines it does not name as clear:
they are unknown.
The record follows the CableDyn writer: status "stopped" (a run that
ended on an error) warns like "init" and keeps the record, restarted_from
is read, and the record is found beside each result file (x.CD.out and
x.out give x.CD.provenance.json, x.FarmCD.out x.FarmCD.provenance.json),
with the host taken from the name when nothing else gives it. Point
coordinates may be null, a record that is not UTF-8 is read as
Windows-1252 with a note, and a comment naming two solvers takes the
first.
Project save and AnalysisRunner failed on any reader series, because
the codec did not know the record types. They are registered, and a
series without a record encodes without the new key, so saved projects
keep their fingerprints and stay up to date. The exchange CSV carries
the record in a "# global_provenance:" comment line; a series with no
record, or one that records nothing (an export naming no solver), writes
the plain table as before. The record holds the analysed line, so the
fatigue provenance names the line's findings as the guide describes.
Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@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. |
|
📖 7 files changed · 1 added · 6 modified
Preview · build overview · CableXSec · built Dec. 2, 2026, 11:57 a.m. UTC |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9abf9db2cf
ℹ️ 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".
A coarse grid across the sea concerns every line in the water, and the policy already marks the analysed line affected when only another line carries the flag. The line summary, which travels with the section histories and the fatigue provenance, still read "inside the wave grid, no resolution flags" for such a line. It now names the run's resolution findings that its own record does not carry. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
FAST.Farm writes CableDyn's table as <root>.FarmCD.out with the layout of OpenFAST's <root>.CD.out, and its static and range files under the same prefix. The section reader found the record beside such a file but not the file itself. It now reads it on the host's clock, names the route in checks["route"], and refuses a root that holds both a .CD.out and a .FarmCD.out. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
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". |
The release metadata check reads a v-prefixed 0.x.y as a CableXSec version. The solver-recognition examples now use CableDyn versions that it does not take for CableXSec ones, and the codec comment names no version. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! 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 release-tree audit refuses .log files as generated output, so the seven CableDyn run logs the provenance tests read are stored as <name>.log.txt. The validation report records the taxonomy count with the two tests added for the line summary and the FAST.Farm reader. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 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 release metadata check reads a v-prefixed 0.x.y anywhere in the tracked text as a CableXSec version. The CableDyn run logs the provenance tests read carry CableDyn's own version line, which the check refused. Files under tests/data/ are what other programs wrote, so their versions are theirs: the check passes over them, as it does the changelog and the records of past releases. Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs 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". |
Why
The histories CableXSec reads do not show how the global run formed the line's wave kinematics. In a coupled OpenFAST or FAST.Farm run, CableDyn can take them from SeaState's grid:
CableDyn now stops such runs by default. But
waveGridCheck warnlets them finish, and older runs never had the check, so a fatigue result could rest on wrong kinematics with nothing in the report to say so.What
Every set of global histories carries a
GlobalProvenancerecord.Contents:
Sources, in order of precedence:
<root>.CD.provenance.json(schemacabledyn.provenance/1, checked field by field)x.CD.outandx.out; FAST.Farm writesx.FarmCD.provenance.jsonunknowndeclared_provenancePolicy (
check_wave_kinematics,wave_grid_check="error"by default, matching CableDyn's default):wave_grid_tolerance(default 0.01). When the ratio is not recorded, any such node counts.WaveKinematicsError, or warns under"warn".warnmode, a log names only some lines. The lines it does not name areunknown, notpass.Where the record goes:
CableDynRead.provenanceand every section history;LoadCaseSeriesof every reader;fatigue_from_series, which names the analysed line;# global_provenance: {...}. A series with no record, or one that records nothing, writes the plain table as before.The record and its options enter neither
inputs_sha256nor the assessment digests, so existing digests stay the same.API change:
cabledyn_provenance(result_file, *, log=None)now takes the result file. Itshostargument is gone; the host comes from the file name.Checks
NUMBA_NUM_THREADS=1CABLEXSEC_DISABLE_NUMBA=1ruff check,ruff format --check,mypy-Wpass; every stopped or warned case readsaffectedwith the right reason; stopped records warncp1252, schema v2, bad route/type/fingerprint, and null coordinates.Not in this PR
x.FarmCD.outhistories: their record path resolves, but the reader still reads onlyx.outandx.CD.outresults.weighted_velocity_ratio_maxasnull, so any node outside the grid counts until CableDyn fills it in its next release. That is the conservative side.