Repository navigation
feat(search): list_my_activity across connected sources for Search MCP and the Assistant - #10535
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The latest changes appear safe to merge within the PR’s stated rollout dependencies. SummaryAdds
|
There was a problem hiding this comment.
All reported issues were addressed across 35 files
This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.
Turn on auto-fix | Re-trigger cubic
|
@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.
3 issues found across 36 files
Confidence score: 3/5
atlassian.tscan stop after three pages without reaching the continuation bound; because the cursor stores no page token, the next read repeats those pages and drops older activity. Preserve the Atlassian page token or continue until the bound is reached.activity-page.tscan emit a cursor longer than the 8,000-character input limit, so the next request may reject it. Bound or compact the serialized continuation state.google.tsshares its six-request budget with slice traversal, so a dense Calendar slice can exceed the documented 1,000-meeting cap. Enforce the item limit independently of the request budget.
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/sim-search/live/atlassian.ts">
<violation number="1" location="apps/sim/lib/sim-search/live/atlassian.ts:406">
P2: The three-page `readPastEnd` cap can stop before reaching the continuation bound, but the cursor stores no Atlassian page token. Re-reading the same pages leaves the bound unchanged and drops older activity; continue until the bound is crossed or preserve a provider cursor.</violation>
</file>
<file name="apps/sim/lib/sim-search/live/google.ts">
<violation number="1" location="apps/sim/lib/sim-search/live/google.ts:795">
P2: The six-request budget is shared with slice traversal, so one dense Calendar slice can read 1,500 meetings instead of the documented 1,000-meeting cap. Enforce the 1,000-item limit independently of the number of date slices.</violation>
</file>
<file name="apps/sim/lib/sim-search/live/activity-page.ts">
<violation number="1" location="apps/sim/lib/sim-search/live/activity-page.ts:13">
P2: `MAX_SEEN_AT_BOUND` can produce `nextCursor` values longer than the input contract’s 8,000-character limit. Bound or compact the serialized continuation state so every emitted cursor can be accepted by the next request.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@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 36 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@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.
No issues found across 36 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
db60cf6 to
bbf693c
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.
No issues found across 35 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
…P and the Assistant Reads the caller's own activity live from each connected account: Slack messages sent and replied, Gmail mail sent and replied, Google Calendar meetings attended, Jira issues created and assigned, Confluence pages created or edited and comments. Pages merge newest first behind a per-stream horizon with a signed per-account cursor, so nothing is dropped between pages; every entry passes the source boundary check before it is returned. Each source reports ok, partial, not_connected (with where to connect), reconnect, unsupported or failed. Gated by the my-activity organization flag.
…ses with activity
… and comments Bounds never move later when an account recovers, a failed account is retried after a page with progress, Jira and Confluence read past items newer than the bound, Calendar reads newest week slices first, the window end stays exclusive, comments keep their own keys, Slack entries carry only the member's message, saved Assistant answers keep activity citations, and the type and lint gates pass.
…and unsupported sources A page that returned entries continues even when the remaining bounds stay put, continuations skip the span check against now, cursors name each account's source so a disconnected account is reported, an unsupported source filter is reported, Jira created means creator, and Slack activity requests no file hits.
…o the end's own second
8abeec1 to
1be33b6
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 35 files
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
…ool only to people
|
@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.
No issues found across 36 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Turn on auto-fix | Re-trigger cubic
Summary
list_my_activity: the caller's own activity across their connected sources in a date window, newest first. Exposed as a Search MCP tool and an organization Assistant server tool, both calling one use case (listMyActivity,lib/sim-search/live/activity.ts)from:me), thread replies asrepliedin:sent,repliedwhen the message carries In-Reply-To; To/Cc are collaboratorsattended); declined/unanswered/solo/focus/OOO excludedcreated) and assigned (assigned, timed by last update,approximateTime)commented, reading the comment's page)ok | partial | not_connected | reconnect | unsupported | failed(+reason,retryAfterSeconds);not_connected/reconnectcarryconnect: { providerId, url }so clients can prompt the member to connectrequirePrincipalSubjectUserId); new operationknowledge.activity.listdenies workspace API keys; organization scope onlymy-activityorganization feature flag (MCP tool listed only when on; use case re-checks;my-activityentitlement for Assistant turns)safeContent/candidateFor/verifyCandidates/compareAccountsintolive/candidates.tsand shares Gmail/Atlassian date clauses between search and activityKnown limits
updatedBy()is not used (no account IDs, unreliable date bounds), so Jira reports created/assigned rather than every edit or commentunsupporteduntil activity can resume by page tokenpartialthread_ts; without it a reply reads assentDependencies
organization_search_mcp_invocation.tool_nameCHECK to includelist_my_activity(this PR only widens the TypeScript union)list_my_activityAssistant tool gated byENTITLEMENTS.myActivity(organization runs, likesearch_people), aretrievalPathsentry (or skip) forlist_my_activityinagent-cli/grammar/services.tssince it maps everyassistantToolContractsid,myActivity: "my-activity"inENTITLEMENTS, regenerated contracts, and the sim-sync companion fileType of Change
Testing
activity-page.test.ts: paging returns every entry once and newest first (topK 2 and 10), failed-account retry, no continuation with only failed accounts, stall stop, window/seen filtering, cursor scope and tamper refusal; each goes red with its guard revertedactivity-providers.test.ts: Slack reply/sent and file exclusion, Gmail reply and recipient parsing, Calendar attendance filter and order, Confluence approximate edits and comment pages, Jira assigned timingactivity.integration.ts(real Postgres): approved-but-unconnected sources reportednot_connectedwith connect hints (unapproved and non-activity sources left out), another member's chat refused, window cap and foreign cursor refusedlib/sim-search/live,lib/mothership/chat,lib/knowledge/mcp,lib/mothership/toolssuites pass (1,865 tests);bun run lint,bun run generate; full type-check and audits in CIChecklist
test-auditauthoring gate)