Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

CI: fix path filters that miss dependencies, and narrow three that are too broad (#11989)

Daniel Hanfe996a88c5c0
diff --git a/.github/workflows/clean-machine-install-ci.yml b/.github/workflows/clean-machine-install-ci.yml
index 0e9cade61d9..abf21799fe1 100644
--- a/.github/workflows/clean-machine-install-ci.yml
+++ b/.github/workflows/clean-machine-install-ci.yml
@@ -77,6 +77,25 @@ on:
- '.github/scripts/select_install_matrix.py'
- '.github/ci/clean-machine-matrix.yml'
- '.github/workflows/clean-machine-install-ci.yml'
+ # The overlay legs run this ref's setup, which builds the frontend and runs npm
+ # install for the OXC validator on a toolchain-stripped host, so their manifests
+ # and lockfiles can change the no-build and no-toolchain verdicts. setup.sh runs
+ # nvidia_probe.py, and install_llama_prebuilt.py imports
+ # backend.utils.prebuilt.llama_backend and (through prebuilt_core.py)
+ # backend.utils.auth_safe and the vendored truststore, which decide the bundle
+ # assert-llama-loads.sh checks.
+ - 'studio/frontend/package.json'
+ - 'studio/frontend/package-lock.json'
+ - 'studio/frontend/.npmrc'
+ - 'studio/backend/core/data_recipe/oxc-validator/package.json'
+ - 'studio/backend/core/data_recipe/oxc-validator/package-lock.json'
+ - 'studio/nvidia_probe.py'
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'studio/backend/utils/prebuilt/llama_backend.py'
+ - 'studio/backend/vendor/truststore/**'
push:
branches: [main]
# Same list as the PR filter: without it a direct push to main touching any of
@@ -102,6 +121,25 @@ on:
- '.github/scripts/select_install_matrix.py'
- '.github/ci/clean-machine-matrix.yml'
- '.github/workflows/clean-machine-install-ci.yml'
+ # The overlay legs run this ref's setup, which builds the frontend and runs npm
+ # install for the OXC validator on a toolchain-stripped host, so their manifests
+ # and lockfiles can change the no-build and no-toolchain verdicts. setup.sh runs
+ # nvidia_probe.py, and install_llama_prebuilt.py imports
+ # backend.utils.prebuilt.llama_backend and (through prebuilt_core.py)
+ # backend.utils.auth_safe and the vendored truststore, which decide the bundle
+ # assert-llama-loads.sh checks.
+ - 'studio/frontend/package.json'
+ - 'studio/frontend/package-lock.json'
+ - 'studio/frontend/.npmrc'
+ - 'studio/backend/core/data_recipe/oxc-validator/package.json'
+ - 'studio/backend/core/data_recipe/oxc-validator/package-lock.json'
+ - 'studio/nvidia_probe.py'
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'studio/backend/utils/prebuilt/llama_backend.py'
+ - 'studio/backend/vendor/truststore/**'
schedule:
# Nightly, all 20 legs, on this ref's installers: `inputs.installer_source` is empty
# on schedule exactly as on pull_request and push, so the tree is under test.
diff --git a/.github/workflows/consolidated-tests-ci.yml b/.github/workflows/consolidated-tests-ci.yml
index 40a743050b6..e00ac0f8319 100644
--- a/.github/workflows/consolidated-tests-ci.yml
+++ b/.github/workflows/consolidated-tests-ci.yml
@@ -53,10 +53,32 @@ on:
paths:
- 'unsloth/**'
- 'unsloth_cli/**'
+ # studio/** minus the frontend and the Tauri shell. Nothing these jobs run reads a
+ # non-Python file under either: the named tests, the inline scripts,
+ # core-cpu-setup and the editable install were checked against the import and
+ # literal-reference graph of every file there, and the only readers found are
+ # install.sh and install.ps1 (icons), which no Core step runs. Python files come
+ # back in on the last line because test_python39_compatibility.py scans every
+ # studio/**/*.py and test_callback_signature_drift.py every .py outside frontend/.
+ # Order matters: the last matching pattern wins.
- 'studio/**'
+ - '!studio/frontend/**'
+ - '!studio/src-tauri/**'
+ - 'studio/**/*.py'
- 'tests/**'
- 'pyproject.toml'
- '.github/workflows/consolidated-tests-ci.yml'
+ # tests/test_callback_signature_drift.py (a hard gate in the consolidated job)
+ # parses every .py file in the repo outside dot-directories and frontend/, so a
+ # Python file anywhere can change its verdict, not only the ones under the source
+ # trees above.
+ - '*.py'
+ - 'scripts/**/*.py'
+ - 'docker/**/*.py'
+ # Every job here `uses:` the pip cache pair, so an edit to either action changes
+ # what it runs.
+ - '.github/actions/pip-cache-restore/**'
+ - '.github/actions/pip-cache-save/**'
- '.github/scripts/retry-with-apt-lock.sh'
# Both Core jobs `uses:` this action, so a change to it must run them.
- '.github/actions/core-cpu-setup/**'
@@ -66,10 +88,32 @@ on:
paths:
- 'unsloth/**'
- 'unsloth_cli/**'
+ # studio/** minus the frontend and the Tauri shell. Nothing these jobs run reads a
+ # non-Python file under either: the named tests, the inline scripts,
+ # core-cpu-setup and the editable install were checked against the import and
+ # literal-reference graph of every file there, and the only readers found are
+ # install.sh and install.ps1 (icons), which no Core step runs. Python files come
+ # back in on the last line because test_python39_compatibility.py scans every
+ # studio/**/*.py and test_callback_signature_drift.py every .py outside frontend/.
+ # Order matters: the last matching pattern wins.
- 'studio/**'
+ - '!studio/frontend/**'
+ - '!studio/src-tauri/**'
+ - 'studio/**/*.py'
- 'tests/**'
- 'pyproject.toml'
- '.github/workflows/consolidated-tests-ci.yml'
+ # tests/test_callback_signature_drift.py (a hard gate in the consolidated job)
+ # parses every .py file in the repo outside dot-directories and frontend/, so a
+ # Python file anywhere can change its verdict, not only the ones under the source
+ # trees above.
+ - '*.py'
+ - 'scripts/**/*.py'
+ - 'docker/**/*.py'
+ # Every job here `uses:` the pip cache pair, so an edit to either action changes
+ # what it runs.
+ - '.github/actions/pip-cache-restore/**'
+ - '.github/actions/pip-cache-save/**'
- '.github/scripts/retry-with-apt-lock.sh'
# Both Core jobs `uses:` this action, so a change to it must run them.
- '.github/actions/core-cpu-setup/**'
diff --git a/.github/workflows/cross-platform-parity-ci.yml b/.github/workflows/cross-platform-parity-ci.yml
index ba2f5be54c5..35502c4a713 100644
--- a/.github/workflows/cross-platform-parity-ci.yml
+++ b/.github/workflows/cross-platform-parity-ci.yml
@@ -115,6 +115,30 @@ on:
- 'tests/sh/test_setup_xpu_posix_summary.sh'
- 'studio/setup.sh'
- '.github/workflows/cross-platform-parity-ci.yml'
+ # Read or executed by the parity tests above but not matched by any entry:
+ # test_install_rollback_lifecycle.sh sources _harness.sh and _ps1_source.sh;
+ # test_windows_setup_output_encoding.py dot-sources Get-FunctionSource.ps1 and
+ # asserts on install.rs and update.rs next to process.rs;
+ # test_installer_skip_autostart.py asserts on README.md;
+ # test_installer_profile_hardening.py imports unsloth_cli.commands, which imports
+ # every command module; prebuilt_core.py imports auth_safe.py and llama_backend.py
+ # needs its package init. The pytest step runs from the repo root, so the root
+ # conftest, tests/_shared and the pytest config in pyproject.toml apply on all
+ # three operating systems.
+ - 'tests/sh/_harness.sh'
+ - 'tests/sh/_ps1_source.sh'
+ - 'tests/studio_setup_ps1/Get-FunctionSource.ps1'
+ - 'studio/src-tauri/src/install.rs'
+ - 'studio/src-tauri/src/update.rs'
+ - 'README.md'
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ - 'pyproject.toml'
push:
branches: [main]
paths:
@@ -203,6 +227,30 @@ on:
- 'tests/sh/test_setup_xpu_posix_summary.sh'
- 'studio/setup.sh'
- '.github/workflows/cross-platform-parity-ci.yml'
+ # Read or executed by the parity tests above but not matched by any entry:
+ # test_install_rollback_lifecycle.sh sources _harness.sh and _ps1_source.sh;
+ # test_windows_setup_output_encoding.py dot-sources Get-FunctionSource.ps1 and
+ # asserts on install.rs and update.rs next to process.rs;
+ # test_installer_skip_autostart.py asserts on README.md;
+ # test_installer_profile_hardening.py imports unsloth_cli.commands, which imports
+ # every command module; prebuilt_core.py imports auth_safe.py and llama_backend.py
+ # needs its package init. The pytest step runs from the repo root, so the root
+ # conftest, tests/_shared and the pytest config in pyproject.toml apply on all
+ # three operating systems.
+ - 'tests/sh/_harness.sh'
+ - 'tests/sh/_ps1_source.sh'
+ - 'tests/studio_setup_ps1/Get-FunctionSource.ps1'
+ - 'studio/src-tauri/src/install.rs'
+ - 'studio/src-tauri/src/update.rs'
+ - 'README.md'
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ - 'pyproject.toml'
workflow_dispatch:
concurrency:
diff --git a/.github/workflows/desktop-app-clean-machine-ci.yml b/.github/workflows/desktop-app-clean-machine-ci.yml
index a149353c048..99fce5a7cf0 100644
--- a/.github/workflows/desktop-app-clean-machine-ci.yml
+++ b/.github/workflows/desktop-app-clean-machine-ci.yml
@@ -30,10 +30,32 @@ on:
- '.github/scripts/resolve-desktop-release.py'
- '.github/scripts/clean-machine-env.sh'
- '.github/scripts/clean-machine-assert.sh'
+ # The macOS job's toolchain strip step runs this helper by name, and
+ # clean-machine-env.sh sources it as a sibling.
+ - '.github/scripts/clean-machine-install-name-tool.sh'
- '.github/workflows/release-desktop.yml'
- 'studio/src-tauri/linux/**'
- 'studio/src-tauri/src/**'
- 'studio/src-tauri/tauri.conf.json'
+ # appimage-pr-build (pull_request only) builds the AppImage from this ref. The
+ # lockfile audit runs first and reads every default lockfile; npm ci and npm
+ # install --prefix studio read the manifests, lockfiles and .npmrc; tauri build
+ # compiles the crate with its build script, and embeds the capabilities, icons and
+ # Linux config overlay. A change to any of them changes the artifact the
+ # portability and model-download jobs test.
+ - 'scripts/lockfile_supply_chain_audit.py'
+ - 'studio/package.json'
+ - 'studio/package-lock.json'
+ - 'studio/frontend/package.json'
+ - 'studio/frontend/package-lock.json'
+ - 'studio/frontend/.npmrc'
+ - 'studio/backend/core/data_recipe/oxc-validator/package-lock.json'
+ - 'studio/src-tauri/Cargo.toml'
+ - 'studio/src-tauri/Cargo.lock'
+ - 'studio/src-tauri/build.rs'
+ - 'studio/src-tauri/capabilities/**'
+ - 'studio/src-tauri/icons/**'
+ - 'studio/src-tauri/tauri.linux.conf.json'
- 'tests/security/test_release_desktop_appimage.py'
- 'tests/studio/appimage_test_support.py'
- 'tests/studio/appimage_portability_smoke.py'
diff --git a/.github/workflows/interrupted-install-ci.yml b/.github/workflows/interrupted-install-ci.yml
index f7c0cd83452..a6467d21f14 100644
--- a/.github/workflows/interrupted-install-ci.yml
+++ b/.github/workflows/interrupted-install-ci.yml
@@ -49,6 +49,13 @@ on:
- '.github/scripts/select_install_matrix.py'
- '.github/ci/interrupted-install-matrix.yml'
- '.github/workflows/interrupted-install-ci.yml'
+ # interrupted_install_probe.py runs this checkout's CLI (unsloth -h, studio
+ # desktop-capabilities, verify-install, desktop-runtime-check).
+ # unsloth_cli/__init__.py imports every command module, and the ready or stale
+ # verdict is computed in _studio_runtime_gate.py, _studio_stage.py and
+ # _system_dir_guard.py.
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
- '.github/scripts/retry-with-apt-lock.sh'
# Every push to main that touches an installer runs the full set, so a merge is
# covered at merge time and not only by the nightly.
@@ -71,6 +78,13 @@ on:
- '.github/scripts/select_install_matrix.py'
- '.github/ci/interrupted-install-matrix.yml'
- '.github/workflows/interrupted-install-ci.yml'
+ # interrupted_install_probe.py runs this checkout's CLI (unsloth -h, studio
+ # desktop-capabilities, verify-install, desktop-runtime-check).
+ # unsloth_cli/__init__.py imports every command module, and the ready or stale
+ # verdict is computed in _studio_runtime_gate.py, _studio_stage.py and
+ # _system_dir_guard.py.
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
- '.github/scripts/retry-with-apt-lock.sh'
schedule:
# Nightly, all 10 legs. Offset from clean-machine-install-ci.yml's 09:23 so the two
diff --git a/.github/workflows/kaggle-t4-notebook-ci.yml b/.github/workflows/kaggle-t4-notebook-ci.yml
index e070360699f..fd2c7001d02 100644
--- a/.github/workflows/kaggle-t4-notebook-ci.yml
+++ b/.github/workflows/kaggle-t4-notebook-ci.yml
@@ -281,6 +281,9 @@ on:
- 'tests/kaggle/**'
- '.github/scripts/kaggle_t4_ci/**'
- '.github/workflows/kaggle-t4-notebook-ci.yml'
+ # When the kernel is built with Studio, the gated t4-smoke job runs
+ # kaggle_studio_ci/collect_evidence.py and kaggle_studio_ci/report.py by path.
+ - '.github/scripts/kaggle_studio_ci/**'
# The payloads install the commit under test as a distribution, so the
# file saying how it is built and what it needs is part of what this
# workflow tests. BUDGET.md counted it as a watched path already.
@@ -292,6 +295,9 @@ on:
- 'tests/kaggle/**'
- '.github/scripts/kaggle_t4_ci/**'
- '.github/workflows/kaggle-t4-notebook-ci.yml'
+ # When the kernel is built with Studio, the gated t4-smoke job runs
+ # kaggle_studio_ci/collect_evidence.py and kaggle_studio_ci/report.py by path.
+ - '.github/scripts/kaggle_studio_ci/**'
- 'pyproject.toml'
# NIGHTLY, for the legs that cannot be per-PR. The GRPO leg is the whole
# reason this trigger exists: measured over nine T4 sessions it hits an
diff --git a/.github/workflows/local-agent-guides-ci.yml b/.github/workflows/local-agent-guides-ci.yml
index e47730c8f07..1165eea90b2 100644
--- a/.github/workflows/local-agent-guides-ci.yml
+++ b/.github/workflows/local-agent-guides-ci.yml
@@ -60,6 +60,18 @@ on:
- 'studio/backend/models/**'
- 'install.sh'
- '.github/workflows/local-agent-guides-ci.yml'
+ # Every connection cell installs through install-unsloth-local, and install.sh
+ # --local hands off to studio/setup.sh, which runs the installer modules below.
+ # They pick the llama-server binary that serve-unsloth-run.sh and
+ # assert-prompt-cache.sh measure; pyproject.toml and the backend requirements
+ # decide what is installed.
+ - 'studio/setup.sh'
+ - 'studio/install_*.py'
+ - 'studio/prebuilt_core.py'
+ - 'studio/nvidia_probe.py'
+ - 'studio/node_prebuilt_pins.json'
+ - 'pyproject.toml'
+ - 'studio/backend/requirements/**'
- '.github/scripts/retry-with-apt-lock.sh'
# The install step in this workflow is `uses:` on that composite action,
# so an edit to the action changes what this workflow actually runs.
@@ -90,6 +102,18 @@ on:
- 'studio/backend/models/**'
- 'install.sh'
- '.github/workflows/local-agent-guides-ci.yml'
+ # Every connection cell installs through install-unsloth-local, and install.sh
+ # --local hands off to studio/setup.sh, which runs the installer modules below.
+ # They pick the llama-server binary that serve-unsloth-run.sh and
+ # assert-prompt-cache.sh measure; pyproject.toml and the backend requirements
+ # decide what is installed.
+ - 'studio/setup.sh'
+ - 'studio/install_*.py'
+ - 'studio/prebuilt_core.py'
+ - 'studio/nvidia_probe.py'
+ - 'studio/node_prebuilt_pins.json'
+ - 'pyproject.toml'
+ - 'studio/backend/requirements/**'
- '.github/scripts/retry-with-apt-lock.sh'
- '.github/actions/install-unsloth-local/action.yml'
# Reached through install-unsloth-local, which uses the dist and uv cache pairs.
diff --git a/.github/workflows/mlx-ci.yml b/.github/workflows/mlx-ci.yml
index e6ebd6e14db..d82ef651d82 100644
--- a/.github/workflows/mlx-ci.yml
+++ b/.github/workflows/mlx-ci.yml
@@ -102,6 +102,31 @@ on:
- '.github/scripts/boot-studio-api-only.sh'
- '.github/scripts/wait-for-health.sh'
- '.github/workflows/mlx-ci.yml'
+ # The prebuilt llama.cpp step runs studio/install_llama_prebuilt.py by path and
+ # fetches the GGUF through hf-download-with-retry.sh. The installer imports
+ # prebuilt_core.py and nvidia_probe.py beside it, and
+ # backend.utils.prebuilt.llama_backend and backend.utils.auth_safe (with the
+ # vendored truststore) from the backend, so these decide which bundle it installs.
+ # The job also pip installs studio.txt and the repo itself, and its pytest runs
+ # load tests/conftest.py, which loads tests/_shared.
+ - '.github/scripts/hf-download-with-retry.sh'
+ - 'studio/install_llama_prebuilt.py'
+ - 'studio/prebuilt_core.py'
+ - 'studio/nvidia_probe.py'
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'studio/backend/utils/prebuilt/llama_backend.py'
+ - 'studio/backend/vendor/truststore/**'
+ - 'studio/backend/requirements/studio.txt'
+ - 'pyproject.toml'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ # Every job here `uses:` the pip cache pair, so an edit to either action changes
+ # what it runs.
+ - '.github/actions/pip-cache-restore/**'
+ - '.github/actions/pip-cache-save/**'
push:
branches: [main]
paths:
@@ -120,6 +145,31 @@ on:
- '.github/scripts/boot-studio-api-only.sh'
- '.github/scripts/wait-for-health.sh'
- '.github/workflows/mlx-ci.yml'
+ # The prebuilt llama.cpp step runs studio/install_llama_prebuilt.py by path and
+ # fetches the GGUF through hf-download-with-retry.sh. The installer imports
+ # prebuilt_core.py and nvidia_probe.py beside it, and
+ # backend.utils.prebuilt.llama_backend and backend.utils.auth_safe (with the
+ # vendored truststore) from the backend, so these decide which bundle it installs.
+ # The job also pip installs studio.txt and the repo itself, and its pytest runs
+ # load tests/conftest.py, which loads tests/_shared.
+ - '.github/scripts/hf-download-with-retry.sh'
+ - 'studio/install_llama_prebuilt.py'
+ - 'studio/prebuilt_core.py'
+ - 'studio/nvidia_probe.py'
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'studio/backend/utils/prebuilt/llama_backend.py'
+ - 'studio/backend/vendor/truststore/**'
+ - 'studio/backend/requirements/studio.txt'
+ - 'pyproject.toml'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ # Every job here `uses:` the pip cache pair, so an edit to either action changes
+ # what it runs.
+ - '.github/actions/pip-cache-restore/**'
+ - '.github/actions/pip-cache-save/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
diff --git a/.github/workflows/notebooks-ci.yml b/.github/workflows/notebooks-ci.yml
index 2a4da4ed13f..703983799d0 100644
--- a/.github/workflows/notebooks-ci.yml
+++ b/.github/workflows/notebooks-ci.yml
@@ -37,6 +37,19 @@ on:
- 'tests/_zoo_aggressive_cuda_spoof.py'
- 'tests/_torchcodec_stub.py'
- '.github/workflows/notebooks-ci.yml'
+ # The smoke-install contract runs under pytest from the repo checkout, so the root
+ # conftest, the tests package, the tests/_shared helpers it loads
+ # (installer_venv_root.py imports studio/install_manifest.py) and the pytest
+ # config in pyproject.toml all shape the run.
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ - 'studio/install_manifest.py'
+ - 'pyproject.toml'
+ # Every job here `uses:` the pip cache pair, so an edit to either action changes
+ # what it runs.
+ - '.github/actions/pip-cache-restore/**'
+ - '.github/actions/pip-cache-save/**'
schedule:
# Daily 06:17 UTC. Catches Colab preinstall bumps (the upstream image
# is rebuilt roughly weekly) without us waiting on a PR. Off the
diff --git a/.github/workflows/rag-upload-compatibility.yml b/.github/workflows/rag-upload-compatibility.yml
index 55b0006d4be..38e92567d8e 100644
--- a/.github/workflows/rag-upload-compatibility.yml
+++ b/.github/workflows/rag-upload-compatibility.yml
@@ -9,6 +9,23 @@ on:
- "studio/frontend/tests/rag-*"
- "tests/studio/rag_upload*"
- ".github/workflows/rag-upload-compatibility.yml"
+ # tests/studio/rag_upload_ci.py also runs test_conversation_archive.py, whose
+ # collection loads studio/backend/tests/conftest.py (which execs
+ # tests/_shared/compile_cache_isolation.py and imports loggers), and runs every
+ # project-attachment*.test.ts and project-source*.test.ts with node --test; those
+ # import the helpers kit and store stubs and three chat modules outside
+ # features/rag. The apt step shells out to retry-with-apt-lock.sh.
+ - 'studio/backend/tests/test_conversation_archive.py'
+ - 'studio/backend/tests/conftest.py'
+ - 'tests/_shared/compile_cache_isolation.py'
+ - 'studio/backend/loggers/**'
+ - 'studio/frontend/tests/project-attachment*'
+ - 'studio/frontend/tests/project-source*'
+ - 'studio/frontend/tests/helpers/**'
+ - 'studio/frontend/src/features/chat/utils/project-attachment-target.ts'
+ - 'studio/frontend/src/features/chat/utils/project-source-plan.ts'
+ - 'studio/frontend/src/features/chat/api/rag-context-length.ts'
+ - '.github/scripts/retry-with-apt-lock.sh'
permissions:
contents: read
diff --git a/.github/workflows/security-audit.yml b/.github/workflows/security-audit.yml
index aa5340fb7f8..cd33b7743b9 100644
--- a/.github/workflows/security-audit.yml
+++ b/.github/workflows/security-audit.yml
@@ -75,17 +75,21 @@ on:
- 'studio/src-tauri/Cargo.toml'
- 'scripts/scan_packages.py'
- 'scripts/scan_packages_baseline.json'
- - 'tests/security/**'
- # The production code the security suites protect. Without these, a PR touching
- # only `loader_utils.py` skipped this job entirely - the always-running light
- # workflow ignores those three suites - so the tests ran for the first time on
- # the push event, after the regression had already merged.
- - 'unsloth/models/loader_utils.py'
- - 'unsloth/models/mapper.py'
- - 'unsloth/models/_custom_dtype.py'
- - 'unsloth/models/loader.py'
- - 'unsloth/models/vision.py'
- - 'unsloth/models/_utils.py'
+ # Gating steps run these scripts and read these inputs on a pull request:
+ # advisory-audit runs lockfile_supply_chain_audit.py, which reads every lockfile
+ # in its DEFAULT_NPM_LOCKFILES and DEFAULT_CARGO_LOCKFILES; npm-scan-packages runs
+ # scan_npm_packages.py against its baseline with SCAN_ENFORCE=1; and
+ # npm-provenance-and-install-scripts runs check_new_install_scripts.py.
+ - 'scripts/lockfile_supply_chain_audit.py'
+ - 'studio/package-lock.json'
+ - 'studio/backend/core/data_recipe/oxc-validator/package-lock.json'
+ - 'scripts/scan_npm_packages.py'
+ - 'scripts/scan_npm_packages_baseline.json'
+ - 'scripts/check_new_install_scripts.py'
+ # Not tests/security/** or the unsloth/models files those suites protect: no job
+ # here runs pytest any more. The suites moved to workflow-trigger-lint.yml, which
+ # has no paths filter (tests/studio/test_short_job_absorption.py keeps them there),
+ # so those files already run the suites on every pull request.
- '.github/workflows/security-audit.yml'
push:
branches: [main]
diff --git a/.github/workflows/startup-profile-ci.yml b/.github/workflows/startup-profile-ci.yml
index 13b4636475e..5718420541a 100644
--- a/.github/workflows/startup-profile-ci.yml
+++ b/.github/workflows/startup-profile-ci.yml
@@ -48,6 +48,14 @@ on:
- 'studio/src-tauri/src/process.rs'
- 'scripts/profile_startup.py'
- '.github/workflows/startup-profile-ci.yml'
+ # The install step runs install.sh --local and install.ps1 --local on all three
+ # cells. The setup scripts listed above run every studio/install_*.py module and
+ # nvidia_probe.py, and the installers read the prebuilt pins, so these change what
+ # gets installed before the profile is taken.
+ - 'studio/install_*.py'
+ - 'studio/prebuilt_core.py'
+ - 'studio/nvidia_probe.py'
+ - 'studio/node_prebuilt_pins.json'
# The job profiles whatever `install.sh --local` built: the installers pick the
# venv's Python and the dependency specs, and pyproject's include list is what
# makes --local overlay studio.backend*.
diff --git a/.github/workflows/studio-backend-ci.yml b/.github/workflows/studio-backend-ci.yml
index 3899fa75728..c28a9cc87ac 100644
--- a/.github/workflows/studio-backend-ci.yml
+++ b/.github/workflows/studio-backend-ci.yml
@@ -62,6 +62,29 @@ on:
- '.github/workflows/docker-publish.yml'
- '.pre-commit-config.yaml'
- '.github/workflows/studio-backend-ci.yml'
+ # Tests this workflow collects read these directly (the kaggle harness tests, the
+ # prebuilt-wheel, signing, docker, installer-evidence and WoA tests, the
+ # studiobench parity selftests and others). workflow-trigger-lint.yml runs only
+ # the tests/studio guard modules and tests/security, so without these a change to
+ # one of the files below runs none of the tests that check it.
+ - '.github/scripts/**'
+ - '.github/ci/**'
+ - '.github/ci-preempt.json'
+ - '.github/workflows/consolidated-tests-ci.yml'
+ - '.github/workflows/cross-platform-parity-ci.yml'
+ - '.github/workflows/docker-credential-probe.yml'
+ - '.github/workflows/docker-publish-rocm.yml'
+ - '.github/workflows/kaggle-collect.yml'
+ - '.github/workflows/kaggle-t4-notebook-ci.yml'
+ - '.github/workflows/kaggle-t4-studio-gpu-ci.yml'
+ - '.github/workflows/notebooks-ci.yml'
+ - '.github/workflows/prebuilt-cuda-wheels.yml'
+ - '.github/workflows/release-desktop.yml'
+ - '.github/workflows/startup-profile-ci.yml'
+ - '.github/workflows/studiobench-ui-parity.yml'
+ - '.github/workflows/windows-arm64-ci.yml'
+ - '.github/workflows/windows-installer-differential-ci.yml'
+ - '.github/workflows/woa-wheelhouse.yml'
- '.github/scripts/retry-with-apt-lock.sh'
# tests/python/test_amd_extras_contract.py asserts against this file.
- '.github/workflows/security-audit.yml'
@@ -81,6 +104,29 @@ on:
- '.github/workflows/docker-publish.yml'
- '.pre-commit-config.yaml'
- '.github/workflows/studio-backend-ci.yml'
+ # Tests this workflow collects read these directly (the kaggle harness tests, the
+ # prebuilt-wheel, signing, docker, installer-evidence and WoA tests, the
+ # studiobench parity selftests and others). workflow-trigger-lint.yml runs only
+ # the tests/studio guard modules and tests/security, so without these a change to
+ # one of the files below runs none of the tests that check it.
+ - '.github/scripts/**'
+ - '.github/ci/**'
+ - '.github/ci-preempt.json'
+ - '.github/workflows/consolidated-tests-ci.yml'
+ - '.github/workflows/cross-platform-parity-ci.yml'
+ - '.github/workflows/docker-credential-probe.yml'
+ - '.github/workflows/docker-publish-rocm.yml'
+ - '.github/workflows/kaggle-collect.yml'
+ - '.github/workflows/kaggle-t4-notebook-ci.yml'
+ - '.github/workflows/kaggle-t4-studio-gpu-ci.yml'
+ - '.github/workflows/notebooks-ci.yml'
+ - '.github/workflows/prebuilt-cuda-wheels.yml'
+ - '.github/workflows/release-desktop.yml'
+ - '.github/workflows/startup-profile-ci.yml'
+ - '.github/workflows/studiobench-ui-parity.yml'
+ - '.github/workflows/windows-arm64-ci.yml'
+ - '.github/workflows/windows-installer-differential-ci.yml'
+ - '.github/workflows/woa-wheelhouse.yml'
- '.github/scripts/retry-with-apt-lock.sh'
- '.github/workflows/security-audit.yml'
diff --git a/.github/workflows/studio-composer-compatibility.yml b/.github/workflows/studio-composer-compatibility.yml
index 6ce6276f832..6d4ae52a9e1 100644
--- a/.github/workflows/studio-composer-compatibility.yml
+++ b/.github/workflows/studio-composer-compatibility.yml
@@ -6,15 +6,18 @@ name: Composer compatibility
on:
pull_request:
paths:
- - 'studio/frontend/src/components/assistant-ui/**'
- - 'studio/frontend/src/features/chat/**'
- - 'studio/frontend/src/features/settings/components/composer-settings.tsx'
- - 'studio/frontend/src/index.css'
- # playwright_queue_localization.py drives the queue surface in ja and asserts the
- # shipped Japanese, so a translation-only edit is exactly the change that can break
- # it, and this workflow is its only invocation. index.ts is in scope with the
- # catalogs because the driver calls setLocale through it.
- - 'studio/frontend/src/i18n/**'
+ # The smoke pages (smoke-composer-settings, smoke-prompt-queue-actions) are served
+ # by vite from this ref, and their static import graph reaches about 855 files
+ # across studio/frontend/src, 483 of them outside the directories this list used
+ # to name (features/settings, lib, components, hooks and more). An edit to any of
+ # them changes what the pages load and assert, so the whole source tree is listed.
+ # npm ci reads .npmrc and the build reads the tsconfig files. src/** keeps
+ # src/i18n: playwright_queue_localization.py drives the queue surface in ja and
+ # asserts the shipped Japanese, so a translation-only edit is exactly the change
+ # that can break it, and this workflow is its only invocation.
+ - 'studio/frontend/src/**'
+ - 'studio/frontend/.npmrc'
+ - 'studio/frontend/tsconfig*.json'
- 'studio/frontend/smoke-*'
- 'studio/frontend/tests/**'
- 'studio/frontend/package*.json'
@@ -29,6 +32,9 @@ on:
# Both drivers find their controls through this reader, so a change to it is a change to them.
- 'tests/studio/_en_catalog.py'
- '.github/workflows/studio-composer-compatibility.yml'
+ # The first gating step runs this auditor, so an edit to it changes what this
+ # workflow runs.
+ - 'scripts/lockfile_supply_chain_audit.py'
- '.github/scripts/retry-with-apt-lock.sh'
workflow_dispatch:
diff --git a/.github/workflows/studio-export-capability-ci.yml b/.github/workflows/studio-export-capability-ci.yml
index a1b68f7a024..c7dbe310649 100644
--- a/.github/workflows/studio-export-capability-ci.yml
+++ b/.github/workflows/studio-export-capability-ci.yml
@@ -26,6 +26,25 @@ on:
- '.github/actions/pip-cache-save/action.yml'
- 'studio/backend/utils/hardware/**'
- '.github/workflows/studio-export-capability-ci.yml'
+ # The test imports core.export.export under pytest in studio/backend, so
+ # collection loads studio/backend/tests/conftest.py (which execs
+ # tests/_shared/compile_cache_isolation.py and imports loggers) and the pytest
+ # config in pyproject.toml, and export.py imports these packages at module scope.
+ # A new top-level torch import in any of them is what this Windows lane exists to
+ # catch.
+ - 'studio/backend/tests/conftest.py'
+ - 'tests/_shared/compile_cache_isolation.py'
+ - 'studio/backend/loggers/**'
+ - 'pyproject.toml'
+ - 'studio/backend/core/__init__.py'
+ - 'studio/backend/core/export/__init__.py'
+ - 'studio/backend/core/inference/__init__.py'
+ - 'studio/backend/hub/__init__.py'
+ - 'studio/backend/hub/utils/__init__.py'
+ - 'studio/backend/hub/utils/hf_tokens.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/models/**'
+ - 'studio/backend/utils/paths/**'
push:
branches: [main]
paths:
@@ -37,6 +56,25 @@ on:
- '.github/actions/pip-cache-save/action.yml'
- 'studio/backend/utils/hardware/**'
- '.github/workflows/studio-export-capability-ci.yml'
+ # The test imports core.export.export under pytest in studio/backend, so
+ # collection loads studio/backend/tests/conftest.py (which execs
+ # tests/_shared/compile_cache_isolation.py and imports loggers) and the pytest
+ # config in pyproject.toml, and export.py imports these packages at module scope.
+ # A new top-level torch import in any of them is what this Windows lane exists to
+ # catch.
+ - 'studio/backend/tests/conftest.py'
+ - 'tests/_shared/compile_cache_isolation.py'
+ - 'studio/backend/loggers/**'
+ - 'pyproject.toml'
+ - 'studio/backend/core/__init__.py'
+ - 'studio/backend/core/export/__init__.py'
+ - 'studio/backend/core/inference/__init__.py'
+ - 'studio/backend/hub/__init__.py'
+ - 'studio/backend/hub/utils/__init__.py'
+ - 'studio/backend/hub/utils/hf_tokens.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/models/**'
+ - 'studio/backend/utils/paths/**'
workflow_dispatch:
concurrency:
diff --git a/.github/workflows/studio-mac-install-matrix.yml b/.github/workflows/studio-mac-install-matrix.yml
index c6ffae308ea..03b724707db 100644
--- a/.github/workflows/studio-mac-install-matrix.yml
+++ b/.github/workflows/studio-mac-install-matrix.yml
@@ -16,6 +16,16 @@ on:
- 'install.sh'
- '.github/scripts/assert-llama-loads.sh'
- '.github/workflows/studio-mac-install-matrix.yml'
+ # install_llama_prebuilt.py, the module this matrix guards, imports
+ # backend.utils.prebuilt.llama_backend at module scope, and prebuilt_core.py
+ # imports backend.utils.auth_safe and the vendored truststore. They choose and
+ # fetch the bundle assert-llama-loads.sh checks.
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'studio/backend/utils/prebuilt/llama_backend.py'
+ - 'studio/backend/vendor/truststore/**'
# The install step in this workflow is `uses:` on that composite action,
# so an edit to the action changes what this workflow actually runs.
- '.github/actions/install-unsloth-local/action.yml'
@@ -58,6 +68,16 @@ on:
- 'install.sh'
- '.github/scripts/assert-llama-loads.sh'
- '.github/workflows/studio-mac-install-matrix.yml'
+ # install_llama_prebuilt.py, the module this matrix guards, imports
+ # backend.utils.prebuilt.llama_backend at module scope, and prebuilt_core.py
+ # imports backend.utils.auth_safe and the vendored truststore. They choose and
+ # fetch the bundle assert-llama-loads.sh checks.
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'studio/backend/utils/prebuilt/llama_backend.py'
+ - 'studio/backend/vendor/truststore/**'
# The install step in this workflow is `uses:` on that composite action,
# so an edit to the action changes what this workflow actually runs.
- '.github/actions/install-unsloth-local/action.yml'
diff --git a/.github/workflows/studio-mac-ui-smoke.yml b/.github/workflows/studio-mac-ui-smoke.yml
index 4e8e887a502..07017ab5405 100644
--- a/.github/workflows/studio-mac-ui-smoke.yml
+++ b/.github/workflows/studio-mac-ui-smoke.yml
@@ -43,10 +43,18 @@ on:
- 'install.sh'
- 'pyproject.toml'
# The Playwright drivers and studio_api_smoke.py the phases run.
- - 'tests/studio/**'
+ # The files under tests/studio the jobs execute, not all of it (hundreds of guard
+ # tests and PowerShell units no step here runs). The lanes run
+ # tests/studio/playwright_*.py scripts as plain python, whose only local import is
+ # _playwright_robust.py, and the API step runs studio_api_smoke.py.
+ - 'tests/studio/playwright_*.py'
+ - 'tests/studio/_playwright_robust.py'
+ - 'tests/studio/studio_api_smoke.py'
- '.github/scripts/run-studio-permission-browser.sh'
- '.github/scripts/run-studio-indicator-browser.sh'
- '.github/workflows/studio-mac-ui-smoke.yml'
+ # setup.sh runs nvidia_probe.py on every install, macOS included.
+ - 'studio/nvidia_probe.py'
- 'scripts/lockfile_supply_chain_audit.py'
# Every server boot in this workflow shells out to that script, so an edit
# to it changes what this workflow actually runs.
@@ -92,10 +100,18 @@ on:
- 'unsloth_cli/**'
- 'install.sh'
- 'pyproject.toml'
- - 'tests/studio/**'
+ # The files under tests/studio the jobs execute, not all of it (hundreds of guard
+ # tests and PowerShell units no step here runs). The lanes run
+ # tests/studio/playwright_*.py scripts as plain python, whose only local import is
+ # _playwright_robust.py, and the API step runs studio_api_smoke.py.
+ - 'tests/studio/playwright_*.py'
+ - 'tests/studio/_playwright_robust.py'
+ - 'tests/studio/studio_api_smoke.py'
- '.github/scripts/run-studio-permission-browser.sh'
- '.github/scripts/run-studio-indicator-browser.sh'
- '.github/workflows/studio-mac-ui-smoke.yml'
+ # setup.sh runs nvidia_probe.py on every install, macOS included.
+ - 'studio/nvidia_probe.py'
- 'scripts/lockfile_supply_chain_audit.py'
# Every server boot in this workflow shells out to that script, so an edit
# to it changes what this workflow actually runs.
diff --git a/.github/workflows/studio-tauri-smoke.yml b/.github/workflows/studio-tauri-smoke.yml
index 174c1d6c50b..866c4f092bf 100644
--- a/.github/workflows/studio-tauri-smoke.yml
+++ b/.github/workflows/studio-tauri-smoke.yml
@@ -33,6 +33,11 @@ on:
- 'studio/package-lock.json'
# Run as a step of the Linux job.
- 'scripts/lockfile_supply_chain_audit.py'
+ # The Rust unit test every_shared_case_agrees_with_the_desktop_filter
+ # (src-tauri/src/process.rs) reads this backend fixture, and cargo test runs it in
+ # all three jobs. Nothing else runs that test, so an edit to the fixture has to
+ # run this workflow.
+ - 'studio/backend/tests/fixtures/access_log_records.json'
push:
branches: [main]
# Same list as the PR filter. Without it this workflow ran on EVERY commit to
@@ -56,6 +61,11 @@ on:
- 'studio/package-lock.json'
# Run as a step of the Linux job.
- 'scripts/lockfile_supply_chain_audit.py'
+ # The Rust unit test every_shared_case_agrees_with_the_desktop_filter
+ # (src-tauri/src/process.rs) reads this backend fixture, and cargo test runs it in
+ # all three jobs. Nothing else runs that test, so an edit to the fixture has to
+ # run this workflow.
+ - 'studio/backend/tests/fixtures/access_log_records.json'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
diff --git a/.github/workflows/studio-ui-smoke.yml b/.github/workflows/studio-ui-smoke.yml
index 40215166399..27373f1bb2c 100644
--- a/.github/workflows/studio-ui-smoke.yml
+++ b/.github/workflows/studio-ui-smoke.yml
@@ -37,7 +37,19 @@ on:
# The Playwright test files themselves -- a PR that ONLY edits
# the test must still trigger UI CI. Kept as a directory glob, which
# test_stt_model_search_locator_contract.py asserts.
- - 'tests/studio/**'
+ # The files under tests/ the jobs execute, not all of tests/studio (hundreds of
+ # guard tests and PowerShell units no step here runs). Every lane runs
+ # tests/studio/playwright_*.py scripts as plain python, and their only local
+ # imports are _playwright_robust.py and other playwright_* modules (log_budget
+ # comes from studio/backend/tests, listed above). The pytest step runs
+ # test_stt_model_search_locator_contract.py from the repo root, which loads
+ # tests/conftest.py, the tests package and tests/_shared.
+ - 'tests/studio/playwright_*.py'
+ - 'tests/studio/_playwright_robust.py'
+ - 'tests/studio/test_stt_model_search_locator_contract.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
- '.github/scripts/run-studio-permission-browser.sh'
- '.github/scripts/run-studio-indicator-browser.sh'
# Reached by the installer this workflow already triggers on, so a commit touching
@@ -78,7 +90,19 @@ on:
- 'unsloth_cli/**'
- 'install.sh'
- 'pyproject.toml'
- - 'tests/studio/**'
+ # The files under tests/ the jobs execute, not all of tests/studio (hundreds of
+ # guard tests and PowerShell units no step here runs). Every lane runs
+ # tests/studio/playwright_*.py scripts as plain python, and their only local
+ # imports are _playwright_robust.py and other playwright_* modules (log_budget
+ # comes from studio/backend/tests, listed above). The pytest step runs
+ # test_stt_model_search_locator_contract.py from the repo root, which loads
+ # tests/conftest.py, the tests package and tests/_shared.
+ - 'tests/studio/playwright_*.py'
+ - 'tests/studio/_playwright_robust.py'
+ - 'tests/studio/test_stt_model_search_locator_contract.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
- '.github/scripts/run-studio-permission-browser.sh'
- '.github/scripts/run-studio-indicator-browser.sh'
- 'studio/nvidia_probe.py'
diff --git a/.github/workflows/studio-update-smoke.yml b/.github/workflows/studio-update-smoke.yml
index 92a129a446e..25dd9d0323b 100644
--- a/.github/workflows/studio-update-smoke.yml
+++ b/.github/workflows/studio-update-smoke.yml
@@ -43,6 +43,30 @@ on:
- 'unsloth_cli/_system_dir_guard.py'
- 'pyproject.toml'
- '.github/workflows/studio-update-smoke.yml'
+ # The second update must report the llama.cpp prebuilt as up to date and
+ # validated. That outcome is computed by backend.utils.prebuilt.llama_backend
+ # (imported by install_llama_prebuilt.py), backend.utils.auth_safe and the
+ # vendored truststore (imported by prebuilt_core.py), wheel_utils.py and
+ # uv_path_safety.py (imported by install_python_stack.py), and mlx_repair.py
+ # (its MLX health probe). setup.sh runs nvidia_probe.py. The job drives this checkout's CLI, whose
+ # __init__.py imports every command module, and its pytest runs load the root and
+ # tests/studio/install conftests.
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'studio/backend/utils/prebuilt/llama_backend.py'
+ - 'studio/backend/vendor/truststore/**'
+ - 'studio/backend/utils/wheel_utils.py'
+ - 'studio/backend/utils/uv_path_safety.py'
+ - 'studio/backend/utils/mlx_repair.py'
+ - 'studio/nvidia_probe.py'
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ - 'tests/studio/install/conftest.py'
- '.github/scripts/retry-with-apt-lock.sh'
# The install step in this workflow is `uses:` on that composite action,
# so an edit to the action changes what this workflow actually runs.
@@ -87,6 +111,30 @@ on:
- 'unsloth_cli/_system_dir_guard.py'
- 'pyproject.toml'
- '.github/workflows/studio-update-smoke.yml'
+ # The second update must report the llama.cpp prebuilt as up to date and
+ # validated. That outcome is computed by backend.utils.prebuilt.llama_backend
+ # (imported by install_llama_prebuilt.py), backend.utils.auth_safe and the
+ # vendored truststore (imported by prebuilt_core.py), wheel_utils.py and
+ # uv_path_safety.py (imported by install_python_stack.py), and mlx_repair.py
+ # (its MLX health probe). setup.sh runs nvidia_probe.py. The job drives this checkout's CLI, whose
+ # __init__.py imports every command module, and its pytest runs load the root and
+ # tests/studio/install conftests.
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/auth_safe.py'
+ - 'studio/backend/utils/prebuilt/__init__.py'
+ - 'studio/backend/utils/prebuilt/llama_backend.py'
+ - 'studio/backend/vendor/truststore/**'
+ - 'studio/backend/utils/wheel_utils.py'
+ - 'studio/backend/utils/uv_path_safety.py'
+ - 'studio/backend/utils/mlx_repair.py'
+ - 'studio/nvidia_probe.py'
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ - 'tests/studio/install/conftest.py'
- '.github/scripts/retry-with-apt-lock.sh'
# The install step in this workflow is `uses:` on that composite action,
# so an edit to the action changes what this workflow actually runs.
diff --git a/.github/workflows/studio-windows-ui-smoke.yml b/.github/workflows/studio-windows-ui-smoke.yml
index 8a27a022ec5..efcc9b88a36 100644
--- a/.github/workflows/studio-windows-ui-smoke.yml
+++ b/.github/workflows/studio-windows-ui-smoke.yml
@@ -32,7 +32,12 @@ on:
- '.github/actions/uv-cache-save/action.yml'
- 'pyproject.toml'
# The Playwright drivers the two lanes run.
- - 'tests/studio/**'
+ # The files under tests/studio the lanes execute, not all of it (hundreds of guard
+ # tests and PowerShell units no step here runs). run-studio-ui-lane.sh and the
+ # browser scripts run tests/studio/playwright_*.py as plain python, whose only
+ # local import is _playwright_robust.py.
+ - 'tests/studio/playwright_*.py'
+ - 'tests/studio/_playwright_robust.py'
- '.github/scripts/run-studio-permission-browser.sh'
- '.github/scripts/run-studio-indicator-browser.sh'
# Reached by the installer this workflow already triggers on, so a commit touching
@@ -67,7 +72,12 @@ on:
- '.github/actions/uv-cache-restore/action.yml'
- '.github/actions/uv-cache-save/action.yml'
- 'pyproject.toml'
- - 'tests/studio/**'
+ # The files under tests/studio the lanes execute, not all of it (hundreds of guard
+ # tests and PowerShell units no step here runs). run-studio-ui-lane.sh and the
+ # browser scripts run tests/studio/playwright_*.py as plain python, whose only
+ # local import is _playwright_robust.py.
+ - 'tests/studio/playwright_*.py'
+ - 'tests/studio/_playwright_robust.py'
- '.github/scripts/run-studio-permission-browser.sh'
- '.github/scripts/run-studio-indicator-browser.sh'
- 'studio/nvidia_probe.py'
diff --git a/.github/workflows/studiobench-ci.yml b/.github/workflows/studiobench-ci.yml
index 23c3e1a9c66..29979781d47 100644
--- a/.github/workflows/studiobench-ci.yml
+++ b/.github/workflows/studiobench-ci.yml
@@ -50,6 +50,15 @@ on:
- 'studio/install_*.py'
- 'studio/node_prebuilt_pins.json'
- '.github/workflows/studiobench-ci.yml'
+ # The liveness job boots Studio through boot-studio-api-only.sh, which runs this
+ # checkout's unsloth CLI (unsloth_cli:app). The selftests run pytest
+ # tests/studio/studiobench from the repo root, which loads tests/conftest.py, the
+ # tests package and the tests/_shared helpers.
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
# The harness drives the shipped frontend through the real backend, so a
# change to either can break it without touching a file under tests/.
- 'studio/frontend/**'
@@ -78,6 +87,15 @@ on:
- 'studio/install_*.py'
- 'studio/node_prebuilt_pins.json'
- '.github/workflows/studiobench-ci.yml'
+ # The liveness job boots Studio through boot-studio-api-only.sh, which runs this
+ # checkout's unsloth CLI (unsloth_cli:app). The selftests run pytest
+ # tests/studio/studiobench from the repo root, which loads tests/conftest.py, the
+ # tests package and the tests/_shared helpers.
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
- 'studio/frontend/**'
- 'studio/backend/**'
- 'install.sh'
diff --git a/.github/workflows/studiobench-ui-parity.yml b/.github/workflows/studiobench-ui-parity.yml
index 6e8421bbbeb..50cf0ed1c8b 100644
--- a/.github/workflows/studiobench-ui-parity.yml
+++ b/.github/workflows/studiobench-ui-parity.yml
@@ -163,6 +163,26 @@ on:
# The gate itself, and the tooling it runs, or the filter rots silently.
- 'tests/studio/studiobench/**'
- '.github/workflows/studiobench-ui-parity.yml'
+ # parity-install-side.sh runs install.sh --local on this ref, which hands off to
+ # studio/setup.sh and the installer modules and builds the frontend with npm ci
+ # (reading .npmrc). Both instances then boot through this checkout's unsloth CLI.
+ # routes/auth.py above imports models/auth.py and the auth package, and
+ # routes/inference.py imports models/inference.py. python -m
+ # tests.studio.studiobench imports the tests package.
+ - 'studio/setup.sh'
+ - 'studio/install_*.py'
+ - 'studio/prebuilt_core.py'
+ - 'studio/nvidia_probe.py'
+ - 'studio/node_prebuilt_pins.json'
+ - 'studio/backend/requirements/**'
+ - 'pyproject.toml'
+ - 'studio/frontend/.npmrc'
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
+ - 'studio/backend/models/auth.py'
+ - 'studio/backend/auth/**'
+ - 'studio/backend/models/inference.py'
+ - 'tests/__init__.py'
# Executed by this job. install.sh is what builds both sides, so a change
# that breaks it should be able to trigger the job it breaks.
- 'install.sh'
diff --git a/.github/workflows/version-compat-ci.yml b/.github/workflows/version-compat-ci.yml
index bd750ca5bd0..db8ed31a805 100644
--- a/.github/workflows/version-compat-ci.yml
+++ b/.github/workflows/version-compat-ci.yml
@@ -38,6 +38,20 @@ on:
- 'tests/version_compat/**'
- 'pyproject.toml'
- '.github/workflows/version-compat-ci.yml'
+ # Every pytest run here loads tests/conftest.py and the tests/_shared helpers it
+ # pulls in (installer_venv_root.py imports studio/install_manifest.py), and eight
+ # of the collected tests import tests/_zoo_aggressive_cuda_spoof.py. Studio
+ # Backend CI ignores tests/version_compat and tests/vllm_compat, so nothing else
+ # runs them.
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ - 'studio/install_manifest.py'
+ - 'tests/_zoo_aggressive_cuda_spoof.py'
+ # Every job here `uses:` the pip cache pair, so an edit to either action changes
+ # what it runs.
+ - '.github/actions/pip-cache-restore/**'
+ - '.github/actions/pip-cache-save/**'
schedule:
# Daily 06:43 UTC. Catches upstream PyPI releases roughly within
# 24 h. Off the :00 / :30 fleet-collision spots.
diff --git a/.github/workflows/wheel-smoke.yml b/.github/workflows/wheel-smoke.yml
index 5f98e0bde60..b73efe2170a 100644
--- a/.github/workflows/wheel-smoke.yml
+++ b/.github/workflows/wheel-smoke.yml
@@ -30,6 +30,9 @@ on:
- 'unsloth/**'
- 'unsloth_cli/**'
- '.github/workflows/wheel-smoke.yml'
+ # The first gating step runs this auditor, so an edit to it changes what this
+ # workflow runs.
+ - 'scripts/lockfile_supply_chain_audit.py'
push:
branches: [main]
paths:
@@ -40,6 +43,9 @@ on:
- 'unsloth/**'
- 'unsloth_cli/**'
- '.github/workflows/wheel-smoke.yml'
+ # The first gating step runs this auditor, so an edit to it changes what this
+ # workflow runs.
+ - 'scripts/lockfile_supply_chain_audit.py'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
diff --git a/.github/workflows/windows-arm64-ci.yml b/.github/workflows/windows-arm64-ci.yml
index d94351259b1..957fb73523c 100644
--- a/.github/workflows/windows-arm64-ci.yml
+++ b/.github/workflows/windows-arm64-ci.yml
@@ -23,6 +23,25 @@ on:
- 'tests/studio/test_uninstall_prebuilt_parity.ps1'
- 'tests/studio/test_uninstall_reparse_stop_roots.ps1'
- '.github/workflows/windows-arm64-ci.yml'
+ # Imported or read by the ARM64 tests above: woa_ps_harness.py and
+ # tests/_shared/unsloth_pwsh_runner.py, the fixtures in
+ # tests/studio/install/conftest.py and the root conftest chain, woa-wheelhouse.yml
+ # (whose release_tag test_woa_wheelhouse_prefers_pypi.py checks against
+ # install.ps1), and the installer modules the tests load by path
+ # (install_manifest.py, install_llama_prebuilt.py, and the backend utils
+ # install_python_stack.py imports at module scope).
+ - 'tests/studio/install/woa_ps_harness.py'
+ - 'tests/studio/install/conftest.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ - '.github/workflows/woa-wheelhouse.yml'
+ - 'studio/install_manifest.py'
+ - 'studio/install_llama_prebuilt.py'
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/wheel_utils.py'
+ - 'studio/backend/utils/uv_path_safety.py'
pull_request:
paths:
- 'install.ps1'
@@ -42,6 +61,25 @@ on:
- 'tests/studio/test_uninstall_prebuilt_parity.ps1'
- 'tests/studio/test_uninstall_reparse_stop_roots.ps1'
- '.github/workflows/windows-arm64-ci.yml'
+ # Imported or read by the ARM64 tests above: woa_ps_harness.py and
+ # tests/_shared/unsloth_pwsh_runner.py, the fixtures in
+ # tests/studio/install/conftest.py and the root conftest chain, woa-wheelhouse.yml
+ # (whose release_tag test_woa_wheelhouse_prefers_pypi.py checks against
+ # install.ps1), and the installer modules the tests load by path
+ # (install_manifest.py, install_llama_prebuilt.py, and the backend utils
+ # install_python_stack.py imports at module scope).
+ - 'tests/studio/install/woa_ps_harness.py'
+ - 'tests/studio/install/conftest.py'
+ - 'tests/conftest.py'
+ - 'tests/__init__.py'
+ - 'tests/_shared/**'
+ - '.github/workflows/woa-wheelhouse.yml'
+ - 'studio/install_manifest.py'
+ - 'studio/install_llama_prebuilt.py'
+ - 'studio/backend/__init__.py'
+ - 'studio/backend/utils/__init__.py'
+ - 'studio/backend/utils/wheel_utils.py'
+ - 'studio/backend/utils/uv_path_safety.py'
workflow_dispatch:
concurrency:
diff --git a/.github/workflows/windows-installer-differential-ci.yml b/.github/workflows/windows-installer-differential-ci.yml
index 4a5b6afa94e..167608c94db 100644
--- a/.github/workflows/windows-installer-differential-ci.yml
+++ b/.github/workflows/windows-installer-differential-ci.yml
@@ -54,6 +54,13 @@ on:
- '.github/scripts/Collect-InstallerEvidence.ps1'
- '.github/scripts/compare_installer_evidence.py'
- '.github/workflows/windows-installer-differential-ci.yml'
+ # The labelled lane sets UNSLOTH_CI_SOURCE_OVERLAY, so setup.ps1 runs this
+ # checkout's installer modules and reads its prebuilt pins on the head side of the
+ # comparison.
+ - 'studio/install_*.py'
+ - 'studio/prebuilt_core.py'
+ - 'studio/nvidia_probe.py'
+ - 'studio/node_prebuilt_pins.json'
schedule:
# Weekly, against main's own merge base, so the lane is known to work before it is relied on to
# judge a change. A differential lane that has not run in a month is not evidence of anything.
diff --git a/.github/workflows/windows-no-compiler-ci.yml b/.github/workflows/windows-no-compiler-ci.yml
index 132fbf9dc1e..90385a4ad24 100644
--- a/.github/workflows/windows-no-compiler-ci.yml
+++ b/.github/workflows/windows-no-compiler-ci.yml
@@ -70,6 +70,12 @@ on:
- 'studio/install_*.py'
- 'studio/node_prebuilt_pins.json'
- '.github/workflows/windows-no-compiler-ci.yml'
+ # The desktop leg runs install.ps1 --tauri --local, which hands setup to this
+ # checkout's CLI; commands/studio.py, commands/start.py and
+ # _studio_runtime_gate.py spawn PowerShell, the path a compiler would come back
+ # through.
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
push:
branches: [main]
paths:
@@ -91,6 +97,12 @@ on:
- 'studio/install_*.py'
- 'studio/node_prebuilt_pins.json'
- '.github/workflows/windows-no-compiler-ci.yml'
+ # The desktop leg runs install.ps1 --tauri --local, which hands setup to this
+ # checkout's CLI; commands/studio.py, commands/start.py and
+ # _studio_runtime_gate.py spawn PowerShell, the path a compiler would come back
+ # through.
+ - 'unsloth_cli/*.py'
+ - 'unsloth_cli/commands/*.py'
workflow_dispatch:
concurrency:
diff --git a/tests/studio/test_local_actions_are_in_path_filters.py b/tests/studio/test_local_actions_are_in_path_filters.py
index 805a647d869..87478d44ded 100644
--- a/tests/studio/test_local_actions_are_in_path_filters.py
+++ b/tests/studio/test_local_actions_are_in_path_filters.py
@@ -25,17 +25,11 @@ import yaml
REPO_ROOT = Path(__file__).resolve().parents[2]
_WORKFLOWS = REPO_ROOT / ".github" / "workflows"
-# The one action pair still missing from the filters of the six workflows that use it
-# (consolidated-tests-ci, mlx-ci, notebooks-ci, studio-backend-ci, studio-export-capability-ci,
-# version-compat-ci). Every other local action in the repo is already listed, by its
-# action.yml, which is the convention this guard enforces.
-#
-# Waived rather than fixed here because adding them means touching six workflows unrelated to
-# this change. The test below deletes the waiver's right to exist as soon as that is done.
-_PRE_EXISTING = {
- ".github/actions/pip-cache-restore",
- ".github/actions/pip-cache-save",
-}
+# Local actions a path-filtered workflow may use without listing. Empty: the pip cache pair,
+# the last entry here, is now listed by every workflow that uses it. Growing this again needs
+# a reason written next to the entry, and the test below removes an entry that is no longer
+# needed.
+_PRE_EXISTING: set = set()
def _triggers(doc: dict) -> dict:
diff --git a/tests/studio/test_stt_model_search_locator_contract.py b/tests/studio/test_stt_model_search_locator_contract.py
index bf9ae6b9477..0c3bff804e0 100644
--- a/tests/studio/test_stt_model_search_locator_contract.py
+++ b/tests/studio/test_stt_model_search_locator_contract.py
@@ -149,7 +149,13 @@ def test_ci_actually_runs_this_file():
"""Repo-root pytest discovery skips this file, so a workflow must name it."""
workflow = (REPO / ".github/workflows/studio-ui-smoke.yml").read_text(encoding = "utf-8")
assert f"pytest tests/studio/{Path(__file__).name}" in workflow, workflow
- assert "tests/studio/**" in workflow, "the workflow must trigger on this path"
+ # A filter entry naming this file, not just the pytest command above: the workflow no
+ # longer triggers on all of tests/studio, so the file has to be listed to trigger it.
+ # Matched as a paths: list item without yaml, which this job does not install.
+ entry = re.compile(rf"^\s*-\s*'tests/studio/{re.escape(Path(__file__).name)}'\s*$", re.M)
+ assert (
+ len(entry.findall(workflow)) >= 2
+ ), "the pull_request and push filters must list this file"
def test_the_english_copy_is_still_free_to_change():