Skip to content

fix(agents): tighten Antigravity input contract - #1656

Draft
groupthinking wants to merge 2 commits into
mainfrom
codex/antigravity-contract-followup
Draft

fix(agents): tighten Antigravity input contract#1656
groupthinking wants to merge 2 commits into
mainfrom
codex/antigravity-contract-followup

Conversation

@groupthinking

Copy link
Copy Markdown
Owner

Summary

Post-merge contract hardening for the optional Antigravity Agent Factory backend added in #1641.

  • restricts MCP server names to lowercase ASCII letters and digits, the conservative subset compatible with both Google's prose and its conflicting published regex
  • rejects image context because this adapter currently serializes all context into text; native Antigravity image support is not wired here
  • adds regression coverage for hyphen/underscore names and image input

Why

Google's Antigravity documentation says names must be “strictly lowercase and alphanumeric,” but prints ^[a-z0-9_-]+$ beside that sentence. Rejecting punctuation avoids depending on the ambiguous edge until the provider clarifies it.

The provider supports images, but this adapter constructs a string-valued input. Accepting image keys would record a direct-media denial policy while silently converting the image reference to text rather than sending actual image content.

Verification

Repository CI is authoritative. Changes are limited to configuration validation and focused unit cases.

Safety boundary

Draft only. No merge, deployment, live Antigravity invocation, billing action, or production mutation.

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
v0-uvai Canceled Canceled v0 Sep 6, 2026 7:35am UTC

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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 github-actions Bot added the python label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 06e1539.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

None

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant