Skip to content

test(messaging): add E2E coverage for channels stop/start and channels add/remove rebuild flows #3462

@sandl99

Description

@sandl99

Summary

There is no end-to-end coverage for the post-onboard messaging-channel lifecycle. Three bugs have shipped to main in this area in the last few weeks because no test exercises these flows:

All three involve a full sandbox rebuild (>10 min each), so they belong as E2E scripts on Brev rather than as unit tests.

This issue tracks adding two E2E scripts under test/e2e/ that exercise the channel lifecycle end-to-end and assert against the baked image (/opt/nemoclaw/openclaw.json — the real source
of truth at runtime), not only the host-side registry. The #3381#3453 sequence is the exact reason: #3381's fix made the registry-side state correct, which masked the fact that the baked image
was still wrong until #3453 surfaced it.

Why two scripts instead of one

Each rebuild takes >10 min, so a single onboard → add → stop → start → remove script would run ~50 min and have a long mean-time-to-feedback when any one step regresses. Splitting into two
scripts:

  • Bounds each run to ~30 min
  • Lets us run them in parallel on separate Brev instances
  • Makes regressions easier to attribute (channel-add bug vs. channel-stop bug)

Test 1 — onboard telegram → channels stop → channels start

Regression test for #3381 and #3453.

  1. nemoclaw onboard --agent openclaw with telegram enabled
  2. Verify the telegram bridge is up and openclaw.json contains the channel; bot responds to a DM
  3. nemoclaw channels stop telegram; accept the rebuild prompt
  4. Assert (baked image, bug(messaging) channels stop <name> does not stop the bridge through rebuild — openclaw.json still bakes the channel in #3453): docker exec <sandbox> jq .channels /opt/nemoclaw/openclaw.json does not contain telegram; gateway logs show no telegram-bridge provider attached
  5. Assert (registry): disabledChannels: ["telegram"] and messagingChannels still includes telegram
  6. nemoclaw channels start telegram; accept the rebuild prompt
  7. Assert (baked image, [Messaging] Cannot start a channel after a stop #3381): openclaw.json contains telegram again
  8. Assert (runtime, [Messaging] Cannot start a channel after a stop #3381): bridge is up and sending a DM to the bot gets a response — not just that the CLI printed success

Test 2 — onboard empty → channels add → channels remove

Regression test for #3437.

  1. nemoclaw onboard --agent openclaw with no messaging channel selected
  2. nemoclaw channels add telegram; provide token; accept the rebuild prompt
  3. Assert (policy): nemoclaw policy list contains the telegram preset — no manual policy-add step required
  4. Assert (network): bridge can reach api.telegram.org:443; sending a DM gets a response
  5. Assert (baked image): openclaw.json contains telegram
  6. nemoclaw channels remove telegram; accept the rebuild prompt
  7. Assert: openclaw.json does not contain telegram; bridge process is gone; policy list no longer contains the telegram preset; registry shows telegram removed from messagingChannels

Metadata

Metadata

Assignees

Labels

VDRLinked to VDR findingVRDCIssues and PRs submitted by NVIDIA VRDC test team.area: e2eEnd-to-end tests, nightly failures, or validation infrastructurearea: messagingMessaging channels, bridges, manifests, or channel lifecycle
No fields configured for Enhancement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions