Open
Conversation
22f445f to
ec814c8
Compare
Introduce root-scoped runtime state and extend the project_root contract across the pg-mcp tool surface so calls can target an effective root without mutating the active session root. set_project_root remains the explicit mechanism for switching the default root for later calls. This Stage 1 functionality commit folds the validated Rust changes into one cross-root checkpoint. It includes the root-aware server and tool plumbing, blank-parameter and empty-batch hardening needed for real MCP clients, reset semantics for transient runtime state on project-root switches, centralized compatibility-state syncing for the default root, the large-repository sharded hierarchy deadlock fix, and the shared embedding model cache needed for stable cross-root semantic search behavior. Live validation confirmed the resulting surface on healthy external roots, including search, fetch, explore, build, reload, update, lifting submission, routing submission, file synthesis submission, hierarchy submission, and large-root hierarchy workflows. Documentation remains separate from this Stage 1 functionality commit.
ec814c8 to
099eefe
Compare
Document the expanded per-call project_root behavior in the README and harden path expansion in the MCP server so '~' resolution works across Windows and Unix-style environments. This keeps the follow-up focused only on files touched after the original cross-root feature commit. The README clarifies the additional tool surface and override behavior, while server.rs now resolves the home directory from USERPROFILE/HOMEDRIVE+HOMEPATH before falling back to HOME so project_root overrides behave correctly on Windows hosts.
Keep the cross-root PR surface separate from baseline maintenance needed to satisfy today's CI environment. This commit updates the lockfile for the current RustSec advisories and applies the minimal lint-driven cleanup now required by stable Clippy across the workspace. The source changes are intentionally mechanical: remove unnecessary trailing commas, prefer sort_by_key where Clippy requires it, simplify one Rust parser match arm, iterate map values directly, and use clearer Duration units. Together with the rustls-webpki lockfile bump to 0.103.12, this restores green results for fmt, clippy, test, and audit without mixing feature behavior changes into the maintenance commit.
39445be to
b645856
Compare
Sanitize whitespace-only MCP since values before dispatching update_rpg. The handler previously forwarded Some("") into the committed-diff path, which caused git OID parsing to fail with 'invalid base_commit SHA' instead of falling back to the default workdir update behavior.
Treating blank input as unset preserves the intended API contract for optional since values and fixes cross-root callers that serialize an empty string rather than omitting the field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #89
PR intent: cross-root MCP support
Intent
This change intentionally makes
project_roota first-class contract across the Stage 1 MCP tool surface.Intentional outcomes
project_rootwithout changing the active rootset_project_rootremains the explicit default-root switch for subsequent callsproject_rootvalues are normalized as “no override” at the root-resolution boundaryset_project_rootuses reset semantics for transient runtime state while preserving persisted.rpgartifacts