Repository navigation
feat(neon): add read-only Neon integration and a neon remote-sync provider - #6987
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
Greptile code reviewThis repo uses Greptile for automated review. Before merge, aim for Confidence Score: 5/5 with zero unresolved review threads — see CONTRIBUTING.md. Run a review — add a PR comment with: Give it ~5-10 minutes (sometimes longer) for results, then fix feedback and re-trigger until you reach Confidence Score: 5/5. Optional: automate with the greploop skill. |
[High impact] The PR appears safe to merge; the compute-count fix addresses the previous finding. SummaryAdds read-only Neon project and storage tools, plus a Neon Object Storage backend for remote sync.
|
|
hey @rishi-raj-jain thank you for the PR, I think I remember you from Polar.sh :) Glad to see you here 🙌 |
|
🍕 rishi-raj-jain's PR: crispy edges, no unnecessary toppings, delivered on time. Understood the assignment. 🔥 👋 Join us on Discord - OpenSRE : hang out, contribute, or hunt for features and issues. Everyone's welcome. |
Yes, me too! Thank you for the quick merge ❤️ Wish you continued success 🙌🏼 |

Fixes #
NA
Describe the changes you have made in this PR
Adds a read-only Neon integration (Neon API) and a
neonbackend for remote sync on Neon Object Storage, modeled on the existing Vercel and Supabase integrations and thes3compatremote-sync provider.Postgres diagnostics on Neon need no new code. The existing
postgresqlintegration works against a Neon compute (verified: server status, current queries, locks, replication, table stats, slow queries). Two gotchas are documented on the Neon page:-poolerhost rejects the connection because the integration setsstatement_timeoutas a startup option, which Neon's PgBouncer does not accept. I left the shared Postgres integration unchanged. Moving the timeout to aSETafter connect would make pooled hosts work for every PgBouncer-fronted provider, and can be a follow-up if maintainers want it.CREATE EXTENSION pg_stat_statements;, since Neon preloads the library.Demo/Screenshot for feature changes and bug fixes
Run against a real Neon project (
opensre-neon-test, aws-us-east-2):get_neon_storage_bucketsthrough the normal tool executor (execute_toolswith env-resolved integrations):{"source": "neon", "available": true, "branch_id": "br-summer-art-bdbz1xg2", "storage_enabled": true, "s3_endpoint": "https://br-summer-art-bdbz1xg2.storage.c-8.us-east-2.aws.neon.tech", "region": "us-east-2", "total_buckets": 2, "buckets": [{"name": "incident-artifacts", "access_level": "private"}, {"name": "public-assets", "access_level": "public_read"}], "public_buckets": ["public-assets"]}A model call to
list_neon_storage_objectsthat also passesproject_idis refused by the executor (got unexpected args: api_key, project_id), and the API key never appears in any tool output.Remote sync between two separate
OPENSRE_HOMEs through one Neon bucket (files included a name with a space,+and unicode, and a 2 MB binary):Also checked against the real project:
OPENSRE_REMOTE_SYNC_ENDPOINT_URLwins overAWS_ENDPOINT_URL_S3,AWS_ENDPOINT_URLis used as a fallback, regionus-east-1,autoand unset all work, settings saved withopensre remote-sync setup --provider neon(includingendpoint_urlinconfig.yml) work, and a missing bucket reportsNoSuchBucket.Local validation:
.github/ci/run_checks.py --group allpasses 8/8 (lint, format, imports, integration-registry, tool-registry, types, tool-contracts, global-contracts). Focused tests:tests/integrations tests/filestorage tests/config tests/tools/test_registry.py tests/tools/test_telemetry.py tests/cli/test_integrations.pyall pass excepttests/integrations/llm_cli/test_codex_hosted_request_shape.py::test_hosted_codex_posts_only_function_tools, which fails the same way on unmodifiedmainin my environment.Code Understanding and AI Usage
Did you use AI assistance (ChatGPT, Claude, Copilot, etc.) to write any part of this code?
If you used AI assistance:
Explain your implementation approach:
The problem: during a Postgres incident on Neon, the first questions are about the platform, not the SQL. Is the compute idle or disabled, did a restart or branch operation fail, which branch is the app on, and did the expected files land in storage. None of that is visible from a Postgres connection, so the integration reads the Neon API.
I captured real payloads for every endpoint used (project, branches, endpoints, operations, branch storage, buckets, objects) before writing the parsers, and the test fixtures are those payloads plus a failed operation and a second branch to cover the incident paths.
Checklist before requesting a review
Note: Please check Allow edits from maintainers if you would like us to assist in the PR.
Misc
I'm a contractor at Neon.