Skip to content

windows: fix issue #128 — converter base-path parameterization, ASCII-safe output, version probe, dependency preflight - #135

Merged
linyubupa merged 1 commit into
mainfrom
fix/windows-issue-128
Oct 10, 2026
Merged

linyubupa merged 1 commit into
mainfrom
fix/windows-issue-128

Conversation

@alexyzhou

Copy link
Copy Markdown
Collaborator

Addresses the four repo-level issues reported in #128 (Windows 8B fresh-install
validation by @Lexlangel). Does not close the issue: the Linux question there is
tracked on the linux-host track separately.

  • Cross-check gate base path: verify_against_base() hardcoded
    <repo>/windows/models/... while the app converts into ~/.edge0/models, so
    the GUI Download→Convert path hit FileNotFoundError on end-user machines (a
    dev repo's local models/ masked it). The base GGUF is now an explicit
    --base argument passed from the converter's own --out artifact; standalone
    runs derive the conventional <dir>-gguf sibling. Missing base fails with an
    E-BASE-MISSING line pointing at --base.
  • Windows console output: all non-ASCII glyphs in converter-chain print
    lines (→ ⇒ ✔ × ·) replaced with ASCII, and the five entry points
    reconfigure(sys.stdout, utf-8/backslashreplace) as a guard. The app pipes the
    converter's stdout, where Python falls back to the ANSI code page — U+2192 in
    the final DONE line raised UnicodeEncodeError after an otherwise successful
    conversion.
  • Engine version probe: failures were cached in a OnceLock<Option>, so one
    early miss (status poll before the engine landed on a fresh install) haunted
    the whole session with "exists but version probe failed". Only successes are
    cached now; doctor uses an always-measure server_version_probe() that
    captures stdout and stderr (the engine logs its version banner to the log
    stream; the old stdout-only/stderr-null probe could never see it) with a
    tolerant version: line match. tests/doctor.rs adds a late-binary recovery
    case.
  • Dependency preflight: the converter chain is numpy-only and stays so.
    convert_mlx_to_gguf.py now fails with E-DEP guidance when numpy is
    missing; the gate's gguf fallback import reports E-DEP too. Re the PyYAML
    report: no shipped converter file imports yaml anywhere in this repo's
    history — the error comes from the mlx_lm stack the root README /
    python/pyproject.toml recommend to Windows users without a platform gate;
    that guidance issue is tracked separately on the python side.

…t, engine version probe, dependency preflight

Fresh-install validation by @Lexlangel (issue #128) reported four repo-level
issues on Windows 8B; all four are addressed (internal ledger commit f442324):

- cross-check gate base path: verify_against_base() hardcoded
  <repo>/windows/models/... while the app converts into ~/.edge0/models, so the
  GUI Download->Convert path hit FileNotFoundError on end-user machines (a dev
  repo's local models/ masked it). The base GGUF path is now an explicit
  argument; the converter passes its own --out artifact as --base, standalone
  runs derive the conventional <dir>-gguf sibling. Missing base fails with an
  E-BASE-MISSING line pointing at --base.
- Windows console output: every non-ASCII glyph in converter-chain print lines
  (-> ⇒ ✔ × ·) is replaced with ASCII, and the five entry points
  reconfigure(sys.stdout, utf-8/backslashreplace) as a guard. The app pipes the
  converter's stdout, where Python falls back to the ANSI code page — U+2192 in
  the final DONE line raised UnicodeEncodeError after an otherwise successful
  conversion (issue #128 report 4). Codec-level tests: cp1252-strict reproduces
  the crash, pure ASCII always passes, reconfigure rescues.
- engine version probe: failures were cached in a OnceLock<Option>, so one
  early miss (status poll before the engine landed on a fresh install) haunted
  the whole session with "exists but version probe failed". Only successes are
  cached now; doctor uses an always-measure server_version_probe() that
  captures stdout AND stderr (the fork logs its version banner to the log
  stream; the old stdout-only/stderr-null probe could never see it) with a
  tolerant version: line match. tests/doctor.rs adds a late-binary recovery
  case (POSIX shebang stand-in emitting the version line to stderr only;
  Windows side exempted like the existing mklink leg, pending release-machine
  runs).
- dependency preflight: the converter chain is numpy-only and stays so;
  convert_mlx_to_gguf.py now fails with E-DEP guidance when numpy is missing,
  and the gate's gguf fallback import reports E-DEP pip install gguf. Note on
  the PyYAML report: no shipped converter file imports yaml anywhere in this
  repo's history; the error came from the mlx_lm stack that the root README /
  python/pyproject.toml recommend to Windows users without a platform gate —
  tracked separately on the python side.

Verification on this tree: py_compile of all 7 exported tools, repack
--selftest PASS, import closure within stdlib ∪ {numpy, gguf} ∪ same-dir,
zero non-ASCII in print lines. Full cargo check/test and the five make-dist
gates run on the Windows release machine.
@linyubupa
linyubupa merged commit 40a8c51 into main Oct 10, 2026
2 checks passed
@alexyzhou alexyzhou mentioned this pull request Oct 11, 2026
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.

2 participants