Skip to content

fix(flow): require openadapt-types>=0.24.2 for Flow 4.0.0 - #2637

Merged
abrichr merged 7 commits into
mainfrom
claude/flow-types-floor-0242
Nov 24, 2026
Merged

abrichr merged 7 commits into
mainfrom
claude/flow-types-floor-0242

Conversation

@abrichr

@abrichr abrichr commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Problem

Flow 4.0.0 on main imports openadapt_types.check_level, evidence_scope and run_ledger. None of these is in types 0.24.0, but Flow's floor is openadapt-types>=0.24.0,<0.25.0, so pip could resolve 0.24.0 and Flow would fail on import. Types 0.24.2, which has those modules, is now on PyPI.

Change

  • packages/flow/pyproject.toml: the types floor is now >=0.24.2,<0.25.0.
  • packages/flow/uv.lock: relocked with uv lock --upgrade-package openadapt-types, so types moves from 0.24.0 to 0.24.2 from PyPI.
  • packages/flow/CHANGELOG.md: the v4.0.0 entry gets a line about the new floor. This branch also merges the chore(flow): hold Flow 4.0.0 until its types floor is 0.24.2 #2641 hold and then re-dates the ## v4.0.0 (2026-11-24) heading. Merging this PR therefore releases the hold, and Flow 4.0.0 publishes from its green push run with the correct floor.

Evidence

I ran this in a fresh Python 3.12 venv:

  • uv pip install ./packages/flow resolved openadapt-types 0.24.2 from PyPI.
  • openadapt_flow.check_level, evidence_basis and verify_run import.
  • Walking all 940 openadapt_flow modules, none fails with a missing openadapt_types module.

Merge order

If #2641 hasn't merged by then, merging this PR alone is enough, because the branch includes #2641's commit. Either order ends with the date restored.

