Skip to content

fix: get CI green after the SphereNet rebrand - #10

Closed
samuelvanderwaal wants to merge 8 commits into
mainfrom
fix/ci-rebrand-fallout
Closed

samuelvanderwaal wants to merge 8 commits into
mainfrom
fix/ci-rebrand-fallout

Conversation

@samuelvanderwaal

@samuelvanderwaal samuelvanderwaal commented Oct 22, 2026 •

Copy link
Copy Markdown

Summary

These fix every CI job that broke when the crates were renamed for SphereNet, so main CI should pass in full.

  • Test JS: scripts/restart-test-validator.sh now loads target/deploy/spherenet_stake_program.so, which is what the renamed program crate builds.
  • Build WASM (interface, program): both crates add a getrandom dependency for wasm32-unknown-unknown only. Version 0.2 gets the js feature. The interface also gets 0.3 with wasm_js, plus the matching --cfg in make build-wasm-%, because its frozen-abi feature now pulls that version in.
  • Generate IDL: interface/idl.json is regenerated (spherenetStakeInterface 0.2.2). The client generator maps the new program name to stake, so the generated JS and Rust clients come out unchanged.
  • Spellcheck: validator, whitelist and PDA are added to scripts/solana.dic.
  • Format & Lint Rust: rustfmt is applied to the SphereNet additions.
  • Audit: the test-only dependencies move to agave 3.1 (mollusk-svm 0.12, solana-program-test 3.1.12, agave-feature-set 3.1), and Cargo.lock gets targeted updates, including imbl 7.0.2.
    • ProgramTest 3.1 writes its bundled core BPF stake program to the stake program ID after genesis. That replaced the SphereNet build the tests added with add_upgradeable_program_to_genesis. program_test() now registers the build with add_account, which is applied after that step, so the tests exercise the SphereNet program.
    • agave 3.1 needs rustc 1.89, so the fmt/lint/test nightly moves to nightly-2025-09-18. This brings small lint and deprecation fixes in the tests and in interface/src/helpers/genesis.rs, with no behavior change.
  • Build Programs: the program builds with Solana CLI 3.1.14, which ships platform-tools v1.52 (rustc 1.89); it was on 3.0.0, which ships v1.51. The lockfile is shared, so the agave 3.1 test stack also moves the program's own dependencies forward (for example solana-address 1.0 → 2.9, solana-instruction 3.0 → 4.0, solana-define-syscall 4 → 5.3). This changes the program binary, so review this PR as a program change, not just a CI fix.

Test plan

  • make audit (exit 0)
  • make build-sbf-program with cargo-build-sbf 3.1.x (platform-tools v1.52), make test-program (357 pass), make test-interface, make test-clients-rust
  • make build-wasm-interface, make build-wasm-program
  • make clippy-{program,interface,clients-rust}, make format-check-{program,interface,clients-rust}
  • make build-doc-*, make test-doc-*
  • make generate-idl-interface plus pnpm generate:clients: clean tree
  • make spellcheck
  • make test-js-clients-js, make lint-js-clients-js, make format-check-js-clients-js
  • cargo metadata --locked

🤖 Generated with Claude Code

samuelvanderwaal and others added 5 commits October 22, 2026 15:08
The crate rename to spherenet-stake-program changed the SBF output to
target/deploy/spherenet_stake_program.so, but the validator script still
pointed at solana_stake_program.so, so the JS tests could not start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
spherenet-validator-whitelist-interface (via solana-program) and
solana-keypair pull getrandom 0.2 into the interface and program crates.
On wasm32-unknown-unknown it needs the `js` feature, so the WASM builds
failed. Add a target-specific getrandom dependency with `js` enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The committed IDL still carried the upstream program name and version
(solanaStakeInterface 2.0.2). Regenerate it (spherenetStakeInterface
0.2.2) and map the new name to `stake` in the client generator, so the
generated JS and Rust clients are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cargo-spellcheck flagged "validator", "whitelist" and "PDA" in the doc
comments of program/src/instruction_builders.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run `make format-rust` (nightly-2025-02-16, as in CI) over the code added
for the SphereNet mod so the Format & Lint jobs pass. No functional
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@samuelvanderwaal samuelvanderwaal changed the title fix: CI after the SphereNet rebrand (JS tests, WASM, IDL) fix: CI after the SphereNet rebrand (JS tests, WASM, IDL, fmt, spellcheck) Oct 22, 2026
samuelvanderwaal and others added 2 commits October 22, 2026 15:37
The remaining cargo-audit advisories (rustls 0.21, rustls-webpki 0.101,
webpki-roots 0.24/0.25 via tungstenite 0.20, plus quinn-proto, tar, time,
crossbeam-epoch and rustls 0.23) all came from the agave 3.0 test stack.

- program dev-deps: mollusk-svm 0.7 -> 0.12, solana-program-test 3.0 ->
  3.1.12 (with `agave-unstable-api`), agave-feature-set 3.0 -> 3.1, and
  solana-program-binaries for the loader-v3 account helper.
- Cargo.lock: targeted updates for the advisory crates, and imbl 7.0.2
  (pulls the patched imbl-sized-chunks 0.2).
- program_test: ProgramTest 3.1 stores its bundled core BPF stake program
  at the stake program ID after genesis, which replaced our build when it
  was added with add_upgradeable_program_to_genesis. Register the build
  with add_account instead, which is applied after that step.
- agave 3.1 needs rustc 1.89, so the fmt/lint/test nightly moves from
  nightly-2025-02-16 to nightly-2025-09-18.
- WASM: solana-frozen-abi (interface `frozen-abi` feature) now pulls in
  getrandom 0.3; enable its wasm_js backend and set the matching cfg in
  `make build-wasm-%`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- WritableAccount::create is deprecated in solana-account 3.3: build
  Account values directly in the tests.
- Rent::lamports_per_byte_year is deprecated in solana-rent 3.1 with no
  3.x replacement accessor: allow it where it is read or set.
- Use u64::abs_diff (clippy::manual_abs_diff) and std::slice::from_ref
  (clippy::cloned_ref_to_slice_refs).

No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@samuelvanderwaal samuelvanderwaal changed the title fix: CI after the SphereNet rebrand (JS tests, WASM, IDL, fmt, spellcheck) fix: get CI green after the SphereNet rebrand Oct 22, 2026
The agave 3.1 test dependencies share the lockfile with the program and
move its on-chain dependencies forward (e.g. solana-address 2.9,
solana-instruction 4.0), which need rustc 1.89. The Solana 3.0.0
platform-tools (v1.51) can't parse those manifests, so Build Programs
failed. Solana 3.1.14 ships platform-tools v1.52 (rustc 1.89) and matches
the agave 3.1 test stack.

Verified locally with cargo-build-sbf 3.1.x (platform-tools v1.52):
make build-sbf-program, make test-program (357 pass), make
test-js-clients-js.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@samuelvanderwaal
samuelvanderwaal marked this pull request as ready for review October 23, 2026 00:00
@samuelvanderwaal

Copy link
Copy Markdown
Author

Closing: this repo is retired and will be archived. Changes for spherenet-stake will follow the program@v5.1.0 rebase.

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.

1 participant