Skip to content

feat: make Stellar contract reference check mandatory in CI (#183) - #211

Merged
truthixify merged 5 commits into
wraith-protocol:developfrom
Pythagoras-x:wave-10/183-stellar-reference-mandatory-ci
Oct 21, 2026
Merged

truthixify merged 5 commits into
wraith-protocol:developfrom
Pythagoras-x:wave-10/183-stellar-reference-mandatory-ci

Conversation

@Pythagoras-x

Copy link
Copy Markdown
Contributor

Summary

Closes #183 (Wave 10 carryover from #160).

check:stellar-reference used --allow-missing and was absent from the main
docs workflow, so it silently passed whenever bindings were unavailable.
This PR wires it into CI as a required gate.

Changes

scripts/generate-stellar-reference.ts

  • --allow-missing is now rejected with an actionable error
  • New --require-contracts=slug1,slug2 flag: asserts each listed slug
    produced at least one function after inspect; fails if any are missing
  • loadReferencesOrExit silent-exit branch removed

package.json

  • check:stellar-reference drops --allow-missing

.github/workflows/snippets.yml

  • New check-stellar-reference job (no continue-on-error):
    • Installs pinned Stellar CLI v21.5.0
    • Sets STELLAR_CONTRACT_IDS to the two live testnet addresses from
      contract-registry.json (stealth-announcer, wraith-names)
    • Runs --check --require-contracts=stealth-announcer,wraith-names:
      fails on drift in contracts/stellar.mdx and on a missing section

Done when checklist

  • Bindings/inspect available in CI via STELLAR_CONTRACT_IDS
  • --allow-missing removed from the required check
  • Fails when generated sections drift
  • Fails when a deployed contract is omitted

Follow-up

When stealth-registry and stealth-sender receive testnet addresses, add
them to STELLAR_CONTRACT_IDS and append their slugs to --require-contracts.

…rotocol#183)

- Remove --allow-missing from check:stellar-reference npm script; flag is
  now rejected by the generator so stale callers fail loudly
- Add --require-contracts flag to generate-stellar-reference.ts; asserts
  that every listed slug appears in the generated output after inspect
- Add check-stellar-reference job to snippets.yml (no continue-on-error):
  installs pinned Stellar CLI v21.5.0, supplies live testnet contract IDs
  from the registry (stealth-announcer, wraith-names), and runs
  --check --require-contracts so drift and missing sections both fail
- stealth-registry and stealth-sender omitted from STELLAR_CONTRACT_IDS
  until their addresses land in contract-registry.json
@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@Pythagoras-x 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

…rects

pnpm v12 no longer reads pnpm.overrides or pnpm.auditConfig from
package.json; they were silently ignored, so no overrides were active.

- Move overrides and auditConfig into pnpm-workspace.yaml (pnpm v12 home)
- Fix allowBuilds stubs (esbuild: true, bufferutil/utf-8-validate: false)
- Add follow-redirects >=1.16.1 override (GHSA-q3jh-wrc6-jgq8,
  GHSA-8r9p-f939-6h3c) alongside the existing axios and toml overrides
- Remove now-empty pnpm block from package.json
- Regenerate lockfile: toml@5.0.1, follow-redirects@1.16.1
- Fix Stellar CLI download URL: v28.1.0 (v21.5.0 does not exist),
  filename pattern stellar-cli-28.1.0-x86_64-unknown-linux-gnu.tar.gz
stellar contract inspect --id no longer exists in CLI v28+; the
replacement is stellar contract info interface --contract-id.

- Switch loadFromStellarInspect to call contract info interface with
  --output rust (stdout only, info lines go to stderr)
- Replace parseInspectFunctions/parseInspectList with three new parsers
  that handle the Rust trait output format:
  parseInfoFunctions  — extracts fn signatures from pub trait Contract {}
  parseInfoEvents     — extracts contractevent enum variants
  parseInfoStorageKeys — extracts DataKey/StorageKey enum variants
- Keep old inspect parsers as @deprecated stubs so any external callers
  don't break silently
- Regenerate contracts/stellar.mdx with live testnet data

@truthixify truthixify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The silent allow-missing path is removed, current deployed contracts are required explicitly, and the blocking CI job validates the generated reference from live testnet interfaces with the pinned Stellar CLI. Local docs tests and diff checks passed, and the exact-head live contract-reference check is green.

@truthixify

Copy link
Copy Markdown
Contributor

The reviewed head is approved, but #209 merged first and this branch now conflicts with develop in the shared workflow/pnpm configuration. Please rebase or merge develop, preserve both CI jobs and the consolidated pnpm-workspace.yaml settings, then request re-review for the new head.

The renderReference function was still emitting an HTML comment
<!-- ... --> while contracts/stellar.mdx already had the MDX style
{/* ... */} (from the f6701da merge). This caused the --check mode to
always report the file as stale.

Switch the generated comment to {/* ... */} to match the committed file.

@truthixify truthixify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase verified. The merged Mint validation job and pnpm configuration are preserved, the generator now emits the MDX comment form committed in the document, and the mandatory live Stellar reference gate is green. Full local docs tests, 16 preview-redirect tests, and diff checks passed.

@truthixify
truthixify merged commit 41c1f31 into wraith-protocol:develop Oct 21, 2026
10 checks passed
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.

[Wave 10][Carryover] Make generated Stellar contract references mandatory in CI

2 participants