Skip to content

fix(integrations): honor OFF for Claude Desktop drift and Grok ensure (#2250 rebased) - #2259

Merged
lidge-jun merged 4 commits into
devfrom
codex/land-2250
Aug 21, 2026
Merged

fix(integrations): honor OFF for Claude Desktop drift and Grok ensure (#2250 rebased)#2259
lidge-jun merged 4 commits into
devfrom
codex/land-2250

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Lands PR #2250 by @lilinxiong (integrations honor OFF for Claude Desktop drift and Grok ensure), rebased onto current dev plus the two reviewer blockers fixed:

  • Stale-snapshot race closed: both ensure branches re-read persisted desired state immediately before each external-file mutation; spawned-proxy sync derives hostname from the freshly loaded config. Four deterministic OFF->ON / ON->OFF race regressions (live + spawned), mutation-proven (stale impl fails 0/4).
  • Claude Desktop desired-OFF gateway residue now renders a stale/cleanup-pending state instead of 'absent' while traffic still routes through the gateway; overview-row regression added.

Verification

  • Integrations 62/0, GUI overview 43/0, typecheck, i18n lint, GUI production build all green.

Checklist

lilinxiong and others added 4 commits August 21, 2026 13:08
Claude Desktop disable refused owned gateway_drifted profiles (including a
missing appliedFingerprint), so leftover Claude-3p configs could not be turned
off and looked like they needed an update. Grok ensure still called
syncGrokConfig unconditionally, rewriting ~/.grok after updates even when the
durable switch stayed off. Gate ensure on desired state, clear Desktop residue
when OFF, and stop treating OFF leftovers as stale applies.
Keep leftover owned drift and assert the status route reports residue, not a stale apply.
A toggle during ensure's probe/start window could make the stale snapshot strip a freshly enabled Grok fence or delete a freshly applied Desktop profile. Re-read persisted desired state immediately before each file write, and show leftover desired-off Desktop gateways as stale/cleanup-pending instead of absent.
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner August 21, 2026 04:16
@lidge-jun lidge-jun added the bug Something isn't working label Aug 21, 2026
@lidge-jun
lidge-jun merged commit 6c928aa into dev Aug 21, 2026
11 of 12 checks passed
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@lidge-jun, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 8 minutes

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6cbd7afb-03a1-42a7-a35b-859e473a98a5

📥 Commits

Reviewing files that changed from the base of the PR and between 4121827 and 1419ba2.

📒 Files selected for processing (20)
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/fr.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/tr.ts
  • gui/src/i18n/zh-TW.ts
  • gui/src/i18n/zh.ts
  • gui/src/pages/integrations/integration-api.ts
  • gui/src/pages/integrations/overview-clients.ts
  • gui/tests/integrations-overview-rows.test.ts
  • src/claude/desktop-3p.ts
  • src/cli/ensure-desired-integrations.ts
  • src/cli/index.ts
  • src/server/management/agent-settings-routes.ts
  • tests/desktop-3p-removal.test.ts
  • tests/ensure-desired-integrations-race.test.ts
  • tests/grok-lifecycle.test.ts
  • tests/native-claude-desktop-toggle.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • UI screenshot required.

What to do

  • Add a screenshot of the UI change to the PR description.

Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required enforce-target check will keep failing until every issue above is resolved.

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

Copy link
Copy Markdown

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: 1419ba2fdf

ℹ️ 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".

Comment on lines +93 to +97
const g = await deps.syncGrokConfig(
port,
config,
hostname !== undefined ? { hostname } : {},
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Recheck Grok intent after catalog loading

When Grok is ON and syncGrokConfig is awaiting fetchAllModels (src/grok/sync.ts), a concurrent dashboard toggle can persist OFF and strip the fence, after which this call resumes and injects it again from the stale config loaded at line 79. This leaves the durable switch OFF while Grok remains routed through OpenCodex, recreating the race this change is intended to close; recheck the desired state after model discovery and immediately before the synchronous file write.

Useful? React with 👍 / 👎.

Comment thread src/cli/index.ts
// responds — align here too so `ocx ensure` never returns with a stale ON/OFF mismatch.
// Persisted state is loaded inside each mutation after waitForProxy, so a
// toggle while the child starts wins over the pre-spawn snapshot.
await reconcileEnsureDesiredIntegrations(port, { kind: "spawned" });

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 Use the spawned proxy's observed hostname

When config.hostname changes after the child reads its startup configuration but before waitForProxy returns, the spawned branch reloads the new configured hostname instead of using the hostname of the process that actually became live. Because syncGrokConfig derives both the generated URL and its loopback/non-loopback policy from that value, it can strip a valid fence or write one for an address the running proxy did not bind; retain the LiveProxy returned by waitForProxy and pass its observed hostname as the live branch already does.

Useful? React with 👍 / 👎.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants