Skip to content

Allow configuring runtime executable, installation and state paths - #43

Open
F2011B wants to merge 1 commit into
vectorize-io:mainfrom
F2011B:codex/configurable-runtime-paths
Open

F2011B wants to merge 1 commit into
vectorize-io:mainfrom
F2011B:codex/configurable-runtime-paths

Conversation

@F2011B

@F2011B F2011B commented Oct 21, 2026

Copy link
Copy Markdown

On Windows machines with application-control policies, the Python SDK always prefers the executable inside its wheel, and the CLI always extracts PostgreSQL into the user's profile. An approved executable directory cannot currently be selected independently of writable database state.

This adds three optional environment variables:

  • PG0_EXECUTABLE: absolute path to an existing pg0 executable; takes precedence over the Python wheel's bundled executable.
  • PG0_INSTALLATION_DIR: absolute root for extracted PostgreSQL and extension files, keeping the existing version subdirectory layout.
  • PG0_HOME: absolute root for instance metadata and default data directories, used consistently by all commands.

Defaults and SDK method signatures are unchanged. Invalid overrides fail explicitly instead of falling back to a different location. The README documents provisioning, read/execute access on Windows after initial extraction, and the distinction from the build-time PG0_BINARY_PATH setting.

Validation:

  • macOS: 15 Rust unit tests; Python SDK suite: 25 passed, 2 platform skips.
  • Native Windows x64: Rust build and tests; Python SDK suite: 24 passed, 3 platform skips.
  • Hindsight API Slim 1.1.0 on Windows 11 with local ONNX embeddings, RRF reranking, and a local OpenAI-compatible model: retain, recall, reflect, restart persistence, and foreground Ctrl+C cleanup.
  • PostgreSQL 18.1 and vector.dll loaded from the configured installation outside the user profile. The installation was given read/execute-only ACLs during the Hindsight test; no symbolic links were used and native-file hashes remained unchanged.

The target organization's application-control rules still need to permit the chosen executable paths; this change only makes those paths configurable.

- Add absolute PG0_HOME and PG0_INSTALLATION_DIR overrides without changing defaults.
- Honor PG0_EXECUTABLE before bundled Python SDK binary discovery.
- Document Windows provisioning and test SDK path isolation with pgvector and restart.
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