Skip to content

ci(desktop): speed up release-intent tests and run them in their own job - #2570

Merged
abrichr merged 2 commits into
mainfrom
grok/speed-up-desktop-release-intent-tests
Nov 23, 2026
Merged

abrichr merged 2 commits into
mainfrom
grok/speed-up-desktop-release-intent-tests

Conversation

@abrichr

@abrichr abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member

Why

On Packages 45089464389, windows-latest Python 3.12 hit the 45-minute desktop engine-test timeout. The logs were not a hang: test_release_intent.py spent ~40 minutes recopying uv.lock / package-lock.json / Cargo.lock and running git init plus a dozen config/commit processes for every test (~1.9× slower on py3.12 than py3.11). The 300s SIGALRM deadline is a no-op on Windows.

This change does not delete or skip tests, weaken assertions, or raise the 45-minute timeout.

What

  • Build the starter git repo (version files, git init, hermetic config, initial commit) once per session and copy it into each test's tmp_path.
  • Run tests/test_release_intent.py in its own desktop-test.yml job with the same OS/Python matrix as the engine tests, and --ignore it in the engine-test job, so a slow Windows runner cannot starve the rest of the suite.

Test plan

  • PR-tier desktop test / Release intent tests (ubuntu-latest, py3.12) and Python engine tests (ubuntu-latest, py3.12) both pass.
  • Engine-test job no longer collects test_release_intent.py.
  • After merge, Windows py3.12 engine tests should finish well under 45 minutes; the new release-intent job should also stay under 45 minutes.

Windows Python 3.12 CI spent most of the 45-minute engine-test budget
in tests/test_release_intent.py recopying lockfiles and starting a
fresh git repo for every test. Build that starter repository once per
session and copy it into each test. Run the file in its own job with
the same OS/Python matrix so a slow runner cannot starve the rest of
the engine suite. No tests are removed, skipped, or weakened, and the
job timeout is unchanged.
@abrichr

abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Gemini
Reviewed-Head: 88f1efd

VERDICT: APPROVE

Independent cross-vendor adversarial review of 88f1efdefc5afe33057463270a5256e388aee287 (Grok-authored grok/speed-up-desktop-release-intent-tests; I authored none of this PR).

  • CI workflow split (.github/workflows/desktop-test.yml, README.md): Runs tests/test_release_intent.py in a dedicated release-intent-tests job with the exact same OS/Python matrix, needs: release-pending, timeout-minutes: 45, and persist-credentials: false, while test-python ignores that single file. No matrix leg, assertion, or release gate is weakened.
  • Test fixture isolation (packages/desktop/tests/test_release_intent.py): _release_intent_template (session-scoped) initializes the starter git repo once under _temporary_env(_hermetic_git_env(empty)) with clean finally env restoration, and function-scoped repo copies it into each test's isolated tmp_path (copytree(..., symlinks=False) / copy2). Zero assertions removed or relaxed.

@abrichr

abrichr commented Nov 23, 2026

Copy link
Copy Markdown
Member Author

Re-reviewed at head c8433104a48260b66759fccf94f299749826fb68: diff since previously approved 88f1efdefc is a clean merge of main (#2571, #2572, #2573) with zero PR-side changes.

APPROVE (Gemini) at head c8433104a48260b66759fccf94f299749826fb68.

@abrichr
abrichr merged commit fb8e172 into main Nov 23, 2026
61 of 62 checks passed
@abrichr
abrichr deleted the grok/speed-up-desktop-release-intent-tests branch November 23, 2026 06:35
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