Repository navigation
fix(analysis)!: pass Exaflow results through unchanged and pin the t-test contract of PR #656 - #43
Merged
Merged
Conversation
Exaflow PR #656 (algorithms/t-test-corrections) changes t-test values,
not their shape: one-sided bounds use t_{1-alpha}, p-values come from
the survival function (3.9e-235 instead of 0), a one-row group no
longer nulls the independent t-test, and the paired spec now labels x
"Measurement 1" and y "Measurement 2" (mean_diff = x - y).
The backend passes results and specifications through untouched, so
none of this needs backend code. These tests pin what that relies on,
across the Gson read -> Jackson write hop of a preview or saved run:
- the open side of a one-sided CI stays the string "Infinity";
- a tiny p-value keeps its value;
- null statistics stay present as null;
- the paired x/y labels and alternative enums reach the UI as sent;
- one-sided run parameters reach Exaflow unchanged.
…mapper The t-test contract test serialized with a plain ObjectMapper, so it missed application.yml's non_null inclusion. Through the real mapper, null statistics are dropped from the response, not sent as null; the UI reads a missing statistic the same as null. The test now asserts that. SpringJsonMapper builds the mapper Spring MVC uses from application.yml. The result, specification and request tests go through it. The one-sided request test now reads UI JSON instead of serializing a Java Map it built itself.
KFilippopolitis
force-pushed
the
feat/ttest-corrections-support
branch
from
October 28, 2026 12:04
fec8a44 to
dcf1c9c
Compare
KFilippopolitis
changed the base branch from
feat/pca-reporter-contract-alignment
to
master
October 28, 2026 12:05
Results were parsed with Gson into Objects and written back with Spring's Jackson. Gson turned every number into a double (n_obs 217 became 217.0), and application.yml's non_null inclusion dropped every null inside the result, at any depth (a t-test p of null disappeared). AnalysisService now returns a 200 body as RawJson, and ExperimentDTO serves a stored result as RawJson. Both Jackson 2 (JsonConverters, storing a kept run) and Spring's Jackson 3 write RawJson unchanged. Exaflow writes results with pydantic model_dump_json, which emits no bare NaN or Infinity, so the passed-through text is always valid JSON. BREAKING CHANGE: result integers are no longer sent as doubles, and null fields in results are sent as null instead of being omitted.
…ons-support # Conflicts: # src/main/java/hbp/mip/algorithm/AnalysisService.java
KFilippopolitis
marked this pull request as ready for review
October 28, 2026 12:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Exaflow PR #656 (algorithms/t-test-corrections) changes t-test values,
not their shape: one-sided bounds use t_{1-alpha}, p-values come from
the survival function (3.9e-235 instead of 0), a one-row group no
longer nulls the independent t-test, and the paired spec now labels x
"Measurement 1" and y "Measurement 2" (mean_diff = x - y).
Backend fix: results pass through as Exaflow sent them
Results used to be parsed with Gson and written back with Spring's
Jackson. That changed them in two ways:
n_obs: 217reached the UI as217.0);application.yml'snon_nullinclusion dropped every null inside aresult, at any depth (a t-test
p: nulldisappeared).AnalysisServicenow returns a 200 body asRawJson, andExperimentDTOserves a stored result asRawJson. Jackson 2(
JsonConverters, storing a kept run) and Spring's Jackson 3 both writeit unchanged. Exaflow writes results with pydantic
model_dump_json,which emits no bare
NaN/Infinity, so the text is always valid JSON.Breaking: result integers are no longer sent as doubles, and null
fields in results are sent as
nullinstead of being omitted. The UIreads both forms the same way (
toFiniteNumber,first()).Contract tests
Across a kept run's store-and-serve path:
null, and integers stay integers;ExperimentDTOResultTestchecks that a stored result is served with itsnulls (nested too) and integers; it fails on the old Gson path.
SpringJsonMapper(test) builds the mapper Spring MVC uses fromapplication.yml. PR #39 adds the identical file, so either merge orderis clean.
Merge notes
AnalysisService.convertResponseToAnalysisResult.Resolve by keeping both:
case 200 -> new RawJson(...)from this PR,and the
413/503cases from fix(analysis): map Exaflow 503 and 413 to user-facing errors #42.Tests
mvn test: 129 tests, 0 failures.