Skip to content

fix: canonicalize app name variants in cross-app detection#7409

Merged
Jasonnnz merged 1 commit into
feature/qa-video-automationfrom
swarm/task-2
Feb 24, 2026
Merged

fix: canonicalize app name variants in cross-app detection#7409
Jasonnnz merged 1 commit into
feature/qa-video-automationfrom
swarm/task-2

Conversation

@Jasonnnz
Copy link
Copy Markdown
Contributor

@Jasonnnz Jasonnnz commented Feb 24, 2026

Fixes false cross-app triggers from PR #7292 where 'Google Chrome' matched both 'chrome' and 'google chrome' as distinct apps.


Open with Devin

Co-Authored-By: Claude <noreply@anthropic.com>
@Jasonnnz Jasonnnz self-assigned this Feb 24, 2026
@Jasonnnz Jasonnnz merged commit 5f480ee into feature/qa-video-automation Feb 24, 2026
@Jasonnnz Jasonnnz deleted the swarm/task-2 branch February 24, 2026 01:37
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 778c065aa0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

['vellum assistant', 'vellum'],
['visual studio code', 'vscode'],
['iterm2', 'iterm'],
['gmail', 'mail'],
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep Gmail distinct from Mail in canonicalization

Mapping gmail to mail in APP_CANONICAL_MAP causes taskExplicitlyRequestsCrossApp to collapse two genuinely different apps into one canonical key. For tasks like “copy this from Gmail into Mail,” the detector now records only one app mention, so the cross-app escape path is not activated and later computer_use_open_app / computer_use_run_applescript calls can be blocked even though the user explicitly requested a cross-app workflow.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

['vellum assistant', 'vellum'],
['visual studio code', 'vscode'],
['iterm2', 'iterm'],
['gmail', 'mail'],
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.

🔴 Incorrect canonical mapping 'gmail' → 'mail' collapses two distinct apps into one

The APP_CANONICAL_MAP maps 'gmail' to 'mail', but Gmail (Google's web-based email service) and Mail (Apple's native macOS email client) are genuinely different applications. This causes taskExplicitlyRequestsCrossApp() to fail to detect cross-app intent when a user mentions both.

Root Cause and Impact

When iterating over KNOWN_APP_NAMES in taskExplicitlyRequestsCrossApp(), both 'gmail' and 'mail' will canonicalize to 'mail''gmail' via the canonical map at line 349, and 'mail' via normalizeAppLabel('mail')'mail' (fallback at line 402). This means mentionedApps will only ever contain one entry for both, so the mentionedApps.size >= 2 check at line 406 won't trigger.

For example, a task like "forward the email from Mail to Gmail" mentions two distinct applications but the function returns false, causing the cross-app guard at computer-use-session.ts:650-666 to block the workflow instead of allowing it.

Every other entry in the canonical map correctly maps a long-form name to its short-form equivalent for the same application (e.g. 'google chrome' → 'chrome', 'microsoft teams' → 'teams'). The 'gmail' → 'mail' entry is the only one that conflates two genuinely different apps.

Suggested change
['gmail', 'mail'],
['gmail', 'gmail'],
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@Jasonnnz
Copy link
Copy Markdown
Contributor Author

Addressed in #7460

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant