Skip to content

ci: add GitHub Actions workflow#4

Draft
calldata wants to merge 1 commit intomainfrom
ci/add-github-actions
Draft

ci: add GitHub Actions workflow#4
calldata wants to merge 1 commit intomainfrom
ci/add-github-actions

Conversation

@calldata
Copy link
Copy Markdown
Collaborator

Summary

  • Add .github/workflows/ci.yml with four parallel jobs: format check, clippy lint, test, and release build
  • Runs on push to main and on PRs targeting main
  • Uses dtolnay/rust-toolchain@stable and Swatinem/rust-cache@v2 for caching

Test plan

  • Verify all four CI jobs pass on this PR
  • Confirm rust-cache is populated on first run

@calldata calldata marked this pull request as draft March 16, 2026 04:57
calldata pushed a commit that referenced this pull request Apr 10, 2026
- SvmBackend trait now uses AccountSharedData instead of Account,
  isolating the conversion to the LiteSVM impl only (ugly #1, #2)
- Add to_pubkey/to_program_pubkey helpers in token_decode.rs,
  replacing 12+ verbose Pubkey::new_from_array(..to_bytes()) sites
  (ugly #3)
- Deduplicate Pipeline constructors with private default_state() helper
  using struct update syntax (ugly #4)
- Fill in missing error context pubkeys in ensure_same_program and
  resolve_lookup_indexes (ugly #5)
- Introduce generic BundleResult<T> with skipped_count()/is_complete()
  so bundle callers can detect truncated execution (ugly #6)
calldata added a commit that referenced this pull request Apr 10, 2026
* refactor(sonar-sim): simplify public API with fluent Pipeline (#27)

Replace ~40+ direct exports with a 11-item stable public API:

- `Pipeline` — fluent API: `.parse()` → `.load_accounts()` → `.with_mutations()` → `.execute()`
- `Mutations` / `MutationsBuilder` — consolidated mutation config
- `SimulationResult` — auto-computed balance changes from pre/post snapshots
- `SolBalanceChange` / `TokenBalanceChange` — balance change types
- `AccountSource` / `FetchObserver` / `FetchEvent` — extension traits
- `SonarSimError` / `Result<T>` — error types

All internal types remain accessible via `sonar_sim::internals::*` for
power users. No file moves — internals module re-exports from existing
pub(crate) modules. Root sonar crate migrated to internals paths.

BREAKING CHANGE: most types moved from top-level to `sonar_sim::internals::*`

* docs(sonar-sim): add README with usage examples

* refactor(sonar-sim): address architecture ugly points from review

- SvmBackend trait now uses AccountSharedData instead of Account,
  isolating the conversion to the LiteSVM impl only (ugly #1, #2)
- Add to_pubkey/to_program_pubkey helpers in token_decode.rs,
  replacing 12+ verbose Pubkey::new_from_array(..to_bytes()) sites
  (ugly #3)
- Deduplicate Pipeline constructors with private default_state() helper
  using struct update syntax (ugly #4)
- Fill in missing error context pubkeys in ensure_same_program and
  resolve_lookup_indexes (ugly #5)
- Introduce generic BundleResult<T> with skipped_count()/is_complete()
  so bundle callers can detect truncated execution (ugly #6)

* refactor(sonar-sim): encapsulate BundleResult fields and log skipped transactions

- Make BundleResult fields private; add new(), executed(), into_executed(),
  total() accessors to prevent construction of invalid states
- Log a warning in handle_bundle when transactions are skipped due to
  prior failure, surfacing the metadata BundleResult was designed to carry

* refactor(sonar-sim): remove redundant traits.rs re-export module

Re-export AccountSource, FetchEvent, FetchObserver directly from types
in lib.rs, eliminating a pointless indirection hop.
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