Skip to content

fix: update Python sidecar package guidance#764

Merged
realfishsam merged 2 commits into
pmxt-dev:mainfrom
nanookclaw:fix/python-sidecar-package-message
Jun 1, 2026
Merged

fix: update Python sidecar package guidance#764
realfishsam merged 2 commits into
pmxt-dev:mainfrom
nanookclaw:fix/python-sidecar-package-message

Conversation

@nanookclaw
Copy link
Copy Markdown
Contributor

Summary

Closes #756.

The Python SDK auto-start failure message still pointed users at the old pmxtjs package. This updates the message to install pmxt-core while preserving the existing pmxt-server manual-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 the pmxt-server hint, and no longer references pmxtjs in pmxt/client.py.

Verification:

  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest tests/test_client_startup.py

Plain pytest tests/test_client_startup.py is blocked in my local environment before collection by a globally installed pytest plugin import error for evalcraft; the focused test above passes with external plugin autoload disabled.

Copy link
Copy Markdown
Contributor

@realfishsam realfishsam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 touched
  • sdks/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 — already pmxt-core
  • sdks/typescript/pmxt/server-manager.ts:226 — already pmxt-core
  • sdks/python/pmxt/server_manager.py:434 — already pmxt-core

Test Results

  • Build: N/A (docs/message-only change)
  • Unit tests: PASS — ran test_client_startup.py in clean environment, 1 passed
  • Regression check: confirmed test fails against the unpatched file (pmxtjs in source → assertion pmxtjs not in source fails as expected)
  • CI check runs: not available (PR from fork, no CI results recorded)

Findings

  1. sdks/python/QUICKREF.py:8 — missed stale reference (non-blocking)
    The PR's own test asserts "pmxtjs" not in client_source — it scans client.py only. QUICKREF.py line 8 still says npm install -g pmxtjs under "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.

  2. Test design (note, not blocking)
    test_client_startup.py scans source text rather than exercising runtime behavior. This is intentional and reasonable for catching stale string literals. The assert "pmxtjs" not in client_source assertion is appropriately broad — it will catch any future reintroduction of pmxtjs anywhere in client.py. One edge case: if the error message text is ever extracted to a module-level constant or moved to server_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

@realfishsam realfishsam force-pushed the fix/python-sidecar-package-message branch from 09a07ea to 697b80d Compare June 1, 2026 11:41
@realfishsam realfishsam merged commit f3f7cbb into pmxt-dev:main Jun 1, 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.

sdk-drift: Python sidecar startup error message references old package name "pmxtjs" instead of "pmxt-core"

2 participants