Skip to content

fix(mcp): make company context search find shared knowledge pills - #31527

Merged
Vishnuujain merged 3 commits into
mainfrom
fix/mcp-company-context-search
Aug 16, 2026
Merged

Vishnuujain merged 3 commits into
mainfrom
fix/mcp-company-context-search

Conversation

@Vishnuujain

Copy link
Copy Markdown
Contributor
  • search_company_context now passes the caller's identity to the vector search. Without it the search fell back to hiding everything not marked org-wide, and knowledge pills are marked "Shared" — so it returned nothing, for every query and every user, admins included.
  • Its "only file-extracted, shared pills" filter now actually reaches the query. The query builder silently ignores filter keys it does not recognise, and these two were not on the list, so ordinary memories could be returned as company context.

Fixes #31521

@Vishnuujain
Vishnuujain requested a review from a team as a code owner August 14, 2026 09:10
@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added the safe to test Add this label to run secure Github workflows on PRs label Aug 14, 2026
@Vishnuujain Vishnuujain self-assigned this Aug 14, 2026
@Vishnuujain Vishnuujain added the To release Will cherry-pick this PR into the release branch label Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 3f70c05bac645737d3b793fc96b33a2011268e0a in Playwright run 31848243796, attempt 1.

✅ 1026 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 55m 23s

⏱️ Max setup 3m 11s · max shard execution 16m 40s · max shard-job elapsed before upload 27m 12s · reporting 6s

🌐 198.80 requests/attempt · 2.21 app boots/UI scenario · 32.70% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 32.7% (convergence target: at most 15%).
  • Application boot ratio was 2.21 per UI scenario (2308 boots / 1042 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 135 0 0 0 0 0
✅ Shard chromium-02 141 0 0 0 0 0
✅ Shard chromium-03 138 0 0 0 0 0
✅ Shard chromium-04 144 0 0 0 0 0
✅ Shard chromium-05 146 0 0 0 0 0
✅ Shard chromium-06 136 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 7 0 0 0 0 0
✅ Shard ingestion-01 2 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 14, 2026
@Vishnuujain
Vishnuujain enabled auto-merge August 14, 2026 22:51
@Vishnuujain
Vishnuujain added this pull request to the merge queue Aug 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 15, 2026
@Vishnuujain
Vishnuujain added this pull request to the merge queue Aug 16, 2026
Merged via the queue into main with commit d662ff3 Aug 16, 2026
120 of 124 checks passed
@Vishnuujain
Vishnuujain deleted the fix/mcp-company-context-search branch August 16, 2026 15:56
@github-project-automation github-project-automation Bot moved this to Done ✅ in Shipping Aug 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Failed to cherry-pick changes to the 1.13 branch.
Please cherry-pick the changes manually.
You can find more details here.

@github-actions

Copy link
Copy Markdown
Contributor

Changes have been cherry-picked to the 2.0 branch.

github-actions Bot pushed a commit that referenced this pull request Aug 16, 2026
@gitar-bot

gitar-bot Bot commented Aug 16, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Fixes company context search in MCP by passing the caller's identity and correctly applying file-extracted shared pill filters, ensuring shared knowledge pills are properly retrieved. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

This branch was previously deployed

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

Labels

safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch

Projects

Status: Done ✅

Development

Successfully merging this pull request may close these issues.

Company Context search always returns no results

3 participants