fix: update Python sidecar package guidance#764
Conversation
realfishsam
left a comment
There was a problem hiding this comment.
PR Review: VERIFIED
What This Does
Fixes a stale package name in the Python SDK's auto-start failure error message: pmxtjs (the TypeScript npm package) was incorrectly told to Python users when the correct install target is pmxt-core (the sidecar server). Adds a source-level regression test to prevent the same mistake from recurring.
Blast Radius
sdks/python/pmxt/client.py: error message text only — no behavioral change, no API surface touchedsdks/python/tests/test_client_startup.py: new test file, no production impact- No core logic, no generated files, no OpenAPI schema, no TypeScript SDK, no exchange normalizers touched
Consumer Verification
Before (base branch): A Python user whose sidecar fails to auto-start sees:
Failed to start PMXT server: ...
Please ensure 'pmxtjs' is installed: npm install -g pmxtjs
Or start the server manually: pmxt-server
pmxtjs is the TypeScript SDK — installing it does not provide the sidecar server. The advice is actively misleading.
After (PR branch): Same error path shows:
Failed to start PMXT server: ...
Please ensure 'pmxt-core' is installed: npm install -g pmxt-core
Or start the server manually: pmxt-server
pmxt-core is the correct sidecar package (confirmed by core/package.json "name": "pmxt-core" and the "pmxt-server" bin entry).
The fix is consistent with:
sdks/typescript/pmxt/client.ts:337— alreadypmxt-coresdks/typescript/pmxt/server-manager.ts:226— alreadypmxt-coresdks/python/pmxt/server_manager.py:434— alreadypmxt-core
Test Results
- Build: N/A (docs/message-only change)
- Unit tests: PASS — ran
test_client_startup.pyin clean environment, 1 passed - Regression check: confirmed test fails against the unpatched file (
pmxtjs in source→ assertionpmxtjs not in sourcefails as expected) - CI check runs: not available (PR from fork, no CI results recorded)
Findings
-
sdks/python/QUICKREF.py:8— missed stale reference (non-blocking)
The PR's own test asserts"pmxtjs" not in client_source— it scansclient.pyonly.QUICKREF.pyline 8 still saysnpm install -g pmxtjsunder "Start Server:". This is the same category of bug the PR fixes and should be cleaned up (either in this PR or as immediate follow-up). It is a docstring/reference file not an error message, so it won't surface to users at runtime, but it will confuse developers reading the quick reference. -
Test design (note, not blocking)
test_client_startup.pyscans source text rather than exercising runtime behavior. This is intentional and reasonable for catching stale string literals. Theassert "pmxtjs" not in client_sourceassertion is appropriately broad — it will catch any future reintroduction ofpmxtjsanywhere inclient.py. One edge case: if the error message text is ever extracted to a module-level constant or moved toserver_manager.py, the test would need updating, but that's a future maintenance concern, not a bug today.
PMXT Pipeline Check
- Field propagation (3-layer): N/A
- OpenAPI sync: N/A
- Financial precision: N/A
- Type safety: N/A
- Auth safety: N/A
Semver Impact
patch — error message wording only; no API surface, no response shape, no SDK behavior changed
Risk
The one remaining gap is QUICKREF.py:8. Everything else is clean. The fix is mechanically correct, parity with TypeScript and server_manager.py is confirmed, and the regression test works as intended.
Generated by Claude Code
Co-authored-by: nanookclaw <nanookclaw@users.noreply.github.com>
09a07ea to
697b80d
Compare
Summary
Closes #756.
The Python SDK auto-start failure message still pointed users at the old
pmxtjspackage. This updates the message to installpmxt-corewhile preserving the existingpmxt-servermanual-start guidance, matching the current sidecar package naming used elsewhere in the project.I also added a small source-level regression test under the Python SDK tests. It checks that the startup guidance includes
npm install -g pmxt-core, keeps thepmxt-serverhint, and no longer referencespmxtjsinpmxt/client.py.Verification:
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest tests/test_client_startup.pyPlain
pytest tests/test_client_startup.pyis blocked in my local environment before collection by a globally installed pytest plugin import error forevalcraft; the focused test above passes with external plugin autoload disabled.