Skip to content

feat(echo-venue): settle instantly, add echo-client round trip#256

Merged
mfw78 merged 1 commit into
dev/m1from
feat/m1-echo-venue
Jul 15, 2026
Merged

feat(echo-venue): settle instantly, add echo-client round trip#256
mfw78 merged 1 commit into
dev/m1from
feat/m1-echo-venue

Conversation

@mfw78

@mfw78 mfw78 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What

  • echo-venue: status() now returns IntentStatus::Settled(None) instead of IntentStatus::Open, so the adapter settles instantly on first poll.
  • echo-venue: adds a host #[cfg(test)] conformance module that bridges the macro-minted bindgen IntentHeader to nexum-venue-test's GoldenHeader mirror, holding derive_header to a hand-written golden (derive_header_conforms_to_the_published_golden), plus a divergence test with a little-endian amount (divergent_derivation_is_caught_by_the_golden) proving the check rejects a wrong derivation.
  • Adds echo-client (modules/examples/echo-client), the strategy half of the echo pair: declares required = ["pool", "logging"] in module.toml, submits an opaque body through nexum:intent/pool to echo-venue on every chain-1 block, and logs the intent-status transitions the router fans back.
  • Adds e2e_echo_module_router_adapter_round_trip in crates/nexum-runtime/src/supervisor/tests.rs: boots the supervisor with the echo-venue adapter and echo-client module, dispatches a chain-1 block, polls the pool router's status transitions, asserts the delivered status is Settled, and asserts the module's own logs record both the submission and the received settled status.
  • justfile: adds a build-echo-client target; test-e2e now also builds echo-venue and echo-client before running.
  • .github/workflows/ci.yml: adds echo-client to the wasm build matrix alongside echo-venue.
  • Cargo.toml / Cargo.lock: registers the new modules/examples/echo-client workspace member.

Why

Implements the first-train cut line, proving the intent core end to end with real components on both sides of the router: a real module submits through the host router to a real venue adapter and gets the settled status routed back, with no scripted stand-ins.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings (scoped: cargo clippy -p echo-venue --target wasm32-wasip2 --all-targets --locked, clean)
  • cargo test --workspace (scoped echo-venue/echo-client wasm build plus host-side tests; the e2e round-trip test run twice, plus the full 11-test e2e suite)
  • Confirmed the round-trip test has teeth: reverting echo-venue's status to Open and rebuilding the wasm makes e2e_echo_module_router_adapter_round_trip fail; restoring the fix makes it pass again.

AI Assistance

Claude (Opus) used for the implementation.

Closes #234

@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 10ac8cd to 21e5b4f Compare July 7, 2026 23:12
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 13741b7 to 8d095ee Compare July 7, 2026 23:12
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 21e5b4f to 3b83df8 Compare July 8, 2026 00:43
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 8d095ee to 68190c9 Compare July 8, 2026 00:43
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 3b83df8 to 6fd2646 Compare July 8, 2026 01:19
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 68190c9 to e66606e Compare July 8, 2026 01:19
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 6fd2646 to c5fcfb2 Compare July 8, 2026 01:44
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from e66606e to 94d8ec0 Compare July 8, 2026 01:44
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from c5fcfb2 to 2e9ebde Compare July 8, 2026 02:11
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 94d8ec0 to de36021 Compare July 8, 2026 02:11
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 2e9ebde to 4b77430 Compare July 8, 2026 02:20
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from de36021 to 19575f2 Compare July 8, 2026 02:20
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 4b77430 to cb1bb78 Compare July 8, 2026 02:23
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch 2 times, most recently from ec68bb0 to 8ae0b2d Compare July 8, 2026 03:03
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 393d064 to ef6fa36 Compare July 8, 2026 05:00
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 8ae0b2d to 66d59f7 Compare July 8, 2026 05:00
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from ef6fa36 to 28b8ea8 Compare July 8, 2026 05:31
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 66d59f7 to 00ba716 Compare July 8, 2026 05:31
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 28b8ea8 to 77a9a2f Compare July 8, 2026 06:21
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 00ba716 to f90c713 Compare July 8, 2026 06:21
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 77a9a2f to d3c987d Compare July 8, 2026 06:40
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from f90c713 to e42929e Compare July 8, 2026 06:40
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from d3c987d to 13f27be Compare July 8, 2026 07:07
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from e42929e to 575d3db Compare July 8, 2026 07:07
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 13f27be to 8e25890 Compare July 8, 2026 07:21
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 575d3db to ab3ddbf Compare July 8, 2026 07:21
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 8e25890 to a12248b Compare July 8, 2026 07:36
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from ab3ddbf to 64eb18b Compare July 8, 2026 07:36
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from a12248b to 329c97e Compare July 8, 2026 07:46
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from f154ec2 to a70408f Compare July 8, 2026 08:55
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from a00e05f to 04392c5 Compare July 8, 2026 08:55
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from a70408f to 1716065 Compare July 8, 2026 09:02
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 04392c5 to 4409b1d Compare July 8, 2026 09:02
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 1716065 to e401fc5 Compare July 8, 2026 09:19
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 4409b1d to 3999e56 Compare July 8, 2026 09:19
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from e401fc5 to 8247ad6 Compare July 8, 2026 12:10
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 3999e56 to 7b4684b Compare July 8, 2026 12:10
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 8247ad6 to bb07461 Compare July 8, 2026 12:20
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 7b4684b to 914e504 Compare July 8, 2026 12:20
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from bb07461 to c36f6d2 Compare July 8, 2026 12:50
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 914e504 to 9f47623 Compare July 8, 2026 12:50
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from c36f6d2 to 83278f0 Compare July 8, 2026 13:44
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 9f47623 to 252c34b Compare July 8, 2026 13:44
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 83278f0 to 9a4609f Compare July 8, 2026 14:00
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 252c34b to 4af0dba Compare July 8, 2026 14:00
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 9a4609f to b41108a Compare July 8, 2026 14:09
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 4af0dba to f752e14 Compare July 8, 2026 14:09

@jean-neiverth jean-neiverth left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor issue: modules/examples/echo-client/src/lib.rs, on_intent_status - logs the receipt length but not the status value (Settled, Open, etc.). The e2e test assertion m.contains("intent status from venue echo-venue") matches regardless of the actual settlement state. Logging update.status would strengthen both human observability and the test assertion that the module observed a settled transition specifically.

@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch 2 times, most recently from 9587c6f to 453dd31 Compare July 8, 2026 23:05
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from 24c5e5a to 07adeac Compare July 8, 2026 23:05
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch from 453dd31 to 31d67a0 Compare July 8, 2026 23:24
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch 2 times, most recently from 0b21c28 to f7d4598 Compare July 8, 2026 23:29
@mfw78
mfw78 force-pushed the feat/m1-echo-venue branch 2 times, most recently from b58db82 to 6f13c4d Compare July 9, 2026 02:09
@mfw78
mfw78 force-pushed the feat/m1-venue-test branch from f7d4598 to 48a9f90 Compare July 9, 2026 02:09
@mfw78 mfw78 added the pr-train Part of the current stacked PR train; lands in sequence, do not merge out of order. label Jul 9, 2026
…nd-trip

Add echo-client, the strategy half of the echo pair: it submits an
opaque body through nexum:intent/pool on every block and logs the
intent-status transitions the router fans back. Wire both real
components through an integration test that proves the intent core end
to end, module -> host router -> echo adapter submit and status back,
which is the first-train acceptance path.

Settle the echo venue instantly (status now reports settled) so the
round-trip reaches a terminal transition, and hold its header
derivation to the nexum-venue-test kit so echo-venue doubles as the
conformance target alongside its tutorial role.

Register echo-client in the workspace, the build recipes, and CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-train Part of the current stacked PR train; lands in sequence, do not merge out of order.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants