-
Notifications
You must be signed in to change notification settings - Fork 66
Bound and test Reflex compatibility window #475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,9 +32,11 @@ | |
| "sdist", | ||
| "wheels", | ||
| "install_without_rust", | ||
| "reflex_compatibility", | ||
| } | ||
| REQUIRED_CODSPEED_JOBS = {"benchmarks"} | ||
| REQUIRED_RELEASE_JOBS = {"wheels", "sdist", "publish", "wasm"} | ||
| REFLEX_REQUIREMENT = "reflex>=0.9.6,<0.10" | ||
|
|
||
|
|
||
| def _job_blocks(text: str) -> dict[str, str]: | ||
|
|
@@ -870,6 +872,29 @@ def validate_ci_workflow(path: Path = DEFAULT_CI_WORKFLOW) -> list[str]: | |
| "locked Reflex development environment", | ||
| "uv sync --locked --extra reflex --group dev", | ||
| ) | ||
| _require_job_contains( | ||
| errors, | ||
| jobs, | ||
| "reflex_compatibility", | ||
| "CI", | ||
| "minimum and maximum released Reflex compatibility matrix", | ||
| "fail-fast: false", | ||
| 'reflex-version: ["0.9.6", "0.9.8"]', | ||
| 'reflex==${{ matrix.reflex-version }}', | ||
| "<0.10,>=0.9.6", | ||
| "test_component.py::test_component_compiles_with_events", | ||
| "test_state_bridge.py::test_rebuild_reads_session_state", | ||
| ) | ||
| try: | ||
| project_metadata = (ROOT / "pyproject.toml").read_text(encoding="utf-8") | ||
| except OSError as exc: | ||
| errors.append(f"cannot read project metadata for Reflex compatibility gate: {exc}") | ||
| else: | ||
| if f'"{REFLEX_REQUIREMENT}"' not in project_metadata: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The metadata check does not prove that Prompt for AI agents |
||
| errors.append( | ||
| "pyproject.toml must bound the xy[reflex] extra to " | ||
| f"{REFLEX_REQUIREMENT!r}" | ||
| ) | ||
|
Comment on lines
+888
to
+897
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Validate the Line 893 only searches for the requirement string in the full TOML text. It passes if the requirement moves to another extra, a base dependency, or a comment. Plain Parse 🤖 Prompt for AI Agents |
||
| _require_job_contains( | ||
| errors, | ||
| jobs, | ||
|
|
@@ -1120,7 +1145,7 @@ def validate_ci_workflow(path: Path = DEFAULT_CI_WORKFLOW) -> list[str]: | |
| "Rust-backed sdist install contract", | ||
| "XY_REQUIRE_CARGO", | ||
| "uv pip install --no-cache", | ||
| '"reflex>=0.9.6"', | ||
| f'"{REFLEX_REQUIREMENT}"', | ||
| "import reflex_xy", | ||
| "import xy.kernels as kernels", | ||
| 'kernels.BACKEND == "native"', | ||
|
|
@@ -1266,7 +1291,7 @@ def validate_release_workflow(path: Path = DEFAULT_RELEASE_WORKFLOW) -> list[str | |
| "scripts/verify_wheel.py", | ||
| "--expect-native", | ||
| "Install-size budget (<= 15 MB)", | ||
| '"reflex>=0.9.6"', | ||
| f'"{REFLEX_REQUIREMENT}"', | ||
| "import importlib.metadata as m, reflex_xy", | ||
| "assert reflex_xy.__version__ == m.version('xy')", | ||
| "assert k.BACKEND=='native'", | ||
|
|
@@ -1331,7 +1356,7 @@ def validate_release_workflow(path: Path = DEFAULT_RELEASE_WORKFLOW) -> list[str | |
| "Rust-backed release sdist install contract", | ||
| "XY_REQUIRE_CARGO", | ||
| "uv pip install --no-cache", | ||
| '"reflex>=0.9.6"', | ||
| f'"{REFLEX_REQUIREMENT}"', | ||
| "import reflex_xy", | ||
| "import xy.kernels as kernels", | ||
| 'kernels.BACKEND == "native"', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -392,7 +392,7 @@ Before tagging a release: | |
| the documented native-core error. Wheel | ||
| `METADATA` must keep `Name: xy`, `Requires-Python: >=3.11`, | ||
| `anywidget>=0.9`, and `numpy>=1.24` as base requirements, plus | ||
| `Provides-Extra: reflex` and `reflex>=0.9.6` guarded by that extra. The wheel | ||
| `Provides-Extra: reflex` and `reflex>=0.9.6,<0.10` guarded by that extra. The wheel | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The new bounded Reflex contract ( Prompt for AI agents |
||
| must contain `reflex_xy` and `XYChart.jsx`, and `RECORD` must list every | ||
| archive file exactly once with matching `sha256` and size fields. Wheels | ||
| and the sdist remain distribution/build-input-only: docs, tests, benchmarks, | ||
|
|
@@ -405,8 +405,12 @@ Every `xy` release carries the `reflex_xy` Python package and JSX wrapper. The | |
| wrapper links to the render client in the same installed distribution, so | ||
| client, kernel, and framework bridge share one version. Plain `xy` must not | ||
| install Reflex; `xy[reflex]` must install the declared supported floor. | ||
| Release smoke tests install Reflex, import `reflex_xy`, and assert that its | ||
| reported version matches the `xy` distribution version. | ||
| The supported Reflex window is `>=0.9.6,<0.10`. CI runs the component compile | ||
| and state-event rebuild smokes against both the minimum `0.9.6` and the newest | ||
| released `0.9.8` in that window. Widen the extra only after adding the new | ||
| released version to that matrix and passing both smokes. Release smoke tests | ||
| install the bounded extra, import `reflex_xy`, and assert that its reported | ||
| version matches the `xy` distribution version. | ||
|
|
||
| ## Hardening Backlog | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The new Reflex compatibility gate can pass with no active Reflex install or smoke tests because it searches the raw job text, including comments and inactive YAML, rather than executable named steps. Structural checks of the install and smoke-test steps would keep CI from silently losing this coverage.
Prompt for AI agents