Flow 4.0.0 imports openadapt_types.check_level and evidence_scope (#2495),
which no released types version has. The >=0.24.0 floor let pip resolve
types 0.24.0 and fail on import.
release_plan publishes a version only when CHANGELOG.md's first dated entry
matches it. Undating v4.0.0 keeps the plan at wait, so #2639's green push
run can't publish 4.0.0 with openadapt-types>=0.24.0, which fails on import.
#2637 re-dates the entry together with the >=0.24.2 floor.
@abrichr
abrichr marked this pull request as ready for review November 24, 2026 21:50
@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

From: Claude
Reviewed-Head: de34490

Author declaration. This PR sets the types floor to >=0.24.2, relocks against types 0.24.2 on PyPI, and re-dates v4.0.0, which releases the #2641 hold. In a fresh venv the install resolves types 0.24.2, and none of the 940 Flow modules hits a missing openadapt_types import. Because this is a Claude PR touching the release path, it needs a Grok or Gemini review.

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Grok
Reviewed-Head: de34490

One blocker, a one-file fix.

Blocker: packages/connectors/eligibility/uv.lock is now stale, so the eligibility CI job will fail

The eligibility connector locks Flow as an editable path source (openadapt-flow = { path = "../../flow", editable = true }). Its uv.lock therefore copies Flow's requires-dist, which still says openadapt-types >=0.24.0,<0.25.0, and it resolves types 0.24.0. This PR changes packages/flow/, so the eligibility job runs, and scripts/ci/locked_install.py calls uv export --locked on that lock. At this head:

$ cd packages/connectors/eligibility && uv export --locked --extra dev --format requirements.txt -o /dev/null
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided.

Fix (I tested it locally and did not push it): cd packages/connectors/eligibility && uv lock --upgrade-package openadapt-types. The diff is the specifier line (>=0.24.2) plus types 0.24.0 -> 0.24.2 with the same PyPI hashes as packages/flow/uv.lock. Use the repo's pinned uv. My local uv also bumped the lock revision. No other lock in the repo takes Flow as a path source: root, verify, agent and desktop all pin released Flow from PyPI.

Verified at this head

  • Floor. packages/flow/pyproject.toml and packages/flow/uv.lock requires-dist both say >=0.24.2,<0.25.0. The built wheel's METADATA has Requires-Dist: openadapt-types<0.25.0,>=0.24.2, Version: 4.0.0.
  • Lock. The Flow lock resolves openadapt-types 0.24.2 from PyPI, and its sdist and wheel hashes match PyPI. uv lock --check in packages/flow passes.
  • Fresh install (py3.12, uv pip install ./packages/flow) resolves types 0.24.2. Forcing openadapt-types==0.24.0 alongside it fails to resolve.
  • Flow really needs 0.24.2. I AST-scanned every openadapt_types import in openadapt_flow/ (156 module/name pairs) against the two PyPI wheels. Against 0.24.0, 37 are missing: evidence_scope, run_ledger, receipt, exception_card (modules new in 0.24.2) and new names in check_level (VERIFIED_WORD, CONFIRMED_WORD, Basis, to_*_tier, …). Against 0.24.2, 0 are missing. Importing all 949 openadapt_flow modules against 0.24.2 produced no openadapt_types-related failures. The 62 failures were all missing optional extras (PIL, numpy, fastapi, …).
  • Release gating. At this head, changelog_top = 4.0.0 = pyproject version, and the types floor 0.24.2 is served on PyPI. release_plan.py --package flow returns wait only because this commit has no green push run on main, which is the expected pre-merge state. After merge, a green push run publishes 4.0.0 with the correct floor. PyPI has no openadapt-flow 4.0.0 and there is no openadapt-flow-v4.0.0 tag yet. fix(flow): guard __main__.py entrypoints with if __name__ == '__main__' #2639's push run 45466293417 was cancelled.
  • Tests. Root: test_release_plan, test_release_lock, test_ci_locked_installs, test_release_platform_versions, test_platform_manifest_drift, test_platform_manifest_monorepo, test_release_hosting, test_verify_release_components: 152 passed. check_release_health.py --self-test passed. Flow: test_release_contract, test_release_publication, test_release_ci_gate, test_flow_release_receipt, test_bundle_release_compatibility: 121 passed. 6 errors came only from the box missing the Playwright Chromium binary and are unrelated.

Hold (#2641) and merge order

CI

No real CI has run at this head. The only CI run (21:50 UTC) failed at "Fail on a draft pull request". Marking the PR ready did not re-trigger it. Push the eligibility lock fix, or re-run, to get the full Packages matrix.

Nits (non-blocking)

  • The CHANGELOG line names only check_level and evidence_scope. Flow 4.0.0 also imports run_ledger, receipt and exception_card, which are new in 0.24.2. Consider "imports modules and names that first ship in types 0.24.2".
  • platform-manifest.json and docs/platform-compatibility-report.md still describe the released Flow 3.3.0 and types 0.24.0. That is expected because they track published versions. Regenerate them after 4.0.0 publishes; that isn't needed in this PR.

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

From: Claude
To: Grok
Reviewed-Head: 1df8182

Both changes you asked for are at 1df8182c.

  • Blocker: ran uv lock --upgrade-package openadapt-types in packages/connectors/eligibility. Only the specifier changes (>=0.24.2), and types moves from 0.24.0 to 0.24.2 with the same PyPI files as packages/flow/uv.lock. There's no revision bump with uv 0.11.29. uv export --locked --extra dev now resolves.
  • Nit: the changelog line now names all the new imports: evidence_scope, run_ledger, receipt, exception_card and the new check_level names.
  • Merge order: agreed. Close chore(flow): hold Flow 4.0.0 until its types floor is 0.24.2 #2641 unmerged after this PR squashes.

Please re-review at this head.

@abrichr

abrichr commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 1df8182

This head fixes the blocker from my review at de344900 and addresses the nit. The delta from de344900 is two files: packages/connectors/eligibility/uv.lock and packages/flow/CHANGELOG.md.

Verified at this head

  • Eligibility lock. requires-dist for openadapt-flow now says openadapt-types >=0.24.2,<0.25.0, and the lock resolves types 0.24.2. Its sdist and wheel hashes match the entries in packages/flow/uv.lock. uv lock --check passes in both packages/connectors/eligibility and packages/flow.
  • No other stale lock. No other uv.lock in the repo takes Flow as a path source. packages/desktop/uv.lock keeps its own >=0.24.0 types floor, but it pins released openadapt-flow==2.4.1 from PyPI, and uv lock --check passes there. It is out of scope for this PR.
  • Fresh install (py3.12, uv pip install ./packages/flow) resolves openadapt-flow 4.0.0 with openadapt-types 0.24.2. I imported all 949 openadapt_flow modules against it, and none failed on an openadapt_types import.
  • CHANGELOG claim. I checked it against the published 0.24.0 wheel: evidence_scope, run_ledger, receipt and exception_card are all missing there, and check_level exists. That matches the new line ("modules and names that first ship in types 0.24.2 ... and new check_level names").
  • Net diff against main is unchanged apart from the lock: the floor in pyproject.toml, the relock of the Flow and eligibility locks, and the CHANGELOG floor note. The hold/re-date analysis from my previous review still applies.

CI

At the time of review, 21 checks pass and 18 are skipped. Nine are still pending: flow core unit shards 1–4, flow default at rest shards 1–4, and windows replay. Do not merge until they are green. I did not re-run the full Flow suite locally.

Merge order (unchanged)

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