Skip to content

bug: packaged CLI and hooks do not share a stable interpreter/config resolver #85

Description

@unfoundbox

Observed

A pipx-installed SpacePilot computes its project root from the installed module path. It therefore looks for .spacepilot_config.json beside site-packages rather than in the checkout or a stable user-config directory. Running the installed command outside the repository can silently fall back to the pipx interpreter and a site-packages-relative output root.

The repository pre-commit hook has the same boundary problem in another form: it selects the first bare python3/python on PATH and does not honor SPACEPILOT_PYTHON or python_bin. On the primary machine this selected base Conda and failed to import yaml even though the full suite passes in the configured project interpreter.

Reproduction

  1. Install the checkout with pipx.
  2. Put python_bin in the checkout-local .spacepilot_config.json.
  3. Run spacepilot from /tmp and inspect interpreter/config resolution.
  4. Run a commit from an isolated worktree where bare python3 lacks project dependencies.

Expected

  • one resolver defines configuration precedence for source checkouts, packaged CLI execution, hooks, and subprocess launchers
  • machine configuration lives at a stable user-data path, not in source or site-packages
  • checkout-local configuration is an explicit development override
  • hooks honor the canonical resolver or fail with an exact remediation command
  • diagnostics report the chosen config file and interpreter provenance
  • packaging and worktree tests exercise invocation outside the repository

Related architecture: #80.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions