Skip to content

fix(google,cursor): isolate Antigravity session/replay and Cursor H2 pool/JWT sub scope - #7842

Merged
lidge-jun merged 4 commits into
devfrom
feat/oauth-parity-wp3-google-cursor
Oct 27, 2026
Merged

lidge-jun merged 4 commits into
devfrom
feat/oauth-parity-wp3-google-cursor

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

  • Isolate Google Cloud Code Assist (google-antigravity) antigravitySessionId per bound credential identity (_reasoningReplayScope.current) or explicit accountScope while preserving single-arg fallback, and filter the context_engineering_is_the_way_to_go bypass sentinel in isLikelyRealThoughtSignature and extractSignature.
  • Preserve explicit thinkingBudget / thinking_budget in compileGoogleWireBody when thinkingLevel is absent.
  • Extract sub from id_token into accountId, forward the default tier_id from loadCodeAssist.allowedTiers to onboardUser, and surface structured (invalid_grant) on token refresh failures without leaking error_description in src/oauth/google-antigravity.ts.
  • Isolate CursorH2SessionPool entries by (origin, credentialScope) in src/adapters/cursor/h2-pool.ts and live-models.ts, unify CURSOR_DISCOVERY_CLIENT_VERSION with cli-2026.07.08-0c04a8a, anchor fallback _cursorIdentityScope to the JWT sub claim in src/adapters/cursor.ts so token refresh preserves checkpoints, add x-cursor-streaming: true in http1-bidi.ts, and remove the giveaway opencodex-quota User-Agent in vendor-probes-oauth.ts.

Verification

  • env -u GOOGLE_ANTIGRAVITY_USER_AGENT bun test tests/adapters/google/google-antigravity-wire.test.ts tests/adapters/google/google-antigravity-replay.test.ts tests/adapters/google/google-wire-compiler.test.ts tests/adapters/google/google-antigravity-oauth.test.ts tests/providers/cursor/cursor-adapter.test.ts tests/providers/cursor/cursor-discovery.test.ts tests/providers/cursor/cursor-h2-pool-shutdown.test.ts tests/responses/responses-account-change-scrub.test.ts (234 pass, 0 fail)
  • bun run typecheck (exit 0)
  • bun run privacy:scan (Privacy scan passed)
  • bun run structure:check (structure/ SSOT checks passed)

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 27, 2026 17:39
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T17:42:18.566351Z eb24f20 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: eb24f2097e

ℹ️ 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 +106 to +110
const scope = parsed._reasoningReplayScope?.current?.credentialDurableIdentity?.trim()
|| parsed._reasoningReplayScope?.current?.credentialIdentity?.trim()
|| accountScope?.trim()
|| "";
const preimage = scope ? `acct:${scope}\0${text}` : text;

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 Update the owned architecture docs for the new isolation contract

This changes the credential boundary of Antigravity session/replay identity, while the Cursor changes also alter discovery-pool ownership and fallback checkpoint identity, but the commit updates no structure/ documentation. The mapped architecture docs therefore omit the new credential-scoping and refresh-stability contracts that future changes need to preserve. Update the applicable documents identified by structure/INDEX.md in this commit; src/AGENTS.md explicitly requires those documentation updates alongside changes to owned adapter, transport, and authentication areas.

AGENTS.md reference: src/AGENTS.md:L11-L11

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 27, 2026
@lidge-jun
lidge-jun force-pushed the feat/oauth-parity-wp2-codex branch from f28e256 to 94c37d1 Compare October 27, 2026 19:05
@lidge-jun
lidge-jun force-pushed the feat/oauth-parity-wp3-google-cursor branch from eb24f20 to 67ef1d0 Compare October 27, 2026 19:05
@lidge-jun
lidge-jun changed the base branch from feat/oauth-parity-wp2-codex to dev October 27, 2026 19:57
An error occurred while trying to automatically change base from feat/oauth-parity-wp2-codex to dev October 27, 2026 19:57
@lidge-jun
lidge-jun merged commit 1d91861 into dev Oct 27, 2026
1 of 12 checks passed
@lidge-jun
lidge-jun deleted the feat/oauth-parity-wp3-google-cursor branch October 27, 2026 19:57
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.

1 participant