Skip to content

Tests: cover both NPU install paths in the Lemonade installer tests - #18651

Merged
danielhanchen merged 1 commit into
mainfrom
ci/lemonade-tests-direct-flm-default
Nov 20, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/lemonade-tests-direct-flm-default

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, studio-install) is red on main (seen on #18650, and reproduced on current main):

FAILED tests/studio/install/test_install_lemonade_prebuilt.py::test_install_verifies_and_pins_fastflowlm
FAILED tests/studio/install/test_install_lemonade_prebuilt.py::test_a_complete_install_is_not_downloaded_again
FAILED tests/studio/install/test_install_lemonade_prebuilt.py::test_a_fastflowlm_only_pin_bump_repins_lemond
FAILED tests/studio/install/test_install_lemonade_prebuilt.py::test_a_digest_mismatch_installs_nothing
FAILED tests/studio/install/test_install_lemonade_prebuilt.py::test_a_cancelled_download_installs_nothing
urllib.error.HTTPError: HTTP Error 404: File not found

Cause

#18554 made the direct FastFlowLM install the default on every supported host (Windows and Linux x86_64, as its description says). The lemond path now only runs with UNSLOTH_NPU_LEMONADE=1. The installer change is intended. These tests, though, were written for the lemond path and never opted in. So install() now took the direct path and asked the test's local server for a FastFlowLM archive that does not exist there, which returned the 404. The tests are out of date, not the installer.

Change

All changes are in tests/studio/install/test_install_lemonade_prebuilt.py; the installer is unchanged.

  • Two fixtures pin the path each test means to cover:
    • lemond_path sets UNSLOTH_NPU_LEMONADE=1 and asserts direct_flm() is False;
    • direct_path unsets it and asserts the default is the direct path.
      A future change of default therefore fails at the fixture instead of quietly testing one path against the other's assets.
  • The five existing tests use lemond_path, so the opt-in lemond path keeps its coverage.
  • The local server now also serves a real FastFlowLM archive (a tar.gz, or a zip on Windows), and the pins carry its actual digest.
  • Three new tests cover the default direct path, which had no installer test:
    • it installs the pinned FastFlowLM with no Lemonade, writes the marker, and does not download again once installed;
    • a digest mismatch installs nothing;
    • a cancelled download installs nothing.

Testing

  • On main the file fails 5 of 6. With this change: 9 passed.
  • Sabotage, installer side:
    • dropping the reuse check in _install_flm_direct fails the new test with "a complete FastFlowLM install was downloaded again";
    • disabling the sha256 check in _download fails both digest-mismatch tests (the lemond one and the direct one).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T17:46:26.905780Z d7c0b96 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: d7c0b96d8a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit d003846 into main Nov 20, 2026
@danielhanchen
danielhanchen deleted the ci/lemonade-tests-direct-flm-default branch November 20, 2026 17:47
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