test: Chained-caller and second-mover test prerequisites - #792
Conversation
- 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).
hansieodendaal
left a comment
There was a problem hiding this comment.
Looking good.
Some comments to consider please.
| // 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 { |
There was a problem hiding this comment.
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.
| /// 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>> { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
P-17 should use the explicit non-inclusion confidence window as per #787
| | 2 | | ||
| | 4 | | ||
|
|
||
| @stake_registration_ci @P-21 @P2 @L3 |
There was a problem hiding this comment.
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.
🎯 Purpose
Add chained-caller and second-mover test prerequisites to continue with cucumber sequencer integration tests.
⚙️ Tests added
🧪 How to Test
🔜 Future Work
To add remaining tests planed for sequencer registration these prerequisites need to be developed first:
Related tests will be added in upcoming PRs.
📋 PR Completion Checklist
Mark only completed items. A complete PR should have all boxes ticked.