PDX-515: fix(mcp): additive org_describe workspace discovery (no regression)#233
Merged
Merged
Conversation
RCA: org_describe resolved the Provar workspace via a sibling workspace-<name> dir; the layout needed updating so the project's parent directory is treated as the workspace root. Fix: workspaceCandidates now yields <parent>/, <parent>/Provar_Workspaces/workspace-<basename>/, and ~/Provar/workspace-<basename>/; discoverWorkspace requires a .metadata dir so candidate 1 falls through when the parent is not a workspace; removed the now-unused projectNameDashes helper and updated tests and docs.
RCA: PDX-515 fixed SfObject cache parsing but the earlier release only probed the sibling workspace-<basename> directory, so parent-layout IDE workspaces were never discovered and the improved parser never ran for those users, and PR #232 then dropped the sibling probe entirely which would regress sibling-layout users. Fix: workspaceCandidates now probes parent, then sibling workspace-<basename>, then Provar_Workspaces, then ~/Provar (each gated on a .metadata dir so no false-positive fault paths), preferring the parent IDE layout while keeping sibling workspaces discoverable; sync the in-tool description and docs/mcp.md to the four-candidate order and add a sibling-only back-compat regression test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Quality Orchestrator🟢 LOW · 🧪 Tests to Run · Running 1 of 57 tests
▶ Run commandnpx vitest run \
unit/mcp/orgDescribeTools.test.ts⚡ quality-orchestrator · |
RCA: the additive org_describe workspace-discovery fix is a user-visible behaviour change over 1.6.3 and needs its own patch release so MCP consumers can pin the corrected build. Fix: bump package.json version and both server.json fields (top-level version and packages[0].version) from 1.6.3 to 1.6.4, keeping the npm and MCP-registry manifests in sync. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
provar_org_describewas still returning a structured cache-miss for users whose Provar test project lives inside its IDE workspace (workspace = the project's parent dir). PDX-515 (1.6.3) fixed the SfObject cache parsing, but workspace discovery only probed a siblingworkspace-<basename>/dir, so for the parent-layout the workspace was never found and the improved parser never ran.This PR builds on @Provar-tarunprashar's fix from #232 (his commit is preserved here) and makes discovery additive so it also can't regress the older sibling layout.
What changed
workspaceCandidates()now probes, in order — each gated on the candidate actually being a Provar workspace (contains.metadata) and within--allowed-paths:<parent>/— project inside its workspace (current Provar IDE layout) ← the reported fix<parent>/workspace-<basename>/— sibling layout (restored for backward compatibility)<parent>/Provar_Workspaces/workspace-<basename>/~/Provar/workspace-<basename>/Parent is preferred (it's the real IDE layout the reporter confirmed); the sibling probe is restored right after it, so sibling-layout workspaces stay discoverable. The
.metadatagate means no candidate is a false-positive "fault path" — a bare parent dir without.metadatafalls through cleanly.Why (root cause)
PDX-515 = parsing fix; #232 = discovery fix. #232 alone replaced the sibling candidate, which would regress anyone on the previously-documented sibling layout. Making it additive fixes the reported case and keeps existing sibling workspaces working.
Validation
Reproduced the customer's real layout (project inside workspace + PDX-515 SfObject cache) and ran the same end-to-end test against both code versions:
discoverWorkspacereturnsnull→ cache miss (fails)Also added a sibling-only regression test proving candidate 2 still resolves when the parent isn't a workspace.
Review notes
An adversarial Codex review of #232 flagged two issues, both addressed here:
descriptionstill advertised the removed algorithm (<name-dashes>) → synced to the real four-candidate order (docs/mcp.mdupdated to match).Jira
https://provartesting.atlassian.net/browse/PDX-515 (reopen for the parent-layout / sibling-compat cases)
Test plan
tsc --noEmitcleanyarn lintclean (eslint + script-name check)yarn build && yarn testpassedmcp-smoke.cjs— runs against the installed global package, not this build; env-only checkChanges
src/mcp/tools/orgDescribeTools.ts: additiveworkspaceCandidates; synced in-tool description + doc commentsdocs/mcp.md: four-candidate discovery list; correctedworkspace_pathoutput descriptiontest/unit/mcp/orgDescribeTools.test.ts: 4-candidate order test; sibling-only back-compat regression testNote
Supersedes #232 — that PR can be closed in favour of this one (its commit is included here). Credit to @Provar-tarunprashar for the root-cause analysis and the discovery fix.
🤖 Generated with Claude Code