Put the OMEX validation errors in the exception message - #1827
Conversation
OmexValidationException assembled its detail only in toString(), never passing it
to super, so getMessage() returned null. JUnit, surefire and callers all report
getMessage(), so a validation failure surfaced in CI as:
SEDMLExporterSBMLTest.test_sedml_roundtrip_SBML:348 » OmexValidation
with no indication of what failed. The nightly regression has been red for ten
consecutive nights partly on these, and the actual errors were only recoverable
by downloading the surefire XML artifact and reading the stack-trace text. They
turn out to be specific and actionable, e.g.
XPath /sbml:sbml/sbml:model/sbml:listOfSpecies/sbml:species[@id='Src_plasmamembrane']
does not match any elements of model `full_model`
The same null also reached SEDMLExporterCommon, which logs e.getMessage() when
deciding whether a fault is already known - those lines have been printing
"null".
Build the detail in the constructor and hand it to super. The toString() override
is now redundant and dropped, so stack traces get the standard "class: message"
form rather than a bare message with no type.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SvqmME7MkRUNEYje5HpiLt
Verified against the real failing test, not just the unit testWorth stating plainly: this repo's PR CI does not exercise this code path. These
Before — the entire diagnostic: After — same run, same failure: The failure itself is unchanged — this only makes it legible. One wart, left as isThe count says "1 error(s)" while the text lists 28 invalid tasks. That is accurate to |
Symptom
The nightly regression reports OMEX validation failures like this:
That is the entire diagnostic. Nothing about which model, which check, or why.
Cause
OmexValidationExceptionbuilt its detail only intoString()and never passedit to
super, sogetMessage()was null:JUnit, surefire and ordinary logging all report
getMessage(). The errors werepresent in the object the whole time, just unreachable by everything that prints
exceptions.
This also silently degraded
SEDMLExporterCommon, which logse.getMessage()when deciding whether a fault is already recorded — those lines have been
printing
null.What was hiding behind it
Recovered from the uploaded surefire XML for run 30796032928. These are specific
and actionable, not environmental:
The exported SED-ML references entities by XPath that are absent from the
exported SBML. Those export defects are not addressed here — this PR only
makes them visible. They have been failing every nightly in the retained history
(10 of 10 runs, back to 2026-07-25) and all sit in the
slowModelsset, so theynever run in the merge gate or in a plain
workflow_dispatch.Change
Build the message in the constructor and pass it to
super. ThetoString()override becomes redundant and is dropped, so stack traces show the standard
class: messageform instead of a bare message with no exception type.CI will now print the model, the failing XPath and the error type directly.
Tests
New
OmexValidationExceptionTest(4 cases): the message is non-null and containsevery error and its type,
toString()still carries the detail, theerrorslist stays available for callers that branch on error type, and an empty list
still yields a message. Full
vcell-coreFast group passes (437).🤖 Generated with Claude Code
https://claude.ai/code/session_01SvqmME7MkRUNEYje5HpiLt