Skip to content

test: fix several cucumbers - #1563

Merged
sdbondi merged 1 commit into
tari-project:developmentfrom
sdbondi:cucumber-fixes
Sep 2, 2025
Merged

test: fix several cucumbers#1563
sdbondi merged 1 commit into
tari-project:developmentfrom
sdbondi:cucumber-fixes

Conversation

@sdbondi

@sdbondi sdbondi commented Sep 2, 2025

Copy link
Copy Markdown
Member

Description

test: fix several cucumbers

Motivation and Context

Fixed around 5 more cucumber scenarios

Summary by CodeRabbit

  • New Features

    • Simplified stealth transfers in the wallet daemon client via a single request, reducing manual steps.
  • Bug Fixes

    • Improved stability by converting a potential crash on non-UTF8 paths into a proper error.
  • Tests

    • Streamlined integration scenarios with a unified network baseline.
    • Reduced test concurrency for stability; simplified token, NFT, counter, epoch-change, and substate flows.
  • Chores

    • Updated and reorganized dependencies, including new networking and transaction components.
    • Adjusted default feature flags to align with workspace defaults.

@coderabbitai

coderabbitai Bot commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This PR reorganizes workspace dependencies, adds new Tari git dependencies, updates .gitignore, changes error handling in a wallet daemon process, modifies test concurrency and multiple feature scenarios, and refactors confidential transfer tests to use a new stealth transfer API with updated function signatures and call sites.

Changes

Cohort / File(s) Summary of edits
Repo housekeeping
/.gitignore
Added root ignore for cucumber-output-junit.xml; removed the same entry from the moon section.
Workspace dependencies
/Cargo.toml
Reorganized workspace crates; introduced a “networking crates” section; added git deps tari_sidechain, tari_transaction_components, tari_transaction_key_manager; reordered several Tari deps.
Client crate features
/clients/base_node_client/Cargo.toml
Enabled default features for tari_transaction_components and tari_node_components by removing default-features = false.
Wallet daemon process error handling
/applications/tari_swarm_daemon/src/process_definitions/wallet_daemon_create_key.rs
Replaced expect with anyhow::Context and ? to propagate non-UTF8 path errors.
Integration test helper API change
/integration_tests/src/wallet_daemon_cli.rs, /integration_tests/tests/steps/wallet_daemon.rs
Switched confidential transfer flow to accounts_stealth_transfer using StealthTransferRequest; removed epoch params; changed return type; updated call sites accordingly.
Integration test runner
/integration_tests/tests/cucumber.rs
Reduced max concurrent scenarios from 5→2; replaced unwrap() with ? for result decoding.
Feature scenarios simplified
/integration_tests/tests/features/*
Simplified setup to a single network precondition; updated flows for concurrency, counter, epoch change, fungible, NFT, substates, and wallet daemon features; adjusted amounts, entity names, and removed mining-heavy bootstraps.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Tester
  participant CLI as wallet_daemon_cli
  participant WDC as Wallet Daemon Client
  participant WD as Wallet Daemon
  participant VN as Validator Node

  Tester->>CLI: transfer_confidential(src, dest, amount, wallet, outputs)
  CLI->>WDC: accounts_stealth_transfer(StealthTransferRequest{ XTR, ConfidentialOnly, ... })
  WDC->>WD: POST /accounts/stealth_transfer
  WD->>VN: Submit transaction
  VN-->>WD: Wait response (accepted/rejected)
  WD-->>WDC: Wait result
  WDC-->>CLI: Result
  CLI-->>Tester: Update substate ids or fail with reason
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested labels

CR-too_long, P-acks_required, P-reviews_required

Poem

Hoppity hop, I tweak and I test,
Git deps aligned, the features compressed.
Stealth coins whisk by in a single bound,
Cukes sprout green, with fewer steps around.
I nose-twitch at errors—propagate, don’t sigh—
Then thump: all green! 🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
Cargo.toml (1)

62-63: Remove duplicate workspace member entry
Remove one of the two identical "utilities/transaction_submitter" lines to avoid tooling noise.

@@ Cargo.toml:62-63
-    "utilities/transaction_submitter",
integration_tests/tests/features/concurrency.feature (1)

28-28: Assertion likely failing with current engine behavior

Expecting "30" after concurrent calls contradicts the comment that only the first tx executes; this will fail the pipeline. Either (a) downgrade the expectation temporarily or (b) tag the scenario to skip until the lock bug is fixed.

Two options:

  • Temporary expectation change:
-    When I invoke on wallet daemon WALLET_D on account ACC on component COUNTER/components/Counter the method call "value" the result is "30"
+    When I invoke on wallet daemon WALLET_D on account ACC on component COUNTER/components/Counter the method call "value" the result is "1"
  • Or ignore this scenario until the engine fix:
# add this at the scenario line
@ignore

Note: The runner filters "@ignore" before execution, so fail_on_skipped won’t trip.

🧹 Nitpick comments (20)
.gitignore (2)

3-3: Anchor this ignore to repo root unless you intend a global match

cucumber-output-junit.xml without a leading slash ignores this filename anywhere in the tree, which makes Line 61 redundant and may hide files in subprojects unintentionally. If you only want the root artifact ignored, anchor it.

Apply:

-cucumber-output-junit.xml
+/cucumber-output-junit.xml

64-65: Nit: make directory intent explicit for moon cache/docker

Add trailing slashes to clarify these are directories (functionally similar, but clearer).

-.moon/cache
-.moon/docker
+.moon/cache/
+.moon/docker/
applications/tari_swarm_daemon/src/process_definitions/wallet_daemon_create_key.rs (1)

27-44: Avoid UTF-8 conversion; pass the path as OsStr directly

Command::arg accepts AsRef<OsStr>, so you can remove .to_str() and the extra error handling entirely.

-        command
-            .envs(context.environment())
-            .arg("-b")
-            .arg(context.base_path())
-            .arg("--network")
-            .arg(context.network().to_string())
-            .args([
-                "create-account",
-                "--name",
-                "Fees",
-                "--key",
-                "0",
-                "--set-active",
-                "--output",
-                output_path
-                    .to_str()
-                    .context("Non-UTF8 output path in WalletDaemonCreateAccount")?,
-            ]);
+        command
+            .envs(context.environment())
+            .arg("-b")
+            .arg(context.base_path())
+            .arg("--network")
+            .arg(context.network().to_string())
+            .arg("create-account")
+            .arg("--name")
+            .arg("Fees")
+            .arg("--key")
+            .arg("0")
+            .arg("--set-active")
+            .arg("--output")
+            .arg(&output_path);
integration_tests/tests/features/substates.feature (1)

25-27: Fix typos in comments

Minor nits.

-    # We should get an error if we se as inputs the same component version thas has already been downed from previous transactions
+    # We should get an error if we see as inputs the same component version that's already been downed by previous transactions
integration_tests/tests/features/counter.feature (1)

9-9: DRY the repeated precondition with a Background

Optional, but keeps scenarios lean.

Gherkin snippet:

Background:
  Given a network with registered validator VN and wallet daemon WALLET_D

Then drop the duplicated Given in each scenario.

Also applies to: 29-29

integration_tests/tests/features/fungible.feature (2)

21-25: Add explicit assertions for TX1 effects

The manifest performs actions but the scenario doesn’t assert outcomes at this step. Consider adding a Then/And that verifies ACC1’s balance increased as expected.

Does the harness validate balance(...) return values automatically, or should we add explicit “the result is …” checks?


35-47: Stabilize resource addressing and assert final balances

  • Referencing FAUCET/resources/0 can be brittle if resource indices change; prefer a named/resource handle if available from the faucet component or event output.
  • Consider asserting post-TX2 balances (ACC2: 50, ACC1: 9950) to ensure the transfer is actually verified.

Example (conceptual):

Then wallet daemon WALLET_D reports ACC2 balance of the faucet resource is "50"
And wallet daemon WALLET_D reports ACC1 balance of the faucet resource is "9950"
Cargo.toml (1)

130-141: Pin Tari git dependencies in Cargo.toml to the resolved commit
Cargo.lock already records all three new Tari git deps—tari_sidechain, tari_transaction_components, and tari_transaction_key_manager—at commit 213a0c510457be9eae5a140f2a72fb0dc4d13764. To prevent branch‐head drift when running cargo update, replace in Cargo.toml:

-tari_sidechain = { git = "https://github.com/tari-project/tari.git", branch = "development" }
+tari_sidechain = { git = "https://github.com/tari-project/tari.git", rev    = "213a0c510457be9eae5a140f2a72fb0dc4d13764" }

(and do likewise for tari_transaction_components and tari_transaction_key_manager; you can also consolidate these into a shared [patch] block).

integration_tests/src/wallet_daemon_cli.rs (4)

171-193: Stealth transfer happy-path is good; consider more tolerant input selection.

ConfidentialOnly can flake if the source has insufficient confidential inputs. Consider PreferConfidential (keeps confidential when possible, falls back when needed).

Apply:

-            input_selection: ConfidentialTransferInputSelection::ConfidentialOnly,
+            input_selection: ConfidentialTransferInputSelection::PreferConfidential,

If you expect strictly confidential spends here, ignore; otherwise this reduces intermittent insufficiency errors.


239-247: Also surface explicit fee rejections for parity with other helpers.

Other functions check fee_reject(). Add it here for clearer failures.

Apply:

-    if let Some(reason) = wait_resp
+    if let Some(reason) = wait_resp
         .result
         .as_ref()
         .expect("Transaction has timed out")
         .result
         .any_reject()
     {
         panic!("Transaction failed: {}", reason);
     }
+    if let Some(reason) = wait_resp
+        .result
+        .as_ref()
+        .and_then(|r| r.fee_reject().cloned())
+    {
+        panic!("Transaction fee rejected: {}", reason);
+    }

195-233: Remove legacy commented block.

The old manual-proofs path is now obsolete; keeping ~40 lines commented adds noise.

If you want to preserve it, move to docs or a gist and add a short comment with a link.


156-158: De-duplicate hard-coded 120s timeout.

Define a single constant to keep timeouts consistent and easy to tweak.

Apply (top of file):

+const TX_WAIT_TIMEOUT_SECS: u64 = 120;

Then:

-        timeout_secs: Some(120),
+        timeout_secs: Some(TX_WAIT_TIMEOUT_SECS),

Also applies to: 236-237, 361-363, 495-497, 579-582

integration_tests/tests/features/nft.feature (1)

9-9: Ensure network precondition is isolation-safe under concurrent scenarios.

  • Verify that Given a network with registered validator VN and wallet daemon WALLET_D spins up fresh VN and WALLET_D instances per scenario (avoiding cross-test state bleed under @Concurrent).
  • (Optional) Move this step into a Background: block to DRY it across scenarios.
integration_tests/tests/features/concurrency.feature (2)

7-8: Tag mismatch: feature won't run as a “concurrent” scenario

Runner detects the tag "concurrent", but this feature uses "@concurrency" (Line 4). Either retag the feature to "@Concurrent" or update the selector in cucumber.rs to look for "concurrency". Otherwise this scenario will be scheduled serially.


24-24: High flake risk: write-lock conflicts under concurrent increases

Given the known lock bug, blasting 30 concurrent "increase" calls will intermittently reject transactions, making the scenario nondeterministic. Consider reducing the concurrency or splitting into two scenarios (accept path vs. expected rejection path) until the engine fix lands.

Apply a temporary reduction to stabilize CI:

-    When I invoke on wallet daemon WALLET_D on account ACC on component COUNTER/components/Counter the method call "increase" concurrently 30 times
+    When I invoke on wallet daemon WALLET_D on account ACC on component COUNTER/components/Counter the method call "increase" concurrently 1 times
integration_tests/tests/features/wallet_daemon.feature (2)

51-53: Commented-out assertions leave the scenario without verification

The TODO notes the check isn’t resource-specific. Prefer re-enabling assertions against the faucet resource to validate the transfer.

Proposed step wording for precision (to implement in steps/CLI):

  • When I check the balance of ACCOUNT_X for resource "FAUCET/resources/0" on wallet daemon WALLET_D the amount is exactly N

65-66: Time-based mining/mempool waits can still flake

“1 tx in mempool within 10s” + “mine 13 blocks” may be brittle across CI loads. Consider polling height/mempool until condition holds with an upper bound, then proceed (or compute required blocks dynamically from current tip).

integration_tests/tests/cucumber.rs (1)

65-65: Reduce parallelism to 2: stability > throughput

Good call; this should lower contention and flakiness. Consider making it configurable via an env var (default 2) for local runs/CI.

integration_tests/tests/features/epoch_change.feature (2)

18-18: Remove commented-out legacy step

Dead/commented step adds noise and can confuse future edits.

Apply:

-#    When I call function "mint" on template "faucet" on VN with args "amount_10000" named "FAUCET"

22-24: Verify height/epoch assumptions for flakiness
Mining 15 blocks after “height ≥ 6” may not deterministically reach scanned height 40 or epoch 4 without knowing the pre-mined height and the configured epoch length. Confirm that these thresholds align with your epoch length and any seeded blocks or else derive expectations dynamically:

  • Record initial height H₀, mine N blocks, then assert scanned height ≥ H₀ + N + k.
  • Compute the expected epoch from the epoch-length constant and assert epoch ≥ target rather than exact.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bee07d3 and 09b656e.

📒 Files selected for processing (14)
  • .gitignore (2 hunks)
  • Cargo.toml (1 hunks)
  • applications/tari_swarm_daemon/src/process_definitions/wallet_daemon_create_key.rs (2 hunks)
  • clients/base_node_client/Cargo.toml (1 hunks)
  • integration_tests/src/wallet_daemon_cli.rs (6 hunks)
  • integration_tests/tests/cucumber.rs (2 hunks)
  • integration_tests/tests/features/concurrency.feature (1 hunks)
  • integration_tests/tests/features/counter.feature (2 hunks)
  • integration_tests/tests/features/epoch_change.feature (2 hunks)
  • integration_tests/tests/features/fungible.feature (1 hunks)
  • integration_tests/tests/features/nft.feature (2 hunks)
  • integration_tests/tests/features/substates.feature (1 hunks)
  • integration_tests/tests/features/wallet_daemon.feature (3 hunks)
  • integration_tests/tests/steps/wallet_daemon.rs (0 hunks)
💤 Files with no reviewable changes (1)
  • integration_tests/tests/steps/wallet_daemon.rs
🧰 Additional context used
🧬 Code graph analysis (2)
integration_tests/tests/cucumber.rs (3)
crates/engine/tests/test.rs (2)
  • result (862-863)
  • result (868-869)
crates/template_test_tooling/src/template_test.rs (2)
  • result (431-436)
  • result (464-469)
utilities/tariswap_test_bench/src/tariswap.rs (8)
  • result (266-266)
  • result (267-267)
  • result (268-268)
  • result (269-269)
  • result (327-327)
  • result (328-328)
  • result (329-329)
  • result (330-330)
integration_tests/src/wallet_daemon_cli.rs (6)
bindings/src/helpers/consts.ts (1)
  • XTR (10-10)
bindings/src/types/UnsignedTransaction.ts (1)
  • UnsignedTransaction (4-4)
bindings/src/types/wallet-daemon-client/StealthTransferRequest.ts (1)
  • StealthTransferRequest (8-17)
integration_tests/src/util.rs (2)
  • cucumber_log (12-15)
  • transaction_builder (8-10)
bindings/src/types/wallet-daemon-client/ComponentAddressOrName.ts (1)
  • ComponentAddressOrName (4-4)
bindings/src/types/ConfidentialTransferInputSelection.ts (1)
  • ConfidentialTransferInputSelection (3-7)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: fmt
  • GitHub Check: check nightly
  • GitHub Check: test
  • GitHub Check: machete
  • GitHub Check: check stable
  • GitHub Check: clippy
🔇 Additional comments (15)
clients/base_node_client/Cargo.toml (1)

13-14: Confirm default‐features for tari_transaction_components and tari_node_components
These workspace dependencies now implicitly enable their default features (which may pull in additional behavior or transitive deps). If you intended to disable defaults, restore default-features = false; otherwise, explicitly declare your feature set.

--- clients/base_node_client/Cargo.toml
@@ [dependencies]
-tari_transaction_components = { workspace = true }
-tari_node_components        = { workspace = true }
+tari_transaction_components = { workspace = true, default-features = false }
+tari_node_components        = { workspace = true, default-features = false }
applications/tari_swarm_daemon/src/process_definitions/wallet_daemon_create_key.rs (1)

6-6: Nice: replaced panic with contextual error propagation

Using anyhow::Context and ? improves robustness vs expect. Good change.

integration_tests/tests/features/substates.feature (1)

9-16: Setup simplification looks good

Switch to the shared network baseline and explicit template publish is clearer and should reduce flake.

integration_tests/tests/features/counter.feature (1)

18-19: Confirm name scoping to avoid clashes

Both scenarios name the component “COUNTER”. It’s unclear from the step definitions whether that identifier is scoped per scenario or shared globally—please verify that named components are scenario-isolated under @Concurrent to prevent collisions.

integration_tests/tests/features/fungible.feature (1)

8-9: Baseline refactor LGTM

Using the preconfigured network and wallet daemon simplifies setup and should reduce test flakiness.

Cargo.toml (1)

145-148: Networking crates group LGTM.

Clear grouping and explicit paths improve readability and local builds.

integration_tests/src/wallet_daemon_cli.rs (5)

39-44: Imports align with new flow.

Using XTR and narrowing to UnsignedTransaction fits the updated API.


64-65: New type import OK.

StealthTransferRequest matches the fields used below.


76-77: Switch to cucumber_log is good.

Consistent test logging beats eprintln!.


408-409: LGTM: structured logging for balances.


428-429: LGTM: structured logging for confidential balances.

integration_tests/tests/features/wallet_daemon.feature (2)

9-9: Baseline step consolidation looks good

Unified network setup improves test readability and cuts boilerplate.


17-18: Verify funding assumptions and downstream balance checks

ACC_2 now starts with 100000 free coins and the check is "at least 10000". Ensure subsequent balance assertions (especially faucet-token specific ones) account for this larger starting balance to avoid masking transfer failures.

integration_tests/tests/features/epoch_change.feature (2)

21-21: Step wording OK

“on VN VN” matches the usual pattern “on VN ”. No change needed.


9-9: Confirm per-scenario isolation for “Given a network with registered validator … and wallet daemon …”
Verify that this step definition spins up a fresh, isolated network (unique ports/directories or separate TariWorld) and fully tears it down between scenarios to prevent cross-test bleed under @Concurrent.

match result.return_type {
Type::U32 => {
let u32_result: u32 = result.decode().unwrap();
let u32_result: u32 = result.decode()?;

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.

💡 Verification agent

🧩 Analysis chain

Safer decode with ? instead of unwrap

Nice improvement—propagates decoding errors instead of panicking. Consider aligning other decode/unwrap call sites in this file for consistency.

Run to find remaining risky sites:


🏁 Script executed:

#!/bin/bash
# Find decode() results unwrapped with unwrap() in tests
rg -nP --type=rust -C2 '\.decode::<[^>]+>\(\)\.unwrap\(\)' integration_tests/tests

Length of output: 84


🏁 Script executed:

#!/bin/bash
# Search for any unwrapped decode() results in integration tests
rg -nP --type=rust '\.decode(?:::<[^>]+>)?\(\)\.unwrap\(\)' integration_tests/tests

Length of output: 289


Replace unwrapped decode().unwrap() calls with ? across tests

  • integration_tests/tests/cucumber.rs:352: change .decode().unwrap() to .decode()?
  • integration_tests/tests/cucumber.rs:541: change .decode().unwrap() to .decode()?
🤖 Prompt for AI Agents
In integration_tests/tests/cucumber.rs around lines 352, 395 and 541, replace
occurrences of .decode().unwrap() with .decode()?; ensure the enclosing test
functions return a Result type compatible with the decode() error (e.g.,
propagate using anyhow::Result or the existing test error type), update the
function signatures to return that Result if needed and adjust imports so the ?
operator compiles.

# Initialize indexer and connect wallet daemon
Given an indexer IDX connected to base node BASE
Given a wallet daemon WALLET_D connected to indexer IDX
Given a network with registered validator VN and wallet daemon WALLET_D

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.

💡 Verification agent

🧩 Analysis chain

Same note for the second scenario.

Verify per-scenario isolation or mark this feature @serial if the step uses a shared instance.


🏁 Script executed:

#!/bin/bash
rg -nP '@serial|@concurrent' integration_tests/tests/features/nft.feature -n -C0

Length of output: 96


Mark NFT feature as @serial or ensure per-scenario isolation The feature is annotated @concurrent (line 4) but uses a shared network instance (Given a network with registered validator VN and wallet daemon WALLET_D); change the annotation to @serial or refactor to spin up an isolated network per scenario.

🤖 Prompt for AI Agents
In integration_tests/tests/features/nft.feature around line 62, the feature is
marked @concurrent but uses a shared network instance via "Given a network with
registered validator VN and wallet daemon WALLET_D", which can cause
interference between parallel scenarios; either change the feature annotation to
@serial at the top of the file to force serial execution, or refactor the steps
to create and tear down an isolated network per scenario (e.g., replace the
shared "Given a network..." with a per-scenario setup/fixture that spins up a
fresh network and wallet and ensures cleanup after each scenario).


// Withdraw 50 of the tokens and send them to acc2
let tokens = acc1.withdraw(faucet_resource, Amount(50));
let tokens = acc1.withdraw(faucet_resource, Amount(1000));

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.

🛠️ Refactor suggestion

Transfer amount increased to 1000: align assertions and fees

Withdrawing 1000 changes expected end balances. Re-introduce explicit resource-scoped balance checks for ACC_1 and ACC_2 that account for fees, or assert on net delta. The current generic balance checks were commented out.

I can add a step that checks balance for a specific resource id on an account via wallet daemon to make this robust—want me to open a follow-up?

🤖 Prompt for AI Agents
integration_tests/tests/features/wallet_daemon.feature around line 44:
withdrawing 1000 changes expected end balances so restore explicit,
resource-scoped assertions for ACC_1 and ACC_2 (or assert net delta) that
account for transaction fees; update the test to query the wallet daemon for the
specific resource id balance after the withdrawal and assert expected_balance =
previous_balance - 1000 - fees (or compare net delta between before/after
balances), and adjust any commented-out generic balance checks to use
resource-scoped checks or a dedicated step that fetches balances by resource id
to make expectations robust.

@github-actions

github-actions Bot commented Sep 2, 2025

Copy link
Copy Markdown

Test Results (CI)

419 tests  +24   413 ✅ +18   1h 16m 8s ⏱️ + 30m 53s
 69 suites +13     0 💤 ± 0 
  2 files   + 1     6 ❌ + 6 

For more details on these failures, see this check.

Results for commit 09b656e. ± Comparison against base commit bee07d3.

@sdbondi
sdbondi merged commit 98c96a0 into tari-project:development Sep 2, 2025
12 of 13 checks passed
@sdbondi
sdbondi deleted the cucumber-fixes branch September 2, 2025 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants