Skip to content

feat(server): add --version/-V flag to uteke-serve - #1104

Merged
ajianaz merged 2 commits into
developfrom
feat/1044-serve-version-flag
Aug 26, 2026
Merged

ajianaz merged 2 commits into
developfrom
feat/1044-serve-version-flag

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

What (description of the change)

uteke-serve had no --version flag while the main uteke CLI does — users running multiple versions on a box couldn't verify which binary they were about to point clients at (#1044).

  • Add --version / -V arm to the arg parser printing uteke-serve <CARGO_PKG_VERSION> (exit 0)
  • List the flag in --help
  • New integration test file tests/cli_flags.rs using CARGO_BIN_EXE_uteke-serve: long flag, short flag, and unknown-flag-still-rejected-with-usage-hint

Why

/health reports the version, but that requires the server to already be running and reachable. The flag makes the version checkable offline, consistent with the main CLI (uteke --version).

Testing

  • cargo test -p uteke-server --test cli_flags → 3/3 pass
  • Manual binary check: ./target/debug/uteke-serve --version → uteke-serve 0.15.0; -V identical; --help lists the new flag
  • cargo fmt + cargo clippy --workspace --all-targets -D warnings clean

Closes #1044

Reimplements the intent of #1045 (closed: wrong base branch, author unresponsive) — thanks @VIVAAN-DHAWAN for the original patch.

uteke-serve had no way to report its version while the main CLI does.
Add a --version / -V arm to the arg parser printing
`uteke-serve <CARGO_PKG_VERSION>` (mirroring the CLI's format), list it
in --help, and cover it with integration tests via CARGO_BIN_EXE
(long flag, short flag, and unknown-flag still rejected with a usage
hint).

Reimplements the intent of #1045 (closed: wrong base branch, author
unresponsive) — thanks @VIVAAN-DHAWAN for the original patch.

Closes #1044
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

resolve_ort_lib_prefers_env_var and resolve_ort_lib_errors_on_missing_
env_var_path both mutated the process-global ORT_LIB_PATH in parallel
#[test]s. When the invalid-path test overwrote the var between the
valid test's set_var and resolve, resolve_ort_lib() returned Err and
the is_ok() assert failed — a timing-dependent CI flake (seen on this
branch's first CI run; passed locally, failed in CI).

Merged both cases into a single #[test] that runs them back-to-back,
eliminating the shared-state race. 5x targeted + 3x full workspace
suite green.
@ajianaz
ajianaz merged commit 19a1fe1 into develop Aug 26, 2026
14 checks passed
@ajianaz
ajianaz deleted the feat/1044-serve-version-flag branch August 26, 2026 07:24
@VIVAAN-DHAWAN

Copy link
Copy Markdown

Thanks for the mention.

ajianaz added a commit that referenced this pull request Sep 6, 2026