Version Packages - #36
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@pwrdrvr/codex-discovery@0.4.0
Minor Changes
2091170: Resolve Windows commands through PATHEXT instead of the bare, unstartable command name.
buildPathCommandNamesput the extensionless name FIRST in the listresolvePathCommandwalks per PATH directory, and the scan returns its first hit. npm installs three shims side by side —codex(an sh script, for Git Bash),codex.cmd, andcodex.ps1— so in any npm or nvm-windows bin directory the scan stopped on the sh script and never reachedcodex.cmd. Measured against a working Codex 0.146.0 install atC:\nvm4w\nodejs\:where codexlists the sh script first, discovery picked it, and the tool was reported missing. (.PS1is not in the default PATHEXT, so the.ps1was never the problem — the bare name was.)On win32 the bare name is no longer a candidate at all:
CreateProcessappends.exeto an extensionless name, so such a file cannot be launched bychild_processregardless of where it sits in the list. Only a command carrying some other, non-PATHEXT extension (tool.ps1) keeps the verbatim name, tried last, so a caller who named a specific file can still discover it. A command that already ends in a PATHEXT extension still resolves to itself. PATH and PATHEXT are now both read case-insensitively on win32. POSIX resolution is byte-for-byte unchanged — the bare name is correct and the only option there.This is not Codex-specific:
discoverCommandsis generic, so every consumer resolving a tool (git,gh, …) on a Windows npm-shim layout was hitting the same defect.pathIsExecutableis fixed in the same pass rather than left as a known weakness. It usedaccess(X_OK), which on Windows has no execute bit to consult and degrades to "does this file exist" — it answeredtruefor a README, socandidate.executableon win32 was asserting nothing. It now judges by PATHEXT there (the ruleCreateProcessandcmd.exeactually apply) and confirms existence separately; POSIX still asks the filesystem. It takes a new optional second argument,PathIsExecutableOptions(env,platform), defaulting toprocess.env/process.platform, so the existing one-argument calls keep compiling. Discovery still ORs this with "the version probe actually ran", so a candidate proven to execute is unaffected.Backward compatible: no exported name changed meaning off Windows, and nothing was removed. Consumers pinned to
^0.1.6need to widen the range to pick this up.@pwrdrvr/agent-client@0.8.2
Patch Changes
minimal-consumer@0.0.10
Patch Changes