Repository navigation
Add CI fixture drift check, JSON error mode, SDK usage example, and network-config hint - #662
Open
katefominmoore23 wants to merge 1 commit into
Open
katefominmoore23 wants to merge 1 commit into
katefominmoore23 wants to merge 1 commit into
Conversation
…etwork-config hint Refract-Protocol#585: regenerate-xdr-fixtures.ts always overwrote fixtures with no way for CI to detect drift. Added a --check flag that generates each fixture in memory and compares it against the committed file instead of writing, exiting non-zero and listing every differing path if any fixture would change; default (no flag) behavior is unchanged. Refract-Protocol#584: oracle-ops' existing catch-all error handler already printed a single human-readable "error: <message>" line rather than a raw JSON dump, so that part of the premise didn't hold in this fork. Built the rest of the issue's ask for real: the default line now appends the error's code when present, and a new --json flag (documented in the CLI's usage text) prints a structured {error, code} object instead, for machine callers. Refract-Protocol#583: sdk/submission-client.ts had no usage example, so consumers had to read the source to guess the constructor shape. Added sdk/README.md with a minimal, type-accurate snippet (RefractSubmissionClient construction and a submit() call) built directly from the file's real exported types, and linked it from the root README's Documentation section. Refract-Protocol#582: check-network-config.ts delegated entirely to the shared validateNetworkConsistency, whose intentional library-wide default is to warn and fall back to testnet when STELLAR_NETWORK is unset (confirmed by an existing passing unit test for that function, left untouched). For this pre-deploy script specifically, that default silently masks the "forgot to set it" case the issue is about. Added an explicit check in the script itself: if STELLAR_NETWORK is unset, print an error naming the variable and the accepted values (testnet, futurenet, mainnet) and exit non-zero, before ever calling the shared validator. Closes Refract-Protocol#582 Closes Refract-Protocol#583 Closes Refract-Protocol#584 Closes Refract-Protocol#585
|
@katefominmoore23 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
#585: regenerate-xdr-fixtures.ts always overwrote fixtures with no way for CI to detect drift. Added a --check flag that generates each fixture in memory and compares it against the committed file instead of writing, exiting non-zero and listing every differing path if any fixture would change; default (no flag) behavior is unchanged.
#584: oracle-ops' existing catch-all error handler already printed a single human-readable "error: " line rather than a raw JSON dump, so that part of the premise didn't hold in this fork. Built the rest of the issue's ask for real: the default line now appends the error's code when present, and a new --json flag (documented in the CLI's usage text) prints a structured {error, code} object instead, for machine callers.
#583: sdk/submission-client.ts had no usage example, so consumers had to read the source to guess the constructor shape. Added sdk/README.md with a minimal, type-accurate snippet (RefractSubmissionClient construction and a submit() call) built directly from the file's real exported types, and linked it from the root README's Documentation section.
#582: check-network-config.ts delegated entirely to the shared validateNetworkConsistency, whose intentional library-wide default is to warn and fall back to testnet when STELLAR_NETWORK is unset (confirmed by an existing passing unit test for that function, left untouched). For this pre-deploy script specifically, that default silently masks the "forgot to set it" case the issue is about. Added an explicit check in the script itself: if STELLAR_NETWORK is unset, print an error naming the variable and the accepted values (testnet, futurenet, mainnet) and exit non-zero, before ever calling the shared validator.
Closes #582
Closes #583
Closes #584
Closes #585
Summary
Type of change
Checklist
.envvalues committedNotes for reviewers