Skip to content

test(e2e): cover multi-node p2p across sandbox churn - #233

Open
WindSongShaoGe wants to merge 1 commit into
kvcache-ai:mainfrom
WindSongShaoGe:test/p2p-multinode-integration
Open

test(e2e): cover multi-node p2p across sandbox churn#233
WindSongShaoGe wants to merge 1 commit into
kvcache-ai:mainfrom
WindSongShaoGe:test/p2p-multinode-integration

Conversation

@WindSongShaoGe

Copy link
Copy Markdown
Contributor

What

  • Add a dedicated multi-node P2P compose E2E suite.
  • Start one Firecracker sandbox on each AgentENV node.
  • Verify sandbox veth creation and cleanup are observed.
  • Exercise P2P layer transfers in both directions before and after sandbox deletion.
  • Disable the origin path to prove that transfers use P2P rather than HTTP fallback.
  • Verify HTTP 206 responses, content size, and SHA256 integrity.
  • Add a dedicated Make target and CI workflow step.
  • Make the E2E template build timeout configurable.

Validation

  • Multi-node P2P E2E: 33 assertions passed
  • E2E summary: 1 passed, 0 failed
  • Shell syntax checks passed
  • make fmt passed
  • git diff --check passed

Refs #138

@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

🔍 OpenCodeReview found 3 issue(s) in this PR.

  • ✅ Successfully posted inline: 3 comment(s)

Comment on lines +131 to +133
- name: P2P multi-node regression test
if: ${{ matrix.e2e_name == 'docker-compose' }}
run: SKIP_BUILD=1 make test-e2e-p2p PROFILE=debug

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.

bug · medium
This new regression step has no execution timeout, while the target includes Docker operations and node-local API calls whose helpers do not consistently set network/process deadlines. A stuck docker compose exec or sandbox API request can therefore occupy the runner until GitHub's much larger default job limit. Add a step-level timeout-minutes (or a bounded job-level timeout) appropriate for the two E2E runs.

Suggestion:

Suggested change
- name: P2P multi-node regression test
if: ${{ matrix.e2e_name == 'docker-compose' }}
run: SKIP_BUILD=1 make test-e2e-p2p PROFILE=debug
- name: P2P multi-node regression test
if: ${{ matrix.e2e_name == 'docker-compose' }}
timeout-minutes: 20
run: SKIP_BUILD=1 make test-e2e-p2p PROFILE=debug

Comment thread Makefile
Comment on lines +208 to +209
test-e2e-p2p:
@set -eu; \

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.

test · low
The new E2E target is not included in the existing test-e2e-all dependency list, so callers expecting that aggregate target to run every E2E suite will silently miss this regression. Add test-e2e-p2p to test-e2e-all (unless the aggregate target is intentionally no longer exhaustive).

Comment on lines +255 to +258
log "Waiting ${P2P_SETTLE_SECONDS}s for sandbox veth link changes to reach netwatch ..."
sleep "$P2P_SETTLE_SECONDS"
assert_veth_changed "$NODE_A_SERVICE" "$veth_baseline_a"
assert_veth_changed "$NODE_B_SERVICE" "$veth_baseline_b"

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.

test · medium
This creation-side check uses a fixed 5-second delay, unlike the deletion-side check below which polls for up to 20 seconds. On a loaded runner, sandbox state can become running before the host-side interface observation settles, causing an otherwise healthy P2P run to fail here. Poll until the veth set differs from the baseline (with a bounded timeout), then perform the assertion; the subsequent P2P fetch loop already follows this asynchronous polling pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant