Skip to content

fix(windows): evaluate model readiness paths literally - #8148

Merged
Lightheartdevs merged 1 commit into
Osmantic:mainfrom
vaibhavsrv:fix/windows-llm-endpoint-literalpath-clean
Oct 25, 2026
Merged

Lightheartdevs merged 1 commit into
Osmantic:mainfrom
vaibhavsrv:fix/windows-llm-endpoint-literalpath-clean

Conversation

@vaibhavsrv

Copy link
Copy Markdown
Contributor

Summary

Fixes #8147. Fixes model readiness evaluation on Windows paths containing square brackets.

In ods/installers/windows/lib/llm-endpoint.ps1:251, Test-WindowsLlmModelReadiness verified the existence of the backing GGUF model file using bare Test-Path $modelPath. In PowerShell 5.1 and PowerShell 7, Test-Path -Path interprets square brackets (e.g. [q4_k_m] or [dev]) as wildcard regex character sets rather than literal characters. When an install path or model filename includes brackets, Test-Path returns $false even though the file is resident on disk, falsely failing the readiness gate with model '...' is registered but its backing file is missing.

This change passes -LiteralPath $modelPath -PathType Leaf, ensuring backing file presence is resolved literally without wildcard expansion.

AI Assistance

AI drafted the fix and tests and ran the checks. The human author did not review each line before submission.

Release Lane

  • Stable hotfix targeting release/2.6.x
  • Mainline change targeting main
    • Targets mainline Windows installer libraries.
  • Next-minor work targeting the next feature/minor release
  • Not sure; reviewer should help classify

Stable hotfix reason:

<!-- If this targets release/2.6.x, explain the current-stable user problem it fixes. -->

Changed Surface

  • Docs only
  • Tests only
  • Dashboard UI
  • Dashboard API / host agent
  • Installer / bootstrap / lifecycle
    • Modifies model readiness verification in ods/installers/windows/lib/llm-endpoint.ps1.
  • Docker Compose / service manifests
  • Model routing / Hermes / capabilities
  • Network exposure / auth / proxy
  • Dependencies / runtime wiring

Risk And Validation

  • Risk level: High
  • Validation run:
    • git diff --check
      • Clean whitespace and line endings across all modified files.
    • Markdown/link sanity for docs
    • Focused tests listed below
      • PowerShell contract regression executed on Windows Server 2025 Datacenter under both PS 7 and Windows PowerShell 5.1.
    • Dashboard lint/test/build
    • Extension audit / compose validation
    • Release-grade fleet or scoped hardware validation
      • Validated in GitHub Actions runner windows-latest (Run ID: 39972171269, Commit: 44a4fef).
    • Stable-lane patch validation, if targeting release/2.6.x
    • Not required because:

Commands/results:

# Baseline failure reproduction (Run ID: 39970767087, Commit: a6fba50576ace2f3e5aafc39843477401428f3ce):
# Path: C:\Users\runneradmin\AppData\Local\Temp\ods_test[dev]\data\models\qwen[q4_k_m].gguf
# Result: Test-Path returns False -> detail="model 'qwen[q4_k_m].gguf' is registered but its backing file is missing"
# Exit code: 1

# Post-fix execution (Run ID: 39972171269, Commit: 44a4fef140685805cc2436a21848e99ebdbf44c8):
# Result: Test-Path -LiteralPath returns True -> FileExists=True, Ok=True
# Exit code: 0

# Test command:
./ods/tests/contracts/test-windows-llm-model-readiness-literalpath.ps1
# PASS: bracketed model filename resolves correctly under LiteralPath
# PASS: bracketed install directory resolves correctly under LiteralPath

Operational Change Check

If this PR touches installer phases, bootstrap logic, compose stack generation,
service manifests, dashboard API control flows, Hermes, model routing, GPU or
runtime detection, lifecycle commands, host mutation, or network exposure, it
requires release-grade fleet validation before release unless the PR explains a
narrower equivalent.

  • This is not an operational change.
  • This is an operational change and validation is recorded above.
  • This is an operational change and validation is intentionally deferred for:

Notes For Reviewers

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.

Windows: Test-WindowsLlmModelReadiness reports false missing-file error for bracketed model paths

2 participants