Skip to content

Add CI fixture drift check, JSON error mode, SDK usage example, and network-config hint - #662

Open
katefominmoore23 wants to merge 1 commit into
Refract-Protocol:mainfrom
katefominmoore23:fix/issues-582-583-584-585
Open

katefominmoore23 wants to merge 1 commit into
Refract-Protocol:mainfrom
katefominmoore23:fix/issues-582-583-584-585

Conversation

@katefominmoore23

Copy link
Copy Markdown

#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

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Docs
  • Tests / CI

Checklist

  • I read CONTRIBUTING.md
  • Tests added/updated for the change
  • Local gate passes (lint / typecheck or fmt + clippy + test / build)
  • No secrets, keys, or .env values committed
  • Behavioural changes are documented in the README where relevant

Notes for reviewers

…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
@drips-wave

drips-wave Bot commented Nov 24, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant