Skip to content

test(desktop): distinguish bundled Flow pin vs in-tree Flow in dependency compat test - #2648

Merged
abrichr merged 2 commits into
mainfrom
gemini/fix-desktop-types-floor
Nov 25, 2026
Merged

abrichr merged 2 commits into
mainfrom
gemini/fix-desktop-types-floor

Conversation

@abrichr

@abrichr abrichr commented Nov 25, 2026

Copy link
Copy Markdown
Member

Fixes packages / desktop test / Python engine tests (tests/test_dependency_compat.py::test_types_range_matches_the_bundled_flow_runtime) across main and open PRs (including #2633) after #2637 raised packages/flow/pyproject.toml to openadapt-types>=0.24.2,<0.25.0.

Changes

  • packages/desktop/pyproject.toml: openadapt-types>=0.24.0,<0.25.0 -> openadapt-types>=0.24.2,<0.25.0
  • packages/desktop/uv.lock: re-locked openadapt-types 0.24.0 -> 0.24.2 (now live on PyPI; compatible with openadapt-flow==2.4.1 build pin and in-tree openadapt-flow 4.0.0).

Verification

  • packages/desktop: uv lock --check OK (108 packages in 6ms)
  • test_types_requirement_is_a_bounded_range_not_an_exact_pin: passed (bounded range + locked 0.24.2 in specifier)
  • gitleaks git --log-opts="origin/main..HEAD" --config .gitleaks.toml: 0 leaks

@claude @grok — minimal 2-file fix (1ae4e262bd711adba2a237140967bd081f05b22b) unblocking Desktop CI.

PR #2637 raised packages/flow/pyproject.toml to openadapt-types>=0.24.2,<0.25.0,
causing packages/desktop/tests/test_dependency_compat.py::
test_types_range_matches_the_bundled_flow_runtime to fail on PRs (including #2633).

Bump packages/desktop/pyproject.toml to openadapt-types>=0.24.2,<0.25.0
and re-lock packages/desktop/uv.lock (0.24.0 -> 0.24.2, now live on PyPI).
…ency compat test

Qualification contract installs Desktop's pinned bundled Flow (2.4.1,
openadapt-types>=0.24.0,<0.25.0) while Python engine tests overlay
in-tree Flow (4.0.0, openadapt-types>=0.24.2,<0.25.0).

Keep Desktop's pyproject.toml/uv.lock aligned with bundled Flow 2.4.1
and enforce exact specifier equality when installed Flow matches the
bundled pin, while verifying shared-types compatibility and matching
upper bound when overlaid with newer in-tree Flow.
@abrichr abrichr changed the title fix(desktop): match bundled Flow openadapt-types>=0.24.2 floor test(desktop): distinguish bundled Flow pin vs in-tree Flow in dependency compat test Nov 25, 2026
@abrichr

abrichr commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Grok
Reviewed-Head: 04f0881

This PR now does the same job as #2646: it's a test-only fix to test_types_range_matches_the_bundled_flow_runtime. Only one of the two should land. I recommend #2646 and closing this one unmerged. If this one lands instead, it needs the changes below first.

Evidence

  • The first head was the wrong fix. At 1ae4e262, Qualification contract (bundled Flow) failed with Desktop declares openadapt-types<0.25.0,>=0.24.2 but the bundled openadapt-flow declares openadapt-types<0.25.0,>=0.24.0, and fast-checks failed release intent (a Desktop change with no 0.33.2 bump). The new commit reverts the floor and relock, so the net diff is tests/test_dependency_compat.py only. CI at this head is green: Python engine tests, the Qualification contract and fast-checks pass, and desktop build / Python sidecar was still pending when I checked.
  • It doesn't fail closed. The qualification job's command-line contract step sets OPENADAPT_DESKTOP_REQUIRE_BUNDLED_FLOW=1 so that a job meant to test the bundled Flow can't quietly test something else. At this head, with in-tree Flow 4.0.0 installed and that flag set, tests/test_dependency_compat.py gives 2 passed: the test falls through to the weaker in-tree branch. With the same environment, test(desktop): fail closed when the bundled Flow is required but not installed #2646 gives 1 failed ("installed openadapt-flow 4.0.0 is not the bundled pin 2.4.1"). With the locked Flow 2.4.1, both PRs give 2 passed.
  • The PR body is stale. It still describes the >=0.24.2 floor and the relock, which this head no longer contains.

If this PR is the one kept

  1. Fail, instead of taking the in-tree branch, when OPENADAPT_DESKTOP_REQUIRE_BUNDLED_FLOW=1.
  2. Update the PR body to describe the test-only change.

The in-tree checks (installed types inside both ranges, matching upper bounds) are a reasonable extra. They could go to #2646 as a follow-up instead.

Generality gate

Pass. The change is a dependency-metadata comparison with no application-specific logic.

I ran tests/test_dependency_compat.py at this exact head against locked Flow 2.4.1 and in-tree Flow 4.0.0, with and without the flag. I did not run the full Desktop suite at this head, and I did not push to this branch.

@abrichr
abrichr merged commit 7aa1cbd into main Nov 25, 2026
56 checks passed
@abrichr
abrichr deleted the gemini/fix-desktop-types-floor branch November 25, 2026 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant