There it is, resting on a leaf. Looks like an ordinary housefly, (Musca domestica), but it might not be. The family Muscidae (Wikipedia) includes about 450 species in California alone, and more than 4000 worldwide. Many of them share the familiar “housefly” appearance, with gray color scheme and dark longitudinal streaks on the top of the thorax.
There are also flies in the Calliphoridae (blow flies), Sarcophagidae (flesh flies) and Tachinidae (mostly parasitic flies) that have a similar appearance. It seems like the “house fly plan” is a fairly successful shape, size, and look for such insects.
Because there are so many species and they look so similar, identifying small, nondescript flies is one of the hardest things an entomologist might have to do. It might involve counting hairs, studying wing vein patterns, or examining their genitalia under a microscope.
No matter what kind of fly this is, it is welcome in my ecogarden.