Multiple instances of the same worker triggered in response to single incoming request

I suspect this is related to having multiple users editing the worker.js code at the same time – one new version of the code ran a worker, the older version of the code also ran.

A single endpoint, addon/auth, would receive a single request, but two workers would generate responses (from the event log and from the activity on the backend table).

Two different developers had the worker.js open for editing. Both had done recent deploys. One worker would ultimately generate a valid response, the other invalid, thus sometime the caller would get a 200, sometimes a 400. The logs were baffling as it was clear concurrent execution of both the successful and failure flows were running from a single request.

But then one of the negineers noticed that the ‘last deploy’ timer was showing 14 minutes ago, in spite of having just recently deployed.

The second engineer closed their edit browser, and the first engineer redeployed, and the phantom worker was gone.

This was very confusing. Is this a known limitation in collaboration? Or did something go horribly wrong?

One engineer was on the West coast, one engineer was on the East coast, if that makes any difference.