Skip to content

Test Antigravity preview as an optional Agent Factory backend - #1796

Draft
groupthinking with Copilot wants to merge 2 commits into
mainfrom
copilot/test-google-antigravity-backend
Draft

Test Antigravity preview as an optional Agent Factory backend#1796
groupthinking with Copilot wants to merge 2 commits into
mainfrom
copilot/test-google-antigravity-backend

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Canonical issue

Tracked by the linked canonical issue.

Outcome

This PR tightens the existing Antigravity spike into the contract described in the issue: one bounded build/test interaction through antigravity-preview-05-2026, one read-only EventRelay MCP server, synchronous side-effect gates, and a durable receipt/comparison artifact. The default provider path remains unchanged; this only hardens the optional preview backend.

Scope

  • Included:
    • Payload contract
      • Adds code_execution to the managed-agent request.
      • Prefixes the prompt as a bounded build/test task and keeps Video Pack data as normalized text context only.
      • Mounts inline .agents/hooks.json plus a synchronous policy_gate.py script in the remote environment.
    • Safety contract
      • Requires exactly one MCP server, named eventrelay.
      • Tightens MCP server naming to lowercase alphanumeric only.
      • Enforces HTTPS Streamable HTTP plus explicit read-only tool allowlisting.
      • Records hook acknowledgement and synchronous guard policy in the receipt.
    • Comparison artifact
      • Expands the provider-neutral comparison output to cover completion, latency, cost, artifact determinism, provenance, recovery, and provider-independent control-plane ownership.
    • Contract tests
      • Extends mocked unit coverage for payload shape, hook wiring, MCP validation, receipt policy, and comparison output.
    • Example
      payload = backend.build_payload("Run pytest", {"video_pack_id": "pack-1"})
      assert payload["tools"][0] == {"type": "code_execution"}
      assert payload["tools"][1]["name"] == "eventrelay"
      assert payload["environment"]["sources"][0]["target"] == ".agents/hooks.json"
  • Explicitly excluded:
    • Live preview execution or billing-incurring runs
    • Any default-provider switch or production rollout
    • Direct video ingestion into Antigravity
    • Additional MCP servers or write-capable tool access

Risk

  • Risk level: low
  • Failure mode:
    • The optional preview backend could reject misconfigured MCP names/servers or deny undeclared code/filesystem actions more aggressively than before.
    • Comparison consumers may need to handle the richer artifact shape.
  • Rollback:
    • Revert this backend/test delta or keep the backend disabled via its existing feature flag and live-execution gates.

Verification

List exact automated and manual checks, tied to the current head SHA.

  • Focused tests
    4c0106c6a3a8f31d981ed966d85bf7a3ae6495c3
    python -m pytest --no-cov tests/unit/test_antigravity_backend.py tests/unit/test_antigravity_orchestration.py -q
    python -m ruff check src/youtube_extension/services/agents/antigravity_backend.py tests/unit/test_antigravity_backend.py
  • Required CI
  • Review threads resolved

Production evidence

Not applicable. This PR does not deploy or change the default execution provider, and no live Antigravity preview run was performed.

Agent handoff

  • One canonical issue is linked
  • No competing PR implements the same issue
  • Acceptance criteria are satisfied
  • Required checks pass on the current head
  • Human decision is requested only for product, security, irreversible infrastructure, or production approval

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
v0-uvai Ready Ready Preview, v0 Sep 8, 2026 11:23pm UTC

Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Copilot AI changed the title [WIP] Test Google Antigravity as optional Agent Factory execution backend Test Antigravity preview as an optional Agent Factory backend Sep 8, 2026
Copilot AI requested a review from groupthinking September 8, 2026 23:25
"decision": "deny",
"reason": "Filesystem side effects must be declared in EventRelay receipts first."
}))
elif name == "code_execution" and not command.startswith(allowed_prefixes):

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.

Policy gate authorizes code_execution via command.startswith(allowed_prefixes), so any shell command beginning with an allowed prefix (e.g. pytest && curl ... | sh) bypasses the guard and runs arbitrary undeclared side effects.

Fix on Vercel

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.

Test Google Antigravity as optional Agent Factory execution backend

2 participants