Describe the bug
On macOS machines with TeX Live installed, command -v mex resolves to TeX Live's mex binary instead of our CLI. The lookup returns cleanly - but for the wrong program. Any setup step, doc, or script that checks for mex by name can pass while mex-agent isn't actually installed or runnable, and users can invoke the wrong binary without an obvious error. Reported by Jang Young Jeong (@akillness) in a hands-on audit: https://akillness.github.io/posts/mex-macos-command-collision/
To Reproduce
- On macOS with TeX Live installed, run
command -v mex
- It resolves to the TeX Live binary, not mex-agent
- Install/verify steps that check
mex by name pass incorrectly
Expected behavior
Install verification and docs should verify capability (the resolved binary actually responds as mex-agent, e.g. via mex --version signature), not just the name - or at minimum detect the collision and warn with the exact path conflict.
Command output
See the audit above for the reporter's exact output and his capability-check wrapper.
Environment
- mex version: 0.7.1 runtime (0.8.2 source inspected separately in the audit)
- Node.js version: see audit
- OS: macOS with TeX Live installed
- Install method: npm global
Additional context
Possible directions (open to discussion): collision detection + warning at install/first run; capability-based verification in setup and docs; README troubleshooting entry (alias / PATH ordering / wrapper); longer-term evaluation of the CLI name or an alternate alias (breaking-change territory, separate discussion). The same audit flags two other things worth their own issues if confirmed: a stale graph line-range until clean rebuild, and mex-mcp source present with no published npm package. Thanks @akillness for the careful writeup.
Describe the bug
On macOS machines with TeX Live installed,
command -v mexresolves to TeX Live'smexbinary instead of our CLI. The lookup returns cleanly - but for the wrong program. Any setup step, doc, or script that checks for mex by name can pass while mex-agent isn't actually installed or runnable, and users can invoke the wrong binary without an obvious error. Reported by Jang Young Jeong (@akillness) in a hands-on audit: https://akillness.github.io/posts/mex-macos-command-collision/To Reproduce
command -v mexmexby name pass incorrectlyExpected behavior
Install verification and docs should verify capability (the resolved binary actually responds as mex-agent, e.g. via
mex --versionsignature), not just the name - or at minimum detect the collision and warn with the exact path conflict.Command output
See the audit above for the reporter's exact output and his capability-check wrapper.
Environment
Additional context
Possible directions (open to discussion): collision detection + warning at install/first run; capability-based verification in setup and docs; README troubleshooting entry (alias / PATH ordering / wrapper); longer-term evaluation of the CLI name or an alternate alias (breaking-change territory, separate discussion). The same audit flags two other things worth their own issues if confirmed: a stale graph line-range until clean rebuild, and mex-mcp source present with no published npm package. Thanks @akillness for the careful writeup.