Skip to content

Gate Search Assistant integration lookups with AppConfig - #8301

Merged
Sg312 merged 5 commits into
devfrom
feat/search-assistant-query-filters
Sep 25, 2026
Merged

Sg312 merged 5 commits into
devfrom
feat/search-assistant-query-filters

Conversation

@Sg312

@Sg312 Sg312 commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Search Assistant can resolve people/resource IDs and read structured details through 39 existing read-only integration operations. The AppConfig flag mothership-search-integration-tools controls gateway discovery, calls, and the corresponding worker prompt instructions. It defaults off and has no environment-variable fallback.

When disabled, new Search requests omit the integration capability; discovery and execution also recheck the flag so an existing conversation cannot keep using it after the updated configuration is observed. The flag uses the shared AppConfig polling/cache behavior, including last-known-good values during AppConfig outages; it is a rollout toggle, while credential and authorization checks remain independent. Build and Plan retain their current integration tools. When enabled, Search uses the person's existing connected account and credential/visibility rules. Native results return normally; no OAuth scopes or additional Search result filtering are introduced. Writes and arbitrary MCP calls remain unavailable.

Sources: Slack, Gmail, Calendar, Drive, Sheets, Jira, Confluence, GitHub, GitLab, and Coda. GitLab personal-token operations retain the existing workspace-only restriction. Gmail labels and GitHub review threads are exposed through their existing shared tool catalogs. Generated-doc discovery now handles inherited version-mapped lists with appended operations.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other

Testing

  • 492 focused and CI-regression tests passed after rebasing onto dev; includes on/off/on capability changes, revoked discovery/calls, and unchanged Build/Plan behavior.
  • New flag regressions failed before the guards were implemented, then passed.
  • Preserved dev's existing test-runner configuration; removing the inherited global mock-clearing override fixed the eight CI failures in older dev suites.
  • Sim typecheck, all 49 repository audits (including generated docs), lint, and diff checks passed.
  • Existing durable worker coverage verifies both catalog-free Search prompts and native integration call/checkpoint handling.
  • Live provider accounts have not been exercised; this rollout enables that testing in dev.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Companion PR

Companion: https://github.com/simstudioai/mothership/pull/530

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 25, 2026 6:23pm UTC

Request Review

@github-actions github-actions Bot added the requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep label Sep 25, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Cross-repo companion check

One or more companion PRs aren't merged into staging yet. Merging this without them will leave copilot and sim out of sync — merge them in lockstep.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 13 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 3/5

[Medium risk] Gates Search Assistant integration lookups with a feature flag.

The PR is not yet safe to merge because Search integration access may remain available after flag revocation during an AppConfig outage.

Findings

  1. P1 Security Revoked access can persist ▶

Summary

The PR makes selected read-only integration lookups available to Search Assistant behind an AppConfig-only flag, with separate payload, discovery, and execution checks. It also updates shared tool exposure and generated integration documentation.

  • Search sends the integration capability only while the flag is enabled; Build and Plan keep their existing catalog behavior.
  • Discovery and execution apply the Search allowlist and connected-account restrictions, but their flag checks can retain an enabled AppConfig value after revocation during refresh failures.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Search request] --> B{AppConfig flag}
  B -->|enabled| C[Integration capability in payload]
  B -->|disabled| D[No integration capability]
  C --> E[Catalog discovery checks flag]
  E --> F[Allowed read-only operation]
  F --> G[Executor checks flag]
  G --> H[Connected-account tool call]
Loading

Reviews (2) · Last reviewed commit: "Gate Search integration tools with AppCo..."

Comment thread apps/sim/lib/mothership/assistant/tool-policy.ts
Comment thread apps/sim/blocks/blocks/github.ts
@Sg312
Sg312 changed the base branch from staging to dev September 25, 2026 18:17
@Sg312
Sg312 requested a review from a team as a code owner September 25, 2026 18:17
@Sg312
Sg312 force-pushed the feat/search-assistant-query-filters branch from 3c11b4d to d8a7eeb Compare September 25, 2026 18:17
@Sg312 Sg312 changed the title Enable read-only integration lookups for Search Assistant Gate Search Assistant integration lookups with AppConfig Sep 25, 2026
@Sg312

Sg312 commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

@greptile-apps please re-review the latest head d8a7eeb. Search integration capability is now gated by an AppConfig-only flag, with runtime discovery/execution revocation and regression coverage. The PR now targets dev; prior resolved findings and credential-scope limitations are documented in the description.

Comment thread apps/sim/lib/mothership/tool-executor/executor.ts
@Sg312
Sg312 merged commit d4f32d6 into dev Sep 25, 2026
31 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/search-assistant-query-filters branch September 25, 2026 23:06

This branch was previously deployed

1 inactive deployment
Preview — fb7923ce Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant