Skip to content

feat(graph): complete live Subgraph MCP recovery proof and qualify The Graph - #48

Merged
kapustazh merged 3 commits into
developfrom
feat/graph-sponsor-qualification
Sep 9, 2026
Merged

kapustazh merged 3 commits into
developfrom
feat/graph-sponsor-qualification

Conversation

@kapustazh

@kapustazh kapustazh commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Proves live end-to-end recovery for The Graph sponsor qualification using Subgraph Studio (https://api.studio.thegraph.com/query/1758917/oneshot-arc-testnet/v0.2.1), Subgraph MCP (execute_query_by_deployment_id), and Google Cloud Vertex AI Gemini 2.5 Flash, validates against Arc RPC with zero duplicate broadcasts (settlementPermission: NEVER), records sanitized evidence in evidence/c06/graph-proof.json, qualifies The Graph (QUALIFIED) in the AI Tooling track, and closes Gate P4 (PASS).

Key improvements in this update:

  1. Deployed Subgraph v0.2.1 to Subgraph Studio with native SettlementCandidate schema and event mapping capturing real block hashes (0xc2e1...), matching RECOVERY_CANDIDATE_QUERY.
  2. Simplified subgraph-mcp-client.ts to pass toolArgs.query directly to Subgraph Studio without synthetic schema transformations.
  3. Successfully executed live Vertex AI Gemini 2.5 Flash recovery advisor in GCP project oneshot-508002, returning accepted structured recommendation RECONCILE with unique decision ID and candidate references.
  4. Evaluated deterministic safety core in two phases: Phase A (READ_ONLY_LOOKUP, settlementPermission: NEVER) and Phase B (MARK_COMMITTED, targetState: COMMITTED, disposition: CONFIRMED_ON_CHAIN, authoritativeProofPresent: true, settlementPermission: NEVER).
  5. Fully synchronized documentation across QUALIFICATION_REPORT.md, LIVE_EVIDENCE.md, GATE_P4_MANIFEST.md, GATE_P4_CHECKLIST.md, plan.md, and plan_missing_parts.md.

Scope and acceptance criteria

  • The change is limited to the stated milestone or issue.
  • Acceptance criteria are listed and satisfied.
  • No unrelated cleanup is included.

Product and security invariants

  • Tenant isolation remains fail-closed.
  • Sponsor authorization, auditability, and daily caps remain enforced where applicable.
  • Recipients cannot modify sponsor controls or access sponsor-only data.
  • No secret, token, production identifier, or personal data is committed or pasted into review prompts.
  • Any non-applicable invariant is explained below.

Invariant notes:

  • Settlement permission remains NEVER across all advisory and Subgraph MCP recovery operations (0 duplicate payments permitted).
  • Authoritative Arc RPC receipts remain the sole final authority for committing settlements.

Validation

Commands and results:

pnpm test - PASS (57 files, 901 tests)
pnpm lint - PASS (0 errors)
pnpm typecheck - PASS (0 errors)
pnpm format:check - PASS
pnpm check:generated - PASS
pnpm validate:fixtures - PASS
node scratch/run-live-graph-proof-v3.mjs - PASS (Arc receipt + Subgraph Studio v0.2.1 + Vertex AI Gemini + Safety Core)

Independent review evidence

Candidate tree

  • Base commit SHA: d40af37ef1130232fb651cf83087795e5c26b3fb
  • Remote head commit SHA: 49306b4263905ee06d4f7c253eca732e3563280b
  • Remote head tree SHA: 620f7b1d0b6bebb881fc5be49dbca3b913f01442
  • Automated FreePi reviewer: Skipped per explicit user direction ("skip review"). Full test suite (901/901) and strict static analysis passed locally.

Risk and rollback

  • Residual risks: Subgraph Studio query path is opt-in via graphQueryUrl; default worker runtime remains fail-closed.
  • Rollback or recovery plan: Revert commit a92e9ef4eebc953531b4fc6fd5ce82d56128fa6b.

Human merge

  • A human owner has reviewed the evidence and will perform the merge.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
oneshot 49306b4 Sep 09 2026, 01:25 AM

…vertex ai advisor

Native SettlementCandidate schema in v0.2.1, direct query pass-through, live Vertex AI Gemini 2.5 Flash recovery proof, and aligned qualification docs.
@kapustazh
kapustazh marked this pull request as ready for review September 9, 2026 01:26
@kapustazh
kapustazh merged commit 7cb629c into develop Sep 9, 2026
4 checks passed
@kapustazh

Copy link
Copy Markdown
Collaborator Author

nicenicenicenicenicenicenicenicenicenicenicenicenicenicenicenicenicenice

@kapustazh
kapustazh deleted the feat/graph-sponsor-qualification branch September 9, 2026 01:29
@SuPuHe SuPuHe mentioned this pull request Sep 9, 2026
3 of 4 tasks
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