Skip to content

fix(desktop): pin the overlay contract to in-tree openadapt-types 0.24.1 - #2554

Closed
abrichr wants to merge 1 commit into
mainfrom
grok/fix-desktop-types-pin
Closed

abrichr wants to merge 1 commit into
mainfrom
grok/fix-desktop-types-pin

Conversation

@abrichr

@abrichr abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member

Why

After #2543, in-tree openadapt-types is 0.24.1. Desktop engine tests install that in-tree package, then tests/test_control_overlay_contract_sync.py requires PINNED_TYPES_VERSION in scripts/sync_control_overlay_contract.py to match importlib.metadata.version("openadapt-types"). The pin was still 0.24.0, so every desktop test / Python engine tests job on tip failed with:

ValueError: openadapt-types 0.24.0 is required to generate the overlay contract; found 0.24.1

What

  • Set PINNED_TYPES_VERSION to 0.24.1.
  • Regenerated src/overlay/generated/contract.ts from the in-tree 0.24.1 package. Only the generated header version changed; the overlay schemas and TypeScript body are unchanged.

This does not bump any package version and does not change the install range (openadapt-types>=0.24.0,<0.25.0) or uv.lock (still the published 0.24.0). The pin is an exact check against the installed types package, not a PyPI fetch. CI already installs in-tree types for these unit tests, so aligning the pin does not require 0.24.1 to be on PyPI. Leaving the lock on 0.24.0 keeps uv sync / published Desktop installs working until 0.24.1 is published.

Verification

  • python packages/desktop/scripts/sync_control_overlay_contract.py --write and a follow-up check, with in-tree openadapt-types==0.24.1.
  • pytest tests/test_control_overlay_contract_sync.py: 1 passed.

The exact-version check in sync_control_overlay_contract.py still required
0.24.0, so desktop engine tests failed after #2543 left 0.24.1 in the tree.
The generated TypeScript is regenerated from the in-tree package; only the
header version changes. The install range stays >=0.24.0,<0.25.0 and uv.lock
is left on the published 0.24.0 until 0.24.1 is on PyPI.
@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Claude
Reviewed-Head: 1289031

The PyPI install question: no break. The pin does not make a Desktop release depend on the unpublished openadapt-types 0.24.1.

  • The PR leaves the install range (openadapt-types>=0.24.0,<0.25.0) and packages/desktop/uv.lock (0.24.0 from pypi.org) unchanged. PyPI serves 0.24.0 and not 0.24.1.
  • PINNED_TYPES_VERSION is read only by assert_control_overlay_contract_synced and write_contract. The only caller is tests/test_control_overlay_contract_sync.py.
  • That test runs in the Python engine tests job, which installs in-tree packages/types as editable. The jobs that use only locked PyPI types (Qualification contract, the desktop-release sidecar build and smoke steps) do not run the test. No workflow in nightly, packages or desktop-release runs it against locked 0.24.0 either.
  • The generated contract.ts body is byte-identical under 0.24.0 and 0.24.1. Only the header comment changes, so shipped overlay behavior does not depend on 0.24.1.
  • Merging this does not start an automatic types publish. release-package.yml publishes types only when 876f3f5 (the newest commit that changed packages/types) has a green push run. That run failed on flow core unit (shard 1/2), and the latest plan job says so ("Refusing to release types"). The publish waits on a re-run of that run, not on this PR. A green re-run would publish main's 0.24.1 content, which may differ from what release: openadapt-types 0.24.1 and openadapt-verify 0.2.1; launcher accepts Flow 4 #2540 intends for 0.24.1. That risk exists independently of this PR.

P1 merge blocker: the required check is red, and the obvious fix ships a Desktop release.

  • packages / desktop release intent fails on this head. The ci, packages-gate and run-ci failures are aggregates of that one job. The error: "This pull request changes Desktop in a way that should ship ... keeps version 0.31.3 ... Bump to 0.31.4 (patch)". check_release_intent.py reads the branch's commit subjects. A fix(desktop): commit that touches src/overlay/generated/contract.ts counts as shipped, because src/ is not in NOT_SHIPPED_PREFIXES.
  • That contradicts the PR body, which says the change bumps no version and needs no release.
  • A patch bump would make Desktop 0.31.4 release automatically. It would still install, because it resolves 0.24.0 from PyPI. But its bundled contract.ts would say "Generated from openadapt-types 0.24.1", a version that is not published and whose final content is still disputed (release: openadapt-types 0.24.1 and openadapt-verify 0.2.1; launcher accepts Flow 4 #2540 is open and changes packages/types source; revert: hold the unreviewed openadapt-types 0.24.1 bump until #2540 #2551 closed unmerged). The shipped wheel and sidecar would contain 0.24.0. The header is a comment, so this is a provenance error, not a functional one. It is still a false claim inside a release.
  • Requested change: reword the branch commit subject and the PR title to a non-shipping type, for example chore(desktop): align the overlay contract pin with in-tree openadapt-types 0.24.1. Only feat, fix and perf trigger the gate, so the check passes with no Desktop release. That matches the stated intent: a test-alignment fix with no version bump.

P3, optional: an exact-string pin needs a manual bump every time in-tree types moves, and it breaks again if main's types version goes back to 0.24.0. Pinning to the version in packages/types/pyproject.toml, or comparing rendered content rather than the version, would remove that coupling. This is not required for this PR.

@abrichr

abrichr commented Nov 22, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of #2558, which has the same two-line diff on a new grok/chore-desktop-types-pin branch and a single chore(desktop): align the overlay contract pin with in-tree openadapt-types 0.24.1 commit.

This addresses Claude's REQUEST CHANGES (7087026872) without force-pushing this branch. The desktop release-intent job runs check_release_intent.py --base HEAD^1 --head HEAD and inspects commit subjects in that range, not the PR title. A new commit on top of fix(desktop): would still have been classified as shippable, so a fresh branch was required. No version bump and no change to the intent check.

Please review #2558 instead. I will not self-review or merge it.

@abrichr abrichr closed this Nov 22, 2026
abrichr added a commit that referenced this pull request Nov 23, 2026
…-types 0.24.1 (#2558)

The exact-version check in sync_control_overlay_contract.py still required
0.24.0, so desktop engine tests failed after #2543 left 0.24.1 in the tree.
The generated TypeScript is regenerated from the in-tree package; only the
header version changes. The install range stays >=0.24.0,<0.25.0 and uv.lock
is left on the published 0.24.0 until 0.24.1 is on PyPI.

This is the same diff as #2554, with a non-shipping commit type so the
desktop release-intent check does not require a 0.31.4 bump. 0.31.3 is
still unpublished; this change does not bump any package version.
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