[PR #4027] [CLOSED] [Other] setup: let the server validate component-backed engines #4881

Closed
opened 2026-11-07 16:31:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4027
Author: @jubeater
Created: 10/25/2026
Status: ❌ Closed

Base: main ← Head: fix/setup-component-engine-start


📝 Commits (1)

  • 2147b72 fix(setup): hand component engines to the server for validation

📊 Changes

2 files changed (+107 additions, -3 deletions)

View changed files

📝 setup.py (+9 -3)
➕ tools/test_setup_component_start.py (+98 -0)

📄 Description

Problem and result

Setup rejects an installed-model config with exe: "component:strata-engine" as a missing file before starting the server. It now checks literal engine paths and model files as before, while handing component-backed engines to the server's existing resolver and integrity checks.

Fixes #4026

Approach

Component configs also skip legacy source-build engine architecture checks and Windows HIP runtime repair. Those checks otherwise inspect the source checkout's engine folder rather than the selected component. The saved component reference is preserved, including when startup settings or GPU selections are saved.

Validation

Linux x86_64 / Python 3.14.8, candidate 2147b72 on upstream 7dd5cf1:

Passed:

python3 -m unittest \
  tools.test_setup_component_start \
  tools.test_setup_start_gpus_amd \
  tools.test_setup_older_gpus \
  tools.test_setup_configs \
  tools.test_setup_config \
  tests.desktop.test_control_install.ControlModeTests \
  tests.terminal.test_no_acquisition.StartNeverAcquiresTests \
  tests.terminal.test_engine_manifest.Start \
  tests.terminal.test_component_start.ComponentStart.test_the_package_folder_is_first_on_the_library_path \
  tests.terminal.test_component_start.ComponentStart.test_a_picture_reader_path_from_an_older_engine_folder_follows_the_installed_package \
  tests.terminal.test_component_start.ComponentStart.test_the_build_json_lib_dirs_follow_the_package_folder -q

77 tests passed. The eight new regression tests cover server handoff, saved and explicit GPU choices, HIP source-build lookup avoidance, missing model files, missing literal engines, and keeping the component reference when saving settings. GPU enumeration and server execution are mocked in the new tests. git diff --check passed before committing.

Latest focused rerun on the same commit:

Ran 77 tests in 3.151s
OK

The full component-start integration suite also passed outside the sandbox, where its local runtime sockets and subprocesses can work:

python3 -m unittest tests.terminal.test_component_start -v
Ran 8 tests in 3.210s
OK

This suite uses packaged fake engines and real local server/runtime subprocesses. It covers successful start/stop, missing and tampered package refusal, a modified library refusing startup, picture-reader relocation and library paths. It does not load a GPU model.

git diff HEAD^ HEAD --check passed. The repository's checkIssue and checkPull intake functions both return ok: true for the current issue/PR text; the GitHub Intake check also passed. Intake checks format, not inference correctness.

Failed:

Before the fix, the eight new tests produced six errors and one assertion failure, all caused by the component reference being reported as missing; the missing literal-path check already passed.

The broader command below ran 90 tests with seven failures and one skip. Running the same existing tests against unchanged upstream ran 82 tests with the same seven failures and one skip:

python3 -m unittest \
  tools.test_setup_component_start \
  tools.test_setup_start_gpus_amd \
  tools.test_setup_older_gpus \
  tools.test_setup_configs \
  tools.test_setup_config \
  tests.desktop.test_control_install \
  tests.terminal.test_no_acquisition \
  tests.terminal.test_component_start -q

For the unchanged-upstream comparison, omit tools.test_setup_component_start.

The seven unchanged failures were three DeleteModelTests assertions, CliServeIsOfflineTests.test_serve_plan_reaches_no_network_and_runs_no_program, ImportGraphTests.test_no_installer_subprocess_or_network_call_on_the_serving_side, and the two runtime host start tests in test_component_start. The two runtime-host start tests failed in the initial sandboxed run; both now pass as part of the eight-test integration suite outside the sandbox, without a code change. The other five failures were also observed against unchanged upstream.

Not run:

  • Real GPU model load or generation.
  • Native Windows HIP and macOS execution; the Windows HIP branch has a mocked regression test.
  • CUDA/HIP/SYCL builds. No engine sources or build settings changed, but setup backend-selection and HIP startup behavior do change. CUDA tooling is present in this session; HIP and SYCL compilers are not available on PATH.

Limits

This fixes setup's premature component rejection and legacy engine checks. It does not repair a missing/damaged component, change engine compatibility rules, or establish hardware inference correctness.

Validation help requested before leaving draft

Reviewed against CONTRIBUTING.md. The backend build/native execution requirement is still outstanding, so this remains a draft.

Please provide the affected backend build validation for commit 2147b729b8c2013505f02114e8c25d2fa2a5cfd5 where applicable. The patch changes only Python setup and regression tests; if native backend rebuilds are not required for this scope, please confirm that interpretation.

The specific native smoke check needed is a Windows HIP start from a component-backed config, including an explicit GPU list: it should reach the component resolver without repairing the source-build engine folder or reading that folder's architecture metadata. Also verify that a missing or damaged component is refused by the normal resolver. The current Windows HIP regression tests mock these paths; they do not establish hardware correctness.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4027 **Author:** [@jubeater](https://github.com/jubeater) **Created:** 10/25/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/setup-component-engine-start` --- ### 📝 Commits (1) - [`2147b72`](https://github.com/Niko1221/Strata/commit/2147b729b8c2013505f02114e8c25d2fa2a5cfd5) fix(setup): hand component engines to the server for validation ### 📊 Changes **2 files changed** (+107 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+9 -3) ➕ `tools/test_setup_component_start.py` (+98 -0) </details> ### 📄 Description ## Problem and result Setup rejects an installed-model config with `exe: "component:strata-engine"` as a missing file before starting the server. It now checks literal engine paths and model files as before, while handing component-backed engines to the server's existing resolver and integrity checks. ## Related discussion Fixes #4026 ## Approach Component configs also skip legacy source-build engine architecture checks and Windows HIP runtime repair. Those checks otherwise inspect the source checkout's engine folder rather than the selected component. The saved component reference is preserved, including when startup settings or GPU selections are saved. ## Validation Linux x86_64 / Python 3.14.8, candidate `2147b72` on upstream `7dd5cf1`: **Passed:** ```sh python3 -m unittest \ tools.test_setup_component_start \ tools.test_setup_start_gpus_amd \ tools.test_setup_older_gpus \ tools.test_setup_configs \ tools.test_setup_config \ tests.desktop.test_control_install.ControlModeTests \ tests.terminal.test_no_acquisition.StartNeverAcquiresTests \ tests.terminal.test_engine_manifest.Start \ tests.terminal.test_component_start.ComponentStart.test_the_package_folder_is_first_on_the_library_path \ tests.terminal.test_component_start.ComponentStart.test_a_picture_reader_path_from_an_older_engine_folder_follows_the_installed_package \ tests.terminal.test_component_start.ComponentStart.test_the_build_json_lib_dirs_follow_the_package_folder -q ``` 77 tests passed. The eight new regression tests cover server handoff, saved and explicit GPU choices, HIP source-build lookup avoidance, missing model files, missing literal engines, and keeping the component reference when saving settings. GPU enumeration and server execution are mocked in the new tests. `git diff --check` passed before committing. Latest focused rerun on the same commit: ```text Ran 77 tests in 3.151s OK ``` The full component-start integration suite also passed outside the sandbox, where its local runtime sockets and subprocesses can work: ```sh python3 -m unittest tests.terminal.test_component_start -v ``` ```text Ran 8 tests in 3.210s OK ``` This suite uses packaged fake engines and real local server/runtime subprocesses. It covers successful start/stop, missing and tampered package refusal, a modified library refusing startup, picture-reader relocation and library paths. It does not load a GPU model. `git diff HEAD^ HEAD --check` passed. The repository's `checkIssue` and `checkPull` intake functions both return `ok: true` for the current issue/PR text; the GitHub Intake check also passed. Intake checks format, not inference correctness. **Failed:** Before the fix, the eight new tests produced six errors and one assertion failure, all caused by the component reference being reported as missing; the missing literal-path check already passed. The broader command below ran 90 tests with seven failures and one skip. Running the same existing tests against unchanged upstream ran 82 tests with the same seven failures and one skip: ```sh python3 -m unittest \ tools.test_setup_component_start \ tools.test_setup_start_gpus_amd \ tools.test_setup_older_gpus \ tools.test_setup_configs \ tools.test_setup_config \ tests.desktop.test_control_install \ tests.terminal.test_no_acquisition \ tests.terminal.test_component_start -q ``` For the unchanged-upstream comparison, omit `tools.test_setup_component_start`. The seven unchanged failures were three `DeleteModelTests` assertions, `CliServeIsOfflineTests.test_serve_plan_reaches_no_network_and_runs_no_program`, `ImportGraphTests.test_no_installer_subprocess_or_network_call_on_the_serving_side`, and the two runtime host start tests in `test_component_start`. The two runtime-host start tests failed in the initial sandboxed run; both now pass as part of the eight-test integration suite outside the sandbox, without a code change. The other five failures were also observed against unchanged upstream. **Not run:** - Real GPU model load or generation. - Native Windows HIP and macOS execution; the Windows HIP branch has a mocked regression test. - CUDA/HIP/SYCL builds. No engine sources or build settings changed, but setup backend-selection and HIP startup behavior do change. CUDA tooling is present in this session; HIP and SYCL compilers are not available on PATH. ## Limits This fixes setup's premature component rejection and legacy engine checks. It does not repair a missing/damaged component, change engine compatibility rules, or establish hardware inference correctness. ## Validation help requested before leaving draft Reviewed against [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md#L76). The backend build/native execution requirement is still outstanding, so this remains a draft. Please provide the affected backend build validation for commit `2147b729b8c2013505f02114e8c25d2fa2a5cfd5` where applicable. The patch changes only Python setup and regression tests; if native backend rebuilds are not required for this scope, please confirm that interpretation. The specific native smoke check needed is a Windows HIP start from a component-backed config, including an explicit GPU list: it should reach the component resolver without repairing the source-build engine folder or reading that folder's architecture metadata. Also verify that a missing or damaged component is refused by the normal resolver. The current Windows HIP regression tests mock these paths; they do not establish hardware correctness. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:31:03 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4881
No description provided.