Skip to content

fix(skills): invoke bundled Python helpers portably - #607

Open
KumamuKuma wants to merge 4 commits into
Egonex-AI:mainfrom
KumamuKuma:fix/portable-python-helper-invocation
Open

fix(skills): invoke bundled Python helpers portably#607
KumamuKuma wants to merge 4 commits into
Egonex-AI:mainfrom
KumamuKuma:fix/portable-python-helper-invocation

Conversation

@KumamuKuma

Copy link
Copy Markdown
Contributor

Summary

Fix the four audited Python helper invocations in /understand-domain and /understand so they no longer depend on the caller's current working directory or on one platform-specific Python command.

This adds a shared Node launcher that:

  • probes python, py -3, and python3 on Windows, and python3 and
    python elsewhere, from the trusted plugin directory;
  • requires Python 3.10 or newer;
  • resolves the interpreter to an absolute path before executing the helper;
  • invokes subprocesses without a shell and preserves helper arguments and exit status; and
  • works when the plugin or project path contains spaces or the plugin is installed through a symlink/junction.

The affected domain extraction, subdomain merge, and full/incremental batch merge commands now resolve both the launcher and helper through $PLUGIN_ROOT. Regression tests cover command snippets, platform selection, missing/incompatible interpreters, linked installs, paths with spaces, startup failures, and exit/signal propagation.

Linked issue(s)

None.

How I tested this

  • corepack pnpm lint
  • corepack pnpm --filter @understand-anything/core test — 970 passed
  • corepack pnpm test — 488 passed, 15 skipped
  • corepack pnpm exec vitest run --maxWorkers=2 — 488 passed, 15 skipped
  • Targeted launcher and skill-command tests — 13 passed
  • Python helper tests — 95 passed, 1 skipped
  • Manual smoke test from a directory unrelated to the plugin and project, using a project path with spaces; domain-context.json was generated successfully
  • Adversarial Windows smoke test with a fake python.exe in the analyzed project directory; the launcher ignored it and ran Python 3.13 from the trusted resolution path

Versioning

  • Version bumped from 2.9.4 to 2.9.5 in all six authoritative manifests listed in CLAUDE.md
  • N/A — internal/docs-only change

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.

1 participant