[PR #1826] [CLOSED] serve: probe the SYCL launcher's engine binary for --tail-role-token #3703

Closed
opened 2026-11-07 15:30:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1826
Author: @Momoyeyu
Created: 10/10/2026
Status: ❌ Closed

Base: main ← Head: fix/effort-position-sycl-launcher


📝 Commits (1)

  • 203f826 serve: probe the SYCL launcher's engine binary for --tail-role-token (#1781)

📊 Changes

2 files changed (+100 additions, -5 deletions)

View changed files

📝 serve/server.py (+20 -5)
➕ serve/test_effort_position.py (+80 -0)

📄 Description

Fixes #1781.

What

effort_end_args() decides --tail-role-token support by grepping exe. On the SYCL port exe is sycl/serve/strata-sycl.sh, a launcher that execs ${STRATA_SYCL_BIN:-build-sycl-aot/strata} inside a container — the script never names the flag, so "effort_position": "end" printed the "needs engine 0.1.39" line and stayed off on every SYCL install, exactly as the reporter measured.

A #! exe now gets a second read through STRATA_SYCL_BIN (the config's env, then the process environment) or the default build-sycl-aot/strata, relative to the repo two levels above the script — the same layout the launcher computes. A binary exe reads exactly as before; a missing/unreadable binary falls back to the launcher's text, so the probe still answers "unsupported" rather than crashing.

What it leaves alone

  • CUDA/HIP paths: exe is the engine there, so the new branch never runs.
  • The probe's semantics: still a byte-grep of the engine image, still no version parsing, still a silent None when the flag is absent.
  • The launcher itself: strata-sycl.sh is unchanged; this is server-side resolution of the convention it already documents.

Tests

serve/test_effort_position.py (new, 6 tests): binary exe unchanged behavior; the SYCL layout via the default path and via STRATA_SYCL_BIN (config env and process env); a launcher whose binary lacks the flag; an unreadable/missing binary falling back to the script; start/invalid-value handling. 6/6 pass, plus test_runconfig and test_frontend (17 tests) unchanged.

Not tested: a real SYCL container run — the probe only reads files, and the reporter's environment has the actual image; the layout mirrors the launcher's own ${STRATA_SYCL_BIN:-...} default and ../.. repo resolution.


🔄 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/1826 **Author:** [@Momoyeyu](https://github.com/Momoyeyu) **Created:** 10/10/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/effort-position-sycl-launcher` --- ### 📝 Commits (1) - [`203f826`](https://github.com/Niko1221/Strata/commit/203f82636e15bb0d5f0cd538505bd59ead36e746) serve: probe the SYCL launcher's engine binary for --tail-role-token (#1781) ### 📊 Changes **2 files changed** (+100 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+20 -5) ➕ `serve/test_effort_position.py` (+80 -0) </details> ### 📄 Description Fixes #1781. ## What `effort_end_args()` decides `--tail-role-token` support by grepping `exe`. On the SYCL port `exe` is `sycl/serve/strata-sycl.sh`, a launcher that execs `${STRATA_SYCL_BIN:-build-sycl-aot/strata}` inside a container — the script never names the flag, so `"effort_position": "end"` printed the "needs engine 0.1.39" line and stayed off on every SYCL install, exactly as the reporter measured. A `#!` exe now gets a second read through `STRATA_SYCL_BIN` (the config's `env`, then the process environment) or the default `build-sycl-aot/strata`, relative to the repo two levels above the script — the same layout the launcher computes. A binary exe reads exactly as before; a missing/unreadable binary falls back to the launcher's text, so the probe still answers "unsupported" rather than crashing. ## What it leaves alone - CUDA/HIP paths: `exe` is the engine there, so the new branch never runs. - The probe's semantics: still a byte-grep of the engine image, still no version parsing, still a silent `None` when the flag is absent. - The launcher itself: `strata-sycl.sh` is unchanged; this is server-side resolution of the convention it already documents. ## Tests `serve/test_effort_position.py` (new, 6 tests): binary exe unchanged behavior; the SYCL layout via the default path and via `STRATA_SYCL_BIN` (config `env` and process env); a launcher whose binary lacks the flag; an unreadable/missing binary falling back to the script; `start`/invalid-value handling. 6/6 pass, plus `test_runconfig` and `test_frontend` (17 tests) unchanged. Not tested: a real SYCL container run — the probe only reads files, and the reporter's environment has the actual image; the layout mirrors the launcher's own `${STRATA_SYCL_BIN:-...}` default and `../..` repo resolution. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:30:10 +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#3703
No description provided.