Skip to content

test: integration coverage for untested extrinsics across 8 pallets#1490

Open
mrq1911 wants to merge 2 commits into
masterfrom
test/stableswap-integration-gaps
Open

test: integration coverage for untested extrinsics across 8 pallets#1490
mrq1911 wants to merge 2 commits into
masterfrom
test/stableswap-integration-gaps

Conversation

@mrq1911

@mrq1911 mrq1911 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Adds full-runtime integration coverage for extrinsics that were exercised only at the pallet level. Gaps were identified from the runtime interaction graph's prioritized_test_gaps pack (entrypoints with no static integration-test link) and each was confirmed to have zero references in integration-tests/src/ before writing.

84 new tests across 8 new modules:

  • stableswap_extra (8) — buy, remove_liquidity, withdraw_asset_amount, update_amplification, update_asset_peg_source, update_pool_max_peg_update
  • xyk_extra (5) — add_liquidity_with_limits, remove_liquidity_with_limits (slippage guards) + a create_pool orphan-state regression (asserts the executive's storage layer rolls back a partial create)
  • omnipool_extra (7) — remove_liquidity_with_limit, refund_refused_asset (all four error branches)
  • hsm_admin_extra (4) — update_collateral_asset, remove_collateral_asset (snapshot-fork based)
  • liquidity_mining_extra (15) — omnipool + xyk yield-farm lifecycle: stop/resume/update/terminate_yield_farm, terminate_global_farm, update_global_farm
  • signet (19) — full pallet: set_config, pause/unpause, sign, sign_bidirectional, withdraw_funds, respond/respond_error/respond_bidirectional
  • amm_misc_extra (8) — bonds::redeem, lbp::add_liquidity/remove_liquidity, currencies::transfer_native_currency
  • admin_misc_extra (18) — dispatcher::dispatch_as_treasury, multi-payment::reset_payment_currency, gigahdx::set_pool_contract, dispenser (set_config/pause/unpause/request_fund guards)

Notes / residual gaps (deliberately not faked):

  • signet::respond* only echo the caller's input as events — no on-chain signature validation, no authority gate, no pause check. Tests assert what exists; the missing gating is a finding worth a follow-up.
  • dispenser::request_fund happy path needs a signet MPC signing flow (keccak-derived request id) — impractical in integration; covered by its NotConfigured/Paused guard rejections instead.
  • Adds pallet-signet and pallet-dispenser as integration-tests dev-dependencies.

Verified locally: full crate compiles under RUSTFLAGS=-D warnings, cargo fmt --check clean, and all 84 new tests pass. runtime-integration-tests bumped to 1.104.2.

Copilot AI review requested due to automatic review settings July 16, 2026 20:19

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Crate versions that have been updated:

  • runtime-integration-tests: v1.104.0 -> v1.104.2

Runtime version has not been increased.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds new runtime-level integration tests for previously pallet-only-covered stableswap extrinsics, closing identified gaps in the integration suite and bumping the integration test crate version accordingly.

Changes:

  • Add a new stableswap_extra integration test module covering buy, proportional remove_liquidity, withdraw_asset_amount, and authority-gated peg/amp admin extrinsics.
  • Wire the new module into the integration test crate (lib.rs).
  • Bump runtime-integration-tests from 1.104.0 to 1.104.1 (and update Cargo.lock).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
integration-tests/src/stableswap_extra.rs Adds 8 new runtime integration tests for stableswap trading, liquidity withdrawal, and admin peg/amp updates.
integration-tests/src/lib.rs Registers the new stableswap_extra module in the integration test crate.
integration-tests/Cargo.toml Bumps runtime-integration-tests crate version to 1.104.1.
Cargo.lock Updates lockfile entry for the runtime-integration-tests version bump.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mrq1911 mrq1911 changed the title test(stableswap): cover buy, remove/withdraw liquidity, and peg/amp admin extrinsics test: integration coverage for untested extrinsics across 8 pallets Jul 16, 2026
@github-actions

Copy link
Copy Markdown

Quick benchmark at commit e29e418 has been executed successfully.
View results

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.

2 participants