Skip to content

Client version tests: keep the raised minimums above this release - #2219

Merged
davidmckayv merged 1 commit into
mainfrom
fix/client-version-fixture-raised-minimums
Nov 25, 2026
Merged

davidmckayv merged 1 commit into
mainfrom
fix/client-version-fixture-raised-minimums

Conversation

@davidmckayv

Copy link
Copy Markdown
Contributor

What broke

The 1.2.0 Publish release run (https://github.com/CopilotKit/OpenBot/actions/runs/45711156767) runs the full suite on a tree whose package.json says 1.2.0, and three tests failed:

  • app/tests/client-version-gate.test.tsx: "an OpenBot whose oldest web app is newer than this one: Update OpenBot, before sign-in"
  • mobile/tests/generated-client.test.ts: "before sign-in the app reads the deployment and decides: ..."
  • mobile/tests/generated-client.test.ts: "an OpenBot that raised the phone app's minimum for a security problem says so, ..."

Why

shared/fixtures/client-version/cases.json raised every app to 1.2.0 in its raised, next and security answers, as a minimum newer than this app. The web app's and the phone app's tests run those answers as the tree's own release (package.json). At 1.1.3 the app is below 1.2.0 and is refused; at 1.2.0 it is at the minimum and is served, so the tests saw "ok" where they expect "Update OpenBot". Main passes today only because it still says 1.1.3, and it gets 1.2.0 when the release merges back.

The change

  • The fixture's raised minimums are 9.0.0, above any release of this line. The cases that check "at the minimum is served" use 9.0.0 too, and the $comment says why the number is that high.
  • The tests that name the minimum follow: the web app's security case, the phone app's raised sentence, the shared belowMinimum test, and the two log lines in Desktop's connected-address test (desktop/src-tauri/src/connected/address.rs, inside its #[cfg(test)] module).
  • No product code changes. Desktop's own-OpenBot test in main.rs already sets its minimum above whatever the build is, and Desktop's other fixture tests run as 1.1.0, so they need nothing.
  • These five files are the same on release/1.2 as on main, so the commit cherry-picks cleanly.

Red, then green

With package.json set to 1.2.0 locally (not committed), on main's code:

app/tests/client-version-gate.test.tsx
(fail) an OpenBot whose oldest web app is newer than this one: Update OpenBot, before sign-in
  Expected: "app"  Received: "ok"
 9 pass, 1 fail

mobile/tests/generated-client.test.ts
(fail) before sign-in the app reads the deployment and decides: ...
  - "kind": "app", "detail": "This OpenBot needs the OpenBot phone app 1.2.0 or later. ..."
  + "kind": "ok"
(fail) an OpenBot that raised the phone app's minimum for a security problem says so, ...
  - "kind": "app", "detail": "This version of OpenBot has a security problem. ..."
  + "kind": "ok"
 24 pass, 2 fail

With this change, each fixture reader at each version:

package.json shared/tests/client-version app/tests/client-version-gate mobile/tests/client-version mobile/tests/generated-client
1.1.3 29 pass 10 pass 3 pass 26 pass
1.2.0 29 pass 10 pass 3 pass 26 pass
1.2.1 29 pass 10 pass 3 pass 26 pass
1.3.0 29 pass 10 pass 3 pass 26 pass

bun run lint and bun run format:check pass. The Rust tests run in this PR's CI.

The shared client-version fixture raised every app to 1.2.0 in its `raised`, `next` and
`security` answers, as a minimum newer than this app. The web app's and the phone app's tests
run those answers as the tree's own release, so on a tree whose package.json says 1.2.0 the app
is no longer below the minimum and three tests failed in the 1.2.0 release run.

The raised minimums are now 9.0.0, above any release of this line, and the tests that name the
minimum follow. The cases decide the same: below the minimum is refused, at it is served.
@davidmckayv
davidmckayv merged commit 1c3d2f9 into main Nov 25, 2026
50 checks passed
@davidmckayv
davidmckayv deleted the fix/client-version-fixture-raised-minimums branch November 25, 2026 22:41
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