Repository navigation
feat(sdk): offline SDKs name their read endpoint or say how to get one - #476
Merged
Merged
Conversation
Contributor
[Medium impact] The PR appears safe to merge; no new actionable issue was found. SummaryOffline-generated SDKs now name their account-read endpoint or explain how to get one.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
# Conflicts: # examples/ore-rust/src/generated/ore/sdk-manifest.json
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SDKs generated offline by
a4 sdk createno longer emit a Program Read transport that silently depends onConnectOptions.httpUrl. Account reads either name their endpoint or fail with how to get one.What changed
unavailableread descriptor by default. Its message: install the program from the registry (a4 install program <package>) and usea4 dev, or regenerate witha4 sdk create --read-endpoint <url>for a self-hosted Arete server. Instructions and PDAs still generate offline.a4 sdk create --read-endpoint <url>emits{kind: 'local-http', endpointSource: 'explicit', endpoint: <url>}for each offline program (IDL, ProgramSpec and local StackManifest paths, all three languages). Registry installs are unchanged.arete-sdk, Pythonarete-sdk) accept the two new descriptor shapes and keep accepting the existinglocal-http/connect-http-urldescriptor, so SDKs generated before this still load. Anunavailableread fails at read time with its message (INVALID_CONFIG), not at connect with a missing-httpUrlerror; a program-only SDK with unavailable reads connects without a stack URL. Rust addsProgramReadDescriptor::{LocalHttpEndpoint, Unavailable}andProgramReadTransportKind::Unavailable.a4 install/a4 dev.Tests
httpUrl; unavailable read rejects with the message and makes no request; validation of both shapes.unavailablewith the fix (TS/Rust/Python); TSwith_read_endpointemits the explicit descriptor.vitest(725 passed), Python SDKpytest(1073 passed);scripts/generate-example-sdks.shand the CLI golden tests withA4_UPDATE_GOLDEN=1(24 passed) to regenerate the example SDKs and goldens, whose only change is the offline read transport. CI only: the rest of the Rust build and tests (SDK, interpreter, CLI), all green.unavailablewith the fix text; the Rust example's board read was already best-effort and prints it. The interpreter's managed Solana fixture keeps reading its mock server through a configured program read.