Skip to content

v0.2.3 - resolver correctness, green cross-platform CI

Latest

Choose a tag to compare

@447662 447662 released this 03 Oct 01:00
· 1 commit to main since this release

v0.2.3 — resolver correctness, and a green cross-platform CI

Follow-up to v0.2.2. That release's own CI went red on the new check, which is precisely what the check is for.

What was wrong

lib/resolve-bin.js is written to be pure and testable — it takes platform and env as parameters. But it split the candidate PATH with the host's path.delimiter instead of the target platform's. On Linux CI, a fabricated Windows PATH (A;B) was therefore treated as a single entry, and each drive letter would have been shredded into a bogus candidate.

Production was not affected: platform is process.platform there, so host and target always agreed. The defect made the self-check meaningless off-platform — which the CI caught immediately.

The fix

  • Split PATH with the target platform's separator (; on Windows, : elsewhere); join POSIX candidates with posix.join.
  • The self-check now also asserts that no drive letter is split into a bogus entry — the assertion that caught this.

Verified on Linux CI (run #4, green) and locally on Windows, including the real scenario the previous release was about: with the Codex directory removed from PATH, the resolver still finds the desktop app's CLI:

PATH = C:\Windows\system32;C:\Windows      (where.exe codex → not found)
resolveCodexBin() → C:\Users\<you>\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe

CI now covers four checks

Step What it protects
Encoding guard no tracked file is non-UTF-8 or BOM-prefixed
Load-time self-check bundle preamble, six slot declarations, composer selector purity, session-mirror event shapes, the Markdown renderer
Missing-binary self-check a missing Codex CLI rejects cleanly instead of killing the DSH host
CLI resolution self-check the candidate list covers the Codex desktop app directory on Windows and POSIX

Install

dsh plugin --profile desktop add git+https://github.com/447662/dsh-native-codex-cli.git

Then restart DSH.

Full documentation: README (中文) · README (English)