Skip to content

feat: carry the global run's provenance and check the line's wave grid - #76

Merged
SMI-Lab-Inha merged 7 commits into
devfrom
feat/global-provenance
Dec 2, 2026
Merged

SMI-Lab-Inha merged 7 commits into
devfrom
feat/global-provenance

Conversation

@SMI-Lab-Inha

Copy link
Copy Markdown
Owner

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:

  • a node outside the grid gets the grid boundary's kinematics;
  • 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.

What

Every set of global histories carries a GlobalProvenance record.

Contents:

  • the solver, its version and the host program;
  • the wave route;
  • the wave-component fingerprint;
  • the seed and the input file of a standalone run;
  • the grid;
  • per line: the nodes outside the grid, the resolution flags, and the spectrally weighted velocity ratio.

Sources, in order of precedence:

Source When
CableDyn's record <root>.CD.provenance.json (schema cabledyn.provenance/1, checked field by field) written beside x.CD.out and x.out; FAST.Farm writes x.FarmCD.provenance.json
The wave-grid messages in the run log no record; the current messages and the earlier form are both read
The result file's name neither; every other field is then unknown
declared_provenance a declared external program, such as OrcaFlex

Policy (check_wave_kinematics, wave_grid_check="error" by default, matching CableDyn's default):

  • The analysed line is affected when either of these holds:
    • its own nodes lie outside the grid, with a weighted velocity ratio above wave_grid_tolerance (default 0.01). When the ratio is not recorded, any such node counts.
    • the run records any grid-resolution finding, which concerns every line in the water.
  • An affected line raises WaveKinematicsError, or warns under "warn".
  • Other lines' nodes outside the grid pass, and are recorded.
  • Under CableDyn's warn mode, a log names only some lines. The lines it does not name are unknown, not pass.

Where the record goes:

  • CableDynRead.provenance and every section history;
  • the LoadCaseSeries of every reader;
  • the provenance of fatigue_from_series, which names the analysed line;
  • the sea-state batch manifest;
  • the project codec: a series without a record encodes as before, so saved projects keep their fingerprints;
  • the exchange CSV, as a first 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_sha256 nor the assessment digests, so existing digests stay the same.

API change: cabledyn_provenance(result_file, *, log=None) now takes the result file. Its host argument is gone; the host comes from the file name.

Checks

Gate Result
Full suite, NUMBA_NUM_THREADS=1 5150 passed, 3 skipped
Full suite, CABLEXSEC_DISABLE_NUMBA=1 5033 passed, 120 skipped
ruff check, ruff format --check, mypy clean
Sphinx -W passes
Taxonomy analytical_sanity 1425 (was 1408); independent_method 105 and full_scale 63 unchanged
Real CableDyn records (13 coupled guard runs: grid stops, warns and passes) every pass case reads pass; every stopped or warned case reads affected with the right reason; stopped records warn
  • The test fixtures cover the record layouts: clean, outside, deep-outside, resolution, spectral, stopped/restart, init, FarmCD, standalone, cp1252, schema v2, bad route/type/fingerprint, and null coordinates.
  • They also cover the logs: clean, warn, truncated, WaveMod 6, and the old format.

Not in this PR

  • Reading x.FarmCD.out histories: their record path resolves, but the reader still reads only x.out and x.CD.out results.
  • CableDyn currently writes weighted_velocity_ratio_max as null, so any node outside the grid counts until CableDyn fills it in its next release. That is the conservative side.

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

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 2, 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-12-02T11:58:34.691121Z b53dec0 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

read-the-docs-community Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

📖 7 files changed · 1 added · 6 modified


Preview · build overview · CableXSec · built Dec. 2, 2026, 11:57 a.m. UTC

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/cablexsec/io/global_provenance.py Resolved
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>
@SMI-Lab-Inha

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: d61141dafe

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

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

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: c24b16c9dd

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

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

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: c3de6e3dff

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

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

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: b53dec0574

ℹ️ 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 81ea5c2 into dev Dec 2, 2026
25 of 27 checks passed
SMI-Lab-Inha added a commit that referenced this pull request Dec 2, 2026
CableXSec 0.2.3: the global-analysis provenance record and the wave-grid
policy for the analysed line (#76), FAST.Farm table reading, and the
shortened slow validation tests (#75). Release record:
validation/RELEASE_0_2_3.md.

Signed-off-by: Jae Hoon Seo <jaehoon.seo@inha.ac.kr>
@SMI-Lab-Inha
SMI-Lab-Inha deleted the feat/global-provenance branch December 3, 2026 05:29
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