Single-Shard Production E2E Tests: Improved/Innovative New Test Case

⏱️ 1.5–2 hours πŸ“Š Level 4 Hands-on lab

Why this lab

You traced runner_boots_listens_and_shuts_down_cleanly in production harness (Part II). Here you change that integration test: add visible markers, assert what production wiring can show without pretending the test already submits a user transaction, and document how real ingress (POST /api/v1/transactions or tx_submission_sender()) would feed the same ShardLoop path.

Prerequisites

Files you will touch

Step 1 β€” Baseline run

From the repository root (production tests are serial and use real ports):

RUST_LOG=info cargo test -p hyperscale-production --test runner runner_boots_listens_and_shuts_down_cleanly -- --test-threads=1 --nocapture

Confirm pass once. Note log lines for peer id, listen addresses, and clean shutdown.

Step 2 β€” Trace markers (what the harness can show)

Add three tracing::info! markers (preferred over println!):

  1. After build() succeeds β€” e.g. info!("[lab] runner built");
  2. After listen_addresses() returns β€” log addrs.len() and the addresses
  3. Immediately before drop(shutdown) β€” e.g. info!("[lab] requesting shutdown");

Re-run with the same command. Verify ordering: built β†’ listening β†’ shutdown β†’ test pass.

Step 3 β€” Assert observables the canonical test omits

After fetching listen addresses, add:

assert!(!addrs.is_empty(), "production runner should bind at least one QUIC listen address (validator libp2p mesh, not wallet HTTP)");
info!("[lab] listen addresses: {:?}", addrs);

This documents what production E2E can prove today: wiring + network surface, not yet tx execution.

Step 4 β€” User input beginning (design note, not required code)

In your journal (or PR description), answer in bullet form:

Stretch (optional): sketch a new #[serial] test that calls tx_submission_sender() after run() starts, with a fixture transaction from TestFixturesβ€”do not block this lab on finishing that test.

Step 5 β€” Stretch: longer run window

Change the post-run() sleep from 500ms to 2s once, re-run, and note whether logs show periodic metrics or channel-depth exports (if enabled in your build). Restore 500ms before you finish so CI stays fast.

What β€œdone” looks like

Next

Continue to JMT & shard state deep dive, then Cross-Shard Simulation E2E, or extend production coverage in a separate PR after the simulation/substate work in #18.