Skip to content

e2e G-NODE-06: cover --all, the below-crossover --to-mbps floor, --dry-run, and the headless confirmation refusal #1354

Closed

Description

@yigitdot

Follow-up from the review of #1353. The unit-level plan arithmetic is now covered by a mocked-provider module (crates/cli/src/commands/unbond.rs, mod plan_computation), but four behaviours can only be reached through the real binary and are still unexercised in crates/e2e/tests/g_node_06_unbond.rs.

Legs to add

  1. A real --all release. The journey uses --all once (step 3) purely to trigger the "already in flight" error, which returns from build_plan's pending-request branch before resolve_release. No e2e has ever executed the --all path end to end. Needs a state where activeBond > bondRequired(declaredMbps) — e.g. declare a low tier while over-bonded — and should assert the retained bond is the bare curve floor and that isActive stays false after withdrawal when it lands below minBond.

  2. A below-crossover --to-mbps. Both journey tiers (5000/2000 Mbps) sit where the curve dominates minBond, so max(minBond, ·) is never the operative term on-chain. A --to-mbps 10 leg would assert active_bond == min_bond exactly. (The unit tests now cover the arithmetic; this would confirm it against the deployed curve.)

  3. --dry-run. Unexecuted on this command despite the command's own error text recommending it. The branch sits before both the Waiting bail and confirm_or_bail, so a regression moving it below execute would submit a real 14-day-deactivating transaction on what the operator asked to preview. Assert dry_run=true, submitted=false, and unbonding_of(operator).0 == 0. Note it needs no --yes, which incidentally proves dry-run doesn't gate on confirmation.

  4. The headless confirmation refusal. All CLI invocations in the journey pass --yes. Command::output() pipes stdin/stderr, so is_terminal() is already false — dropping --yes on one invocation is a free, exact reproduction. Assert non-zero exit, that stderr carries both the INACTIVE warning and the --yes remedy, and that nothing was submitted.

Legs 3 and 4 add no chain time (~10 lines each). Legs 1 and 2 need a bond top-up first, so budget for the extra transactions.

Note .github/workflows/ci.yml anvil-job budget was updated to 6 tests in #1353; adding legs to the existing test does not change the count but may push its 13m OVERALL_TIMEOUT.

Activity

  1. added
    kind:test
    rust
    area:cli
    prio:medium
    on Jul 21, 2026
  2. self-assigned this
    on Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clikind:testprio:mediumrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions