Skip to content

test(webapp): cover decentralized browser training - #1232

Open
ale18V wants to merge 22 commits into
mainfrom
test/decentralized-webapp-ci
Open

ale18V wants to merge 22 commits into
mainfrom
test/decentralized-webapp-ci

Conversation

@ale18V

@ale18V ale18V commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

This PR adds a decentralized webapp end-to-end test for the default MNIST task. A Chrome browser trains with two Node participants over real WebRTC connections. The test also exposed a DiscoJS race that could label outgoing weights with the next aggregation round and leave peers waiting indefinitely; this PR fixes that race. Browser-to-browser coverage is tracked in the stacked #1239.

Technical plan

A dedicated Cypress job starts one MNIST-only test server process with two Node peers, then runs the ordinary Cypress configuration against the webapp. The peers train concurrently with the browser and close when training finishes; the test checks the browser's participant count, epochs, model-sharing rounds, successful completion, and absence of error toasts. DiscoJS captures the aggregation round once for each payload exchange so concurrent arrivals cannot change outgoing message labels.

Deviations from plan

The test uses the existing 24-image CIFAR fixture rather than MNIST samples. It validates image preprocessing, browser-to-Node WebRTC, and model sharing, rather than classification quality or multiclass MNIST accuracy. The CI run also revealed the aggregation-round race, which is fixed here because it prevented reliable completion. The initial harness and separate Cypress config were removed in favor of a simple test-server process, following the review feedback.

Todo

Browser-to-browser Chrome–Firefox coverage is in the stacked #1239.

@ale18V
ale18V marked this pull request as ready for review September 23, 2026 21:41
@ale18V
ale18V force-pushed the test/decentralized-webapp-ci branch from 52131a5 to 73e9130 Compare September 24, 2026 12:38
@ale18V
ale18V added this pull request to stack #1235 September 24, 2026 13:05
@ale18V
ale18V force-pushed the test/decentralized-webapp-ci branch from 73e9130 to 194a7c6 Compare September 24, 2026 20:31
@ale18V
ale18V requested a review from JulienVig September 28, 2026 09:56

@JulienVig JulienVig 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.

cf. review for #1230, current implementation doesn't test browser-browser collaboration

@ale18V
ale18V force-pushed the test/decentralized-webapp-ci branch from eb4194d to adc7523 Compare October 1, 2026 12:44
@ale18V
ale18V force-pushed the test/decentralized-webapp-ci branch from 12fd154 to 2da0c4b Compare October 2, 2026 12:32
@ale18V
ale18V force-pushed the test/decentralized-webapp-ci branch from 2da0c4b to 417732e Compare October 3, 2026 11:16
@ale18V
ale18V force-pushed the test/decentralized-webapp-ci branch from c399a48 to d38c904 Compare October 5, 2026 14:31
Base automatically changed from test/federated-webapp-training to main October 5, 2026 16:03

This branch has not been deployed

No deployments
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.

2 participants