A 39-year-old woman took Flight 701 from Doha, Qatar, to John F. Kennedy International Airport in late February, the final leg of her trip home to New York City from Iran.

A week later, on March 1, she tested positive for the coronavirus, the first confirmed case in New York City of an outbreak that had already devastated China and parts of Europe. The next day, Gov. Andrew M. Cuomo, appearing with Mayor Bill de Blasio at a news conference, promised that health investigators would track down every person on the woman’s flight. But no one did.

A day later, a lawyer from New Rochelle, a New York City suburb, tested positive for the virus — an alarming sign because he had not traveled to any affected country, suggesting community spread was already taking place.

Although city investigators had traced the lawyer’s whereabouts and connections to the most crowded corridors of Manhattan, the state’s efforts focused on the suburb, not the city, and Mr. de Blasio urged the public not to worry. “We’ll tell you the second we think you should change your behavior,” the mayor said on March 5.