Repository navigation
test(e2e): V36ez interactive-control coverage batch + MOGA envelope fix (B62wp) - #742
JavierGOrdonnez wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## jgo/fe-download-buttons-79 #742 +/- ##
==============================================================
+ Coverage 89.09% 90.99% +1.90%
==============================================================
Files 117 117
Lines 15077 15127 +50
Branches 1644 1777 +133
==============================================================
+ Hits 13433 13765 +332
+ Misses 1553 1279 -274
+ Partials 91 83 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will degrade performance by 11%2 warnings, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
There was a problem hiding this comment.
🟢 Approval recommended
The focused result-handling fix matches the backend contract, and no blocking issues remain.
0 open findings
What changed in this PR
Expands interactive-control coverage and fixes MOGA result handling so Pareto plots and tables populate correctly.
Changes:
- Adds three end-to-end tests covering UQ, sampling, and MOGA controls.
- Unwraps MOGA responses and derives missing Pareto-front indices, with unit tests.
- Adds an Optimization Settings test selector and documents contracts and remaining coverage gaps.
| File | Description |
|---|---|
| tests/e2e/interactive-controls.spec.ts | Adds triggered-state assertions and screenshot checks. |
| node/src/views/MOGA.tsx | Adds the settings-button test selector. |
| node/src/components/plots/MOGAPareto.tsx | Normalizes responses and derives Pareto-front indices. |
| node/src/components/plots/MOGAPareto.test.tsx | Tests dominance, ties, directions, and empty inputs. |
| node/SPEC.md | Records the result contract, coverage batch, and bug fix. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
7c8da85 to
ffe2967
Compare
|
/ponytail-review (over-engineering pass, diff-only) Lean already. Ship.
|
|
Stacked: branch rebased onto Rebase resolutions:
No Copilot threads. /ponytail-review: lean, see comment above. Merge order Monday: #740 → retarget this to |
4976939 to
74063e6
Compare
|
e2e flake root-caused and fixed in stacked #745. The #745 (this PR's stack child) makes the parent a single convergent writer over one domain so every write is byte-identical, adds a red→green unit regression ( No change needed on this PR: #742's current head and green check stand; the unstable baseline pairs it carries are corrected by #745 as the stack's final word. Merge order stays #740 → #741 → #742 → #745. |
74063e6 to
da1491b
Compare
da1491b to
f0cad30
Compare
f0cad30 to
17c6046
Compare
… contract (B62wp) [fork#83]
- tests/e2e/interactive-controls.spec.ts (3 tests, 19 new baselines): triggers the
controls the read-only pixel suites reach but never operate — UQ correlation
(Pearson/Spearman) + scale (linear/abslog) and Sobol' (first/second/total) +
scale (linear/log) toggle groups w/ aria-pressed triggered-state asserts, footer
previous-button, UQ back-nav, distribution-form selector (Normal->Uniform->
Normal), WRITE-mode extend-sampling panel + refresh-job-collections forced
refetch + new LHS campaign (value asserts + Run completion state), validation-
modal one-step disabled stepper + QoI selector, MOGA add/confirm-output modal,
surrogate-scale LOG lock w/ "manual" provenance chip, 3-objective MOGA
(y,y2,y4) driven into the 3D Pareto view via the Plot Settings modal w/
per-objective x/z log-display baselines, and the Optimization Settings modal
behind the new additive `moga-settings-button` testid (root §V13); the two
flake-prone shots (uq-setup-returned, lhs-configured) wait for the async QoI
auto-detect commit / anchor a deterministic viewport before pixel-locking.
- B62wp/V53wp fix: perform_moga_optimization answers through the
{optimizationResults:...} envelope (wrapper camelCased, inner map preserved
incl. the snake_case ndi spelling — both folded) and itis-sumo 0.1.0a10
ParetoFrontResult.data carries value columns only, so normalizeMogaResults
unwraps the envelope (flat payloads still accepted) AND the new
deriveNonDominatedIndices derives the non-dominated front in FE when the
metadata is absent (direction per objective from OutputVarSelection
"minimize"/"maximize" minimize-default, ties mutually non-dominated) + 3
unit tests in MOGAPareto.test.tsx.
- moga-readonly -pareto/-pareto-log-y baselines regenerate to the FULL render
(iteration boxes + Pareto front + table rows); -inspect-modal additionally
shows the now-populated table + scrollbar-driven right-edge shift.
- All baselines regenerated ONLY inside the pinned
mcr.microsoft.com/playwright:v1.64.0-noble image (§V12, 23/23) and
re-verified with a STRICT zero counted-diff make test-e2e run (§V10, 23/23).
- node/SPEC.md: §V V53wp (envelope + derivation contract), §T T57ic (batch),
§B B62wp (bug ledger).
Part of JavierGOrdonnez#83 (residual V36ez gaps stay tracked there).
Rebase note: the new base carries develop #633's test that pinned the PRE-fix
degraded contract ("payload without nonDominatedIndices -> empty rows") — re-titled to
assert the derived front (single non-dominated point + mapped front trace).
…ee (chip, B62wp front, #740 values) — regen inside pinned Playwright image Base-move refresh (onto re-based #741 @ 4384982): the three MOGA read-only baselines re- aged again — the base moved in develop's Pareto-table Performance column (#633) on top of this tree's full-front envelope render. Re-gen disciplined per LANE context: monolithic update-mode runs leak shared-backend state (a continued-past-failure spec mutates the job collections the SuMo/UQ views read), so only the MOGA lane's own files were taken from the pinned-image regen; SuMo/UQ baselines stay at the lane-verified bytes the base ships.
17c6046 to
1b2aa2e
Compare
|
Second rebase round (push |
|
CodSpeed check cleared: the only flagged |
…main (B63px) The column was the terminal frame of three async writes in arbitrary order: - the table's [weights] effect overwrote row.performance with a naive direction-blind raw sum (empty e2e-seeded weights -> 0.00) - the parent's [weights] recalc wrote the normalized score into a capital-Performance key the grid never reads (dead write) - runMOGA's own commit normalized over ALL evaluations while the recalc re-derived min/max from the front rows; a single-objective front is all rows tied at the optimum -> min==max -> norm=0 fallback -> whole column 0.0, and the runMOGA closure could hold empty weights -> all cells NaN (the '-' placeholder) Pixels settled on '-', 0.00, 0.0 or the resolved 1.0 by write order (proven: pinned-image regens of one commit -> resolved/-/resolved; post single-writer verifies -> 0.0/0.0/1.0/1.0). The parent recalc is now a pure projection of (tableData, weights, outputTargets): it fires on every tableData commit and every weights/direction edit, writes only the lowercase rendered field, always normalizes against raw (the same all-evaluations domain runMOGA uses), and bailouts via functional update when every row already agrees, so terminal pixels are write-order independent instead of a coin flip. - regression test MOGAParetoTable.test.tsx: given scores render verbatim (red on the old child code, green on the fix) - e2e: expectMogaPerformanceComputed gate (cells exist, then no '-' placeholder) before every full-page MOGA baseline guards the transient window; baselines regenerate in the pinned image in a follow-up commit Refs JavierGOrdonnez#83, node V49wp/B59wp/T51ic Re-base adaptations (base moved to develop d764875 + re-based #740-#742): - the projection effect now falls back to {} for a function with no outputTargets entry (same idiom as the scale-detection guard) — the develop #678 lifecycle test "falls back to an empty objective set" caught the un-guarded Object.keys crash. - #633's parent-matrix test read the DEAD capital-Performance key the convergence deletes: reads re-targeted to the lowercase rendered field (values identical — the raw all-evaluations domain contains the front rows). - #633's table test pinned the retired child recomputation: re-titled to assert the GIVEN scores stand, no realign fires on a weights-only edit (realign is keyed to [data] now) and the raw-sum override never appears.
…erformance column — pinned playwright image, single-writer single-domain tree (B63px) Base-move refresh (onto re-based #742 @ 1b2aa2e): the three moga-readonly page/element baselines (-pareto, -pareto-log-y, -settings-modal) re-typed again — the base moved in #742's full-front envelope render under this tree's converged Performance column. The other five (inspect-modal + the four interactive MOGA shots) regenerated byte-identical. Determinism re-proven with CI lane semantics: two consecutive rounds of {uq-moga 4/4, behavior 12/12}, every boot its own fresh backend — zero flakes.
…main (B63px) The column was the terminal frame of three async writes in arbitrary order: - the table's [weights] effect overwrote row.performance with a naive direction-blind raw sum (empty e2e-seeded weights -> 0.00) - the parent's [weights] recalc wrote the normalized score into a capital-Performance key the grid never reads (dead write) - runMOGA's own commit normalized over ALL evaluations while the recalc re-derived min/max from the front rows; a single-objective front is all rows tied at the optimum -> min==max -> norm=0 fallback -> whole column 0.0, and the runMOGA closure could hold empty weights -> all cells NaN (the '-' placeholder) Pixels settled on '-', 0.00, 0.0 or the resolved 1.0 by write order (proven: pinned-image regens of one commit -> resolved/-/resolved; post single-writer verifies -> 0.0/0.0/1.0/1.0). The parent recalc is now a pure projection of (tableData, weights, outputTargets): it fires on every tableData commit and every weights/direction edit, writes only the lowercase rendered field, always normalizes against raw (the same all-evaluations domain runMOGA uses), and bailouts via functional update when every row already agrees, so terminal pixels are write-order independent instead of a coin flip. - regression test MOGAParetoTable.test.tsx: given scores render verbatim (red on the old child code, green on the fix) - e2e: expectMogaPerformanceComputed gate (cells exist, then no '-' placeholder) before every full-page MOGA baseline guards the transient window; baselines regenerate in the pinned image in a follow-up commit Refs JavierGOrdonnez#83, node V49wp/B59wp/T51ic Re-base adaptations (base moved to develop d764875 + re-based #740-#742): - the projection effect now falls back to {} for a function with no outputTargets entry (same idiom as the scale-detection guard) — the develop #678 lifecycle test "falls back to an empty objective set" caught the un-guarded Object.keys crash. - #633's parent-matrix test read the DEAD capital-Performance key the convergence deletes: reads re-targeted to the lowercase rendered field (values identical — the raw all-evaluations domain contains the front rows). - #633's table test pinned the retired child recomputation: re-titled to assert the GIVEN scores stand, no realign fires on a weights-only edit (realign is keyed to [data] now) and the raw-sum override never appears.
…erformance column — pinned playwright image, single-writer single-domain tree (B63px) Base-move refresh (onto re-based #742 @ 1b2aa2e): the three moga-readonly page/element baselines (-pareto, -pareto-log-y, -settings-modal) re-typed again — the base moved in #742's full-front envelope render under this tree's converged Performance column. The other five (inspect-modal + the four interactive MOGA shots) regenerated byte-identical. Determinism re-proven with CI lane semantics: two consecutive rounds of {uq-moga 4/4, behavior 12/12}, every boot its own fresh backend — zero flakes.
What
Closes the first (largest coherent) batch of the V36ez interactive-control audit tracked in JavierGOrdonnez#83 — the gap table (every
mmux-testidinnode/src× e2e assertion × triggered-state baseline) is posted as a comment on that issue.New
tests/e2e/interactive-controls.spec.ts(3 tests, 19 new baselines) triggers the controls the pixel suites reach but never operate, highest-priority first:correlation-view-toggle+ Pearson/Spearman,correlation-scale-toggle+ Linear/abslog) and all 6 Sobol' ids (First/Second/Total × Linear/Log) getaria-pressedtriggered-state asserts + baselines;moga-pareto-display-scale-x/-zvia a 3-objective MOGA run (y, y2 and strictly-positive y4 — deliberately not y3 whose sin+cos span keeps its log gate closed) driven into the 3D view through the Plot Settings modal (the only path that raises the dimension);surrogate-scale-{output}LOG lock with thesurrogate-scale-provenance-*= "manual" chip assert + element baseline.refresh-job-collections-btn(zero coverage before) — forced refetch response asserted, post-refresh grid element baseline.add-output-var-btnmodal-open baseline,confirm-add-output-btnadd-objective flow; validation modal pins the one-stepvalidation-plot-next/-backdisabled contract +validation-qoi-selectopen-menu baseline.previous-button(disabled@setup → click → setup-view baseline),uq-plot-back×2, distribution-form selector Normal→Uniform switch (input-block-x1-Min/Maxswap +input-var-box-0element baseline + restore), WRITE-mode flowextend-sampling-btn→ panel-open baseline → refresh →new-sampling-campaign-btnaccordion →lhs-number-of-sampling-points-input/lhs-seed-inputfills with value asserts → LHS tab-panel element baseline (configured 12/7 + Run inside the frame),run-sampling-btncompletion state (new "E2E created collection 1" COMPLETE/12 row pinned in a grid element baseline, button ⊥ stuck), Pareto-tablerun-sampling-btn-{rowId}render + READ-ONLY-disabled asserts.moga-settings-buttontestid on the MOGA Optimization Settings button (root §V13 — purely additive), which makesMOGAModal's 4× duplicatedinput-blockfields reachable (count assert + modal baseline + Discard).🐛 Found en route — MOGA results were envelope-broken on develop (B62wp / V53wp)
The 3-objective flow exposed that since the itis-sumo engine port (1fc5419),
perform_moga_optimizationanswers wrapped ({optimizationResults: {var:[…]}}— wrapper camelCased, inner map serializer-preserved; a legacy snake_casenon_dominated_indiceskey is still folded when present), whilenormalizeMogaResultsstill spread the top level: everyresults[var]lookup missed. And because the 0.1.0a10ParetoFrontResult.datacarries value columns only (no ndi metadata at all), the front is now derived in the FE as well. The 1D branch's|| []guard papered over it — the committedmoga-readonly-paretobaseline silently degraded to sample-points-only + a "No rows" table — while the unguarded 2D/3D branches crashed the swallowed effect (TypeError: … 'slice') into the InsufficientDataWarning fallback.Fix: unwrap the envelope in
normalizeMogaResults(flat unit-test payloads still accepted; both ndi spellings folded) plusderiveNonDominatedIndices— the FE Pareto-front derivation (direction per objective fromOutputVarSelection"minimize"/"maximize" with minimize-default, ties mutually non-dominated), unit-tested inMOGAPareto.test.tsx. Consequence: the pre-existingmoga-readonly-pareto+-pareto-log-ybaselines regenerate to the full render (iteration boxes + Pareto front + table rows). Node §V gainsV53wppinning the envelope + derivation contract; §B logsB62wp; the new spec pinsNo rows⊥ + row Run-buttons > 0 as the executable regression guard.Contract compliance
-pareto,-pareto-log-yand-inspect-modal, the latter because its shot includes the now-populated Pareto table below the modal) regenerated ONLY inside the pinnedmcr.microsoft.com/playwright:v1.64.0-nobleimage via themake test-e2e-updatepath, then re-verified in the same image.maxDiffPixelRatio 0.0) viamake test-e2e-docker— result in the verification comment below.test.describe.configure({ timeout: 300_000 })in the new file only: one backend boot serializes all Dakota work behindworkers:1and the MOGA test chains a 3-objective optimization; no global timeout change.T57icrecords the batch + residual gaps (MOGA-WRITE row-Run click,sumo-plot-qoi-selectswitch baseline,input-block-{v}-Value, single-jobinput-block-{v}, data-gated advisory pins, MOGAModal/Plot-modal control testids) — all remain tracked on fork#83.Part of fork issue JavierGOrdonnez#83 (does not close it — residual gaps tracked there).
Rebase note (2026-10-27)
Rebased onto the rebased #741 head (
a160b19a). Ledger ids re-minted for collisions with the base:V49wp→V53wp,B59wp→B62wp,T51ic→T57ic(SPEC rows, code refs and commit messages). Baselines: the three MOGA read-only shots (-pareto,-pareto-log-y,-inspect-modalvia settings-modal state) re-typed again — the base moved in develop's Pareto-table Performance column (#633) on top of this PR's full-front envelope render. Regenerated and lane-verified in the pinned image with CI semantics (fresh backend per lane: uq-moga 4/4, sumo 5/5 pixel-green). SuMo/UQ/interactive baselines unchanged — their lane-verified bytes still match. (Monolithic update-mode runs leak shared-backend state past the first failing spec, so only lane-owned files were taken from the regen.)