Repository navigation
feat(search-experts): find who knows a topic from contributors across connected sources - #10565
waleedlatif1 wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[High impact] The PR appears safe to merge; no new blocking issue was found. SummaryAdds
|
There was a problem hiding this comment.
1 issue found across 40 files
Confidence score: 3/5
- In
apps/sim/lib/internal/organization-search/search-experts.ts, this workflow can callsearchExperts.executewithout checking whether organization search is available. AddrequireOrganizationSearchAvailable(call.principal.organizationId)before the call; the nested live-search gate does not cover this path.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/internal/organization-search/search-experts.ts">
<violation number="1" location="apps/sim/lib/internal/organization-search/search-experts.ts:12">
P2: Gate this workflow handler with `requireOrganizationSearchAvailable(call.principal.organizationId)` before invoking `searchExperts.execute`; do not rely on the nested live-search gate.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
… connected sources Adds search_experts to the Search MCP, the Assistant and the Organization Search block. Live providers report each result's contributors when asked; the use case ranks them by role, source, recency and rank, matches them to the People directory by email, Slack account or an unambiguous name, and returns evidence links to the items.
…ence, keep self-declared emails out of identity - Contributors resolve to their directory person before ranking, so an email in one source and a unique name in another add up. - An item two connected accounts both return counts once. - GitHub people are named by login; git commit emails and GitLab public emails no longer identify anyone; Slack file authors count. - Linear emails and the Drive last editor are fetched only for expert searches. - A Slack ID that two workspaces give different people resolves to no one, and Slack emails are folded. - The Assistant's citation readers collect expert evidence; its summary mentions outside contributors. - Without directory access, department and location filters no longer hide every contributor; the note says they were not applied. - The workflow tool projects every filter a secret could fill, not only the query.
a2c7e71 to
fd24aa5
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 42 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…ge when compacted, match only unshared emails - The Assistant tool projects the query, department and location through the turn's secret registry and refuses protected content, as search_workspace does. - Compacted expert results keep their partial-coverage marker. - An email two directory people share resolves to neither, as names already did. - GitLab results with only the singular assignee field keep that assignee.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
Adds
search_experts: find who in the organization knows a topic, ranked by what they did on matching items the caller can read.lib/knowledge/experts/rank.ts): weighted by role, source, recency and rank within the account. Slack items per person are capped, people who appear across several sources get a bonus, and each person keeps up to 5 evidence links.lib/knowledge/application/experts.ts, underknowledgeOperations.search):canLookUpPeople) gets contributors as their sources name them, without profiles.personFactsassearch_people.LiveSourceStatus; when a search reached no source, the note carries live search's guidance.search_experts.search_experts, which adds citation IDs to evidence and tells the model how to cite and how to reconnect.search_experts, which is now the sixth entry inORGANIZATION_SEARCH_OPERATIONS. It runs as the person who started the run.searchExpertsInputSchemareuses the 92-day activity window rule and the People field filters.?: T | undefinedfor exactOptionalPropertyTypes.Mothership
search_expertsto the Assistant's tool set with the catalog entry (already intool-catalog-v1), and regeneratesim-assistant-tools.generated.tsfromapps/sim/lib/api/contracts/mothership-assistant-tools.ts(bun run generate:cli-inventoryin the worker).route: 'sim'); nothing else is needed.Type of Change
Testing
lib/knowledge/application/experts.integration.ts, against a real database:lib/internal/organization-search/execute-tool.integration.ts:search_expertsin a workflow run with no connected source.lib/sim-search/live/atlassian.test.ts: contributors are extracted, and contributor fields are requested only when asked for.bun run generateandlint; audits: test-types, boundaries, tool-effects, api-validation:strict, canvas-sentences, integration-catalog, organization-egress, comment-hygiene, explicit-any, source-conventions, unused-exports, tool-registry-boundary.Checklist
test-auditauthoring gate)