Skip to content

test: Chained-caller and second-mover test prerequisites - #792

Open
romanzac wants to merge 2 commits into
test/cucumber-sequencer-registrationfrom
test/sequencer-registration-prerequisites
Open

test: Chained-caller and second-mover test prerequisites#792
romanzac wants to merge 2 commits into
test/cucumber-sequencer-registrationfrom
test/sequencer-registration-prerequisites

Conversation

@romanzac

Copy link
Copy Markdown
Contributor

🎯 Purpose

Add chained-caller and second-mover test prerequisites to continue with cucumber sequencer integration tests.

⚙️ Tests added

  • Stake invoked as a chained call is rejected
  • Registration through a second mover program is accepted

🧪 How to Test

CUCUMBER_TAGS=@P-17 cargo test -p integration_tests --features cucumber --test cucumber
CUCUMBER_TAGS=@P-21 cargo test -p integration_tests --features cucumber --test cucumber

🔜 Future Work

To add remaining tests planed for sequencer registration these prerequisites need to be developed first:

  • Finish cucumber sequencer integration tests to cover spec completely.

Related tests will be added in upcoming PRs.

📋 PR Completion Checklist

Mark only completed items. A complete PR should have all boxes ticked.

  • Complete PR description
  • Implement the core functionality
  • Add/update tests
  • Add/update documentation and inline comments

  - stake_chain_caller: a new guest that forwards an instruction into
    another program as a chained call. Validated by P-17 (a Stake chained
    through it is rejected by sequencer_stake's caller-is-none guard); also
    unblocks P-19, U-13, F-10.
  - second native mover: the existing simple_balance_transfer, with the
    funding account claimed under it. Validated by P-21 (Stake accepted
    through a non-authenticated_transfer mover).
@romanzac
romanzac marked this pull request as ready for review August 26, 2026 08:47
@romanzac
romanzac requested a review from davidrusu August 26, 2026 09:00

@hansieodendaal hansieodendaal 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.

Looking good.

Some comments to consider please.

Comment on lines +152 to +166
// Runs Cucumber. Features sourced from a Parser are fed to a Runner, which
// produces events handled by a Writer. `CUCUMBER_TAGS`, when set, restricts
// the run to scenarios carrying one of the listed tags.
let feature_path = get_feature_path()?;
let failed = if let Some(tags) = get_tag_filter() {
info!(target: TARGET, "Restricting run to scenarios tagged: {tags:?}");
runner
.filter_run(feature_path, move |feature, rule, scenario| {
let matches = |candidate: &String| tags.iter().any(|wanted| wanted == candidate);
scenario.tags.iter().any(&matches)
|| feature.tags.iter().any(&matches)
|| rule.is_some_and(|rule| rule.tags.iter().any(&matches))
})
.await
} else {

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.

I don’t think we should add custom tag filtering here. Cucumber already supports filtering scenarios by tags (and names), and the CI work in the dependent PRs uses its built-in --tags support. Keeping that mechanism avoids maintaining a second filtering interface (CUCUMBER_TAGS) and keeps local and CI invocation consistent.

Comment on lines +28 to +31
/// Parses [`CUCUMBER_TAGS`] into the tags to keep (leading `@` stripped);
/// `None` when unset or empty, meaning run every scenario.
#[must_use]
pub fn get_tag_filter() -> Option<Vec<String>> {

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.

Cucumber already provides the filtering capabilities we need here, including tag-based filtering. We should not re-implement it.

Then the stake transaction is not included in a block
And the stake accounts are unchanged

@stake_registration_ci @P-17 @P1 @L3

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.

P-17 should use the explicit non-inclusion confidence window as per #787

| 2 |
| 4 |

@stake_registration_ci @P-21 @P2 @L3

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.

Following the assertion-level design established in #787, this scenario should assert the complete successful-registration state as well. For example, it could also verify that the config entry points at the ownership account and that the ownership account is claimed by sequencer_stake with the expected StakeRecord.

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.

3 participants