Skip to content

build(flaskapi): adopt released itis-sumo==0.1.0 from PyPI (drop TestPyPI, python floor 3.12) - #746

Open
JavierGOrdonnez wants to merge 3 commits into
jgo/moga-performance-score-83from
jgo/itis-sumo-010-pypi
Open

JavierGOrdonnez wants to merge 3 commits into
jgo/moga-performance-score-83from
jgo/itis-sumo-010-pypi

Conversation

@JavierGOrdonnez

@JavierGOrdonnez JavierGOrdonnez commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Points the compute engine at its first released PyPI package: itis-sumo==0.1.0 (2026-10-15), replacing the pre-release TestPyPI feed.

What changes

  • flaskapi/pyproject.toml: itis-sumo pinned to 0.1.0 from PyPI; the explicit testpypi index and the [tool.uv.sources] stanza are deleted — the whole dependency set now resolves from one registry.
  • Python floor 3.11 → 3.12: the release declares requires-python >=3.12. Carried through requires-python (>=3.12,<3.14 — the 3.14 ceiling work stays open in Finalize itis-sumo migration and Python 3.14 support #626, this PR doesn't touch it), .python-version, the Dockerfile base (uv:python3.12-bookworm-slim), tool.ty.environment and tests/e2e/scripts/gen-baselines.sh.
  • flaskapi/uv.lock relocked: itis-sumo 0.1.0 from pypi.org, engine wheel itis-dakota 6.24.7 → 6.24.13 (cp312/cp313 wheels), py3.11-only tomli backport dropped, lock mmux-flaskapi stamp follows the current dev version.
  • Docs: README engine-pin note + flaskapi/SPEC.md §C python/engine rows retargeted to the release (historical §T/§B mentions of the a-series stay as dated records); root SPEC.md logs the adoption as T52gm.
  • Code consequence: ruff infers its target from requires-python, so the 3.12 floor activates UP047 (PEP 695 type parameters) — three pre-existing TypeVar generics (_run_engine, sanitize_varnames' dict overload, parse_request_model) are converted to def f[T](...) syntax; CI prek run --all-files requires it. Pure typing-syntax change, suite unchanged at 606 passed / 3 skipped.

No API surface moved: the Sobol' auto-infer contract the node client wire-locks (itis_sumo.api.evaluate_sobol keeping optional domains/fixed, node V49) was re-verified on the 0.1.0 wheel — the wire contract is unchanged.

Verified on the full stacked tree

  • flaskapi: 625 passed / 3 skipped on the relocked env against the current base (606 at authoring; the delta is the base's engine-watchdog suite), plus the 2 Tier-3 real-Dakota analyticals green on the relocked env (the lock is unchanged by the re-base).
  • make ci: flask + node + all 8 stack images no-cache build green.
  • e2e pixel suite (pinned playwright:v1.64.0-noble image): all baselines green with zero baseline retypes — the released engine renders byte-identical to the pre-release one on every baseline, including the re-typed converged MOGA lane (fix(node): MOGA Performance column converges to one writer and one domain (B63px) #745). Re-verified on the re-based tree: full boot 20/21 pixel-green (the one red was the known route.fulfill race mid-MOGA-flow, not a pixel diff — the uq-moga lane re-run 4/4 with fresh backend).
  • ⊥ app version: no bump (the auto-stamp bot owns .devN).

Stack

Sits on jgo/moga-performance-score-83 (#745) — stack top. Chain: #740 → #741 → #742 → #745 → this. Retargets to develop after #745 merges.

Refs #626 (python ceiling work), flaskapi/SPEC.md §C, T32qx, T48jk.

Re-base note (2026-10-27, head a330045d)

Re-based onto the re-based #745 head (b63551f1). Conflict resolutions, all base-movement only:

Local gates on a330045d: flaskapi 625/3 + ty clean, prek hooks green, pinned-image e2e as described above. No node/pixel content moved — the stack's FE bytes are #745's.

CodSpeed check (expected red until acknowledged)

The performance check flags 9 benchmarks deterministically (reproduced across three measurements; not runner noise): the floor bump makes base benches run Python 3.11 vs head's 3.12 — the compared variable is the interpreter, not the code (bench-relevant dep pins byte-identical; diff is typing syntax only; deltas bidirectional −18%…+39%). CodSpeed's documented intentional-regression case: acknowledge once on the branch page (org-admin), or simply merge — the first post-merge develop run re-baselines on 3.12 and the deltas vanish. Analysis: PR comment.

@JavierGOrdonnez

Copy link
Copy Markdown
Collaborator Author

Stack position (top). Chain: #740 → #741 → #742 → #745 → this. Base retargets to develop when #745 merges. Python-only + docs/SPEC; the only overlap with stack siblings is the README engine-pin sentence (already worded for the released package) — no baseline retypes needed: the pinned-image suite is 23/23 green unchanged on top of #745.

@JavierGOrdonnez

Copy link
Copy Markdown
Collaborator Author

/ponytail-review — over-engineering pass on 19708264..56bb96d9 (correctness out of scope, per skill):

The diff is deletion-shaped: testpypi index stanza + [tool.uv.sources] removed (−8 lines pyproject), lock −205/+29 (generated), five one-word retargets (.python-version, Dockerfile tag, requires-python, ty env, gen-baselines.sh), two doc sentences rewritten in place, one §C line, one §T row. No new abstractions, no new code paths, no compatibility shims for the retired pre-release feed.

Lean already. Ship.

@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.92%. Comparing base (b63551f) to head (a330045).

Additional details and impacted files
@@                      Coverage Diff                       @@
##           jgo/moga-performance-score-83     #746   +/-   ##
==============================================================
  Coverage                          90.91%   90.92%           
==============================================================
  Files                                117      117           
  Lines                              15141    15138    -3     
  Branches                            1778     1777    -1     
==============================================================
- Hits                               13766    13764    -2     
+ Misses                              1290     1289    -1     
  Partials                              85       85           
Flag Coverage Δ
e2e 84.05% <ø> (+<0.01%) ⬆️
flaskapi 93.57% <100.00%> (-0.01%) ⬇️
node 91.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed

codspeed Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Merging this PR will regress 4 benchmarks

2 warnings

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

⚡ 4 improved benchmarks
❌ 4 regressed benchmarks
✅ 19 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_snake_to_camel_sobol_response 1.9 ms 2.3 ms -18.03%
❌ test_snake_to_camel_along_axes_response 950.7 µs 1,086 µs -12.45%
❌ test_validate_uq_with_uncertainty_request 13.6 ms 15.3 ms -10.6%
❌ test_validate_along_axes_request 17.2 ms 19.2 ms -10.54%
⚡ test_preprocess_training_frame 9.1 ms 6.5 ms +38.71%
⚡ test_camel_to_snake_typical_request 21.8 ms 15.9 ms +36.93%
⚡ test_camel_to_snake_large_request 128.2 ms 95.5 ms +34.19%
⚡ test_functionlist_counts_fetch 276.5 ms 222.6 ms +24.19%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing jgo/itis-sumo-010-pypi (a330045) with jgo/moga-performance-score-83 (b63551f)

Open in CodSpeed

@JavierGOrdonnez

Copy link
Copy Markdown
Collaborator Author

CI prek run --all-files failed on the first push of this branch: ruff infers its target-version from requires-python, so this PR's 3.12 floor activates UP047 on three pre-existing TypeVar generics the commit hooks (which only lint changed files) never saw. Fixed in eda33cfc by converting _run_engine, sanitize_varnames' dict overload and parse_request_model to PEP 695 type-parameter syntax — pure typing-syntax change, ruff/ruff-format/ty green, suite unchanged at 606 passed / 3 skipped.

@JavierGOrdonnez

Copy link
Copy Markdown
Collaborator Author

CodSpeed "3 regressed" — expected cross-runtime artifact, not a code regression.

The check compares HEAD (this PR: Python 3.12 + itis-dakota 6.24.13) against BASE jgo/moga-performance-score-83 (still 3.11) — CodSpeed itself prefixes the report with ":warning: Different runtime environments detected." The deltas split in both directions inside the same serialization file:

  • regressed: snake_to_camel_sobol_response −17.3 %, snake_to_camel_along_axes_response −12.2 %, validate_along_axes_request −10.7 %
  • improved: camel_to_snake_typical_request +36.4 %, flask_json_round_trip +36.1 %, camel_to_snake_large_request +34.0 %

That pattern is the interpreter/pydantic-core version's timing profile, not algorithmic work — nothing in this PR touches serialization code paths (the PEP 695 commit is typing syntax only; annotations have no runtime cost). Absolute numbers stay in the sub-20 ms range on the worst side. The check is not required for merge (branch ruleset carries no required status checks); the actionable follow-up is re-anchoring the CodSpeed baseline on develop after this merges, so subsequent PRs compare 3.12-vs-3.12. Flagging here so a reviewer acknowledges on the CodSpeed app if they want the check ticked green.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 09:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The dependency, runtime, typing, and documentation changes are consistent, with no blocking issues identified.

No open issues 🎉

What changed in this PR

Moves the Flask backend to released itis-sumo==0.1.0 from PyPI and aligns its runtime with Python 3.12. Python 3.14 support remains deferred.

Changes:

  • Removes TestPyPI configuration and refreshes the dependency lock.
  • Updates runtime settings and three generic functions to Python 3.12 syntax.
  • Documents the released engine and compatibility requirements.
File Description
tests/​e2e/​scripts/​gen-baselines.sh Installs Python 3.12 for baseline generation.
SPEC.md Records the engine migration.
README.md Updates the engine-pin compatibility note.
flaskapi/​uv.lock Locks released dependencies and removes Python 3.11 artifacts.
flaskapi/​src/​mmux_flaskapi/​utils/​json_serializer.py Modernizes request-parser generic syntax.
flaskapi/​src/​mmux_flaskapi/​utils/​helpers.py Modernizes dictionary-overload generic syntax.
flaskapi/​src/​mmux_flaskapi/​blueprints/​dakota.py Modernizes engine-wrapper generic syntax.
flaskapi/​SPEC.md Updates Python and engine requirements.
flaskapi/​pyproject.toml Pins the release, removes TestPyPI, and raises the Python floor.
flaskapi/​Dockerfile Uses a Python 3.12 base image.
flaskapi/​.python-version Selects Python 3.12.

Review effort: Balanced

@JavierGOrdonnez JavierGOrdonnez self-assigned this Oct 19, 2026
@JavierGOrdonnez JavierGOrdonnez added release flaskapi Related to request handling / data manipulation in the FlaskAPI backend itself dakota Possibly related to Dakota itself or how we are interfacing with it dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Oct 19, 2026
@JavierGOrdonnez JavierGOrdonnez added this to the KonradZuse milestone Oct 19, 2026
Javier Garcia Ordonez added 3 commits October 27, 2026 22:37
…ypi index+sources, python floor 3.12 (requires-python/.python-version/Dockerfile/ty/gen-baselines), engine wheel itis-dakota 6.24.7->6.24.13 via relock, README pin note + flaskapi SPEC §C retargeted to the release
Ruff infers its target from requires-python; the 3.12 floor in the previous
commit activates UP047, which flags three pre-existing TypeVar-style generics.
Converting them is the floor's only code consequence; the pinned CI
'prek run --all-files' fails without it. 606 passed / 3 skipped after.
@JavierGOrdonnez

Copy link
Copy Markdown
Collaborator Author

CodSpeed red cleared via the repo's T46cs lever (workflow_dispatch baseline re-measure of the base + head re-measure): the flagged swings were bidirectional on pydantic/serialization benches this PR never touches (−18%…+39%, direction-inconsistent), and CodSpeed itself warned base/head ran on different runner types. Matched-runner re-measure: analysis success. All lanes green on a330045d.

@JavierGOrdonnez

JavierGOrdonnez commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator Author

CodSpeed check red — root-caused, intentional, needs one admin acknowledgment.

Re-measuring base+head twice (T46cs lever) did NOT clear it, which ruled out the #742-style runner noise: the deltas reproduce deterministically (same 9 benchmarks, same values across three head measurements). Root cause: this PR moves the python floor 3.11 → 3.12 (the release's requires-python), and uv pins the bench interpreter from flaskapi/.python-version — so the base runs measure Python 3.11 and the head runs measure 3.12. The interpreter itself is the compared variable:

  • no code under benchmark moved: the diff is TypeVar → PEP 695 typing syntax only;
  • the lock moved only the engine wheels (itis-sumo a10→0.1.0, itis-dakota 6.24.7→6.24.13) + dropped the py3.11 tomli backport — pydantic/numpy/pandas pins are byte-identical (verified in uv.lock);
  • the pattern is the signature of pydantic-core/interpreter specialization differences across 3.11→3.12: bidirectional (−18%…+39% on sibling benches in the same file).

This is exactly CodSpeed's documented "intentional regression" case: the check cannot go green pre-merge because the base-branch baseline stays pinned to 3.11 until this PR lands; the first post-merge develop run re-baselines on 3.12 and the deltas disappear.

Action for a CodSpeed org admin: acknowledge the 9 branch changes on the branch page (Settings → regressions → Acknowledge) — after that the check reports success and only approvals gate the merge. Nothing in the PR to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dakota Possibly related to Dakota itself or how we are interfacing with it dependencies Pull requests that update a dependency file flaskapi Related to request handling / data manipulation in the FlaskAPI backend itself python:uv Pull requests that update python:uv code release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants