Making pie isn’t like operating an app-based business in San Francisco. There are rules.

If you don’t follow the rules, you don’t make good pie.

Karen Heisler follows the rules. Karen Heisler makes good pie.

Before co-founding Mission Pie a dozen years ago, Heisler spent 15 years working for a regulatory outfit you may have heard of: the Environmental Protection Agency. She specialized in agricultural and pesticide regulation. “I believe in the law,” she says.

It’s easy to see why. When you work in pesticide regulation and rogues don’t follow the law, people get hurt — and things wither and die. It’s just so much better when the government concerns itself with ensuring society gets what it desires from corporations rather than ensuring corporations get what they desire from society.

But that all seems like long ago. Because it was.

Inside Heisler’s restaurant, everyone is eating pie and drinking coffee. Some manner of knitting klatch is meeting around the large main table. Outside, the 14 and 49 buses rumble by on Mission. On their sides, high-contrast photos of delicious food entice would-be customers to stay in and have dinner delivered to their homes tonight.

But if you want to eat Mission Pie, you’re probably going to have to put on your socks and your shoes and head down here.

Heisler is unwilling to submit to the 25 to 30-percent commission these delivery services demand from brick-and-mortar establishments — a rate she says far outstrips her profit margin. Contracts she’s been shown, furthermore, wouldn’t allow her to recoup her costs by charging higher rates for delivery customers.

The natural solution would be to raise prices on everyone, forcing the knitting klatch here to subsidize the folks at home enjoying Netflix and pie (She could also open up a remote ghost kitchen for delivery purposes only, and price everything there that much higher).

But that’s not how Heisler rolls. To hell with all that.

Her frustration isn’t that the “shut-in economy” has advanced to the point that contracting with a third party to have pies sent to your home is the epitome of San Francisco normal. If people desire delivery, let the people have what they want. It’s deeper than that. Heisler’s workforce is all employees. They have health insurance. She hands over payroll taxes and, additionally, with more than 20 employees, she and her co-owner Krystin Rubin are subject to any number of “employer mandates” this city has chosen to impose on its resident businesses.

Well, some of those businesses: The app-based food delivery outfits do not tend to categorize their workers as employees. They do not tend to offer workers healthcare. They do not tend to pay the requisite employment taxes. They do not deem themselves subject to employer mandates. And yet they claim their pound of flesh from brick-and-mortar establishments that pay all these taxes and do all these things.

“If this was a fair competition, I would be willing to accept it if the consumers didn’t want what I had to offer,” Heisler says. “But I am not willing to accept being outcompeted by virtue of another sector being given a pass when it comes to compliance with the law.”

“We will not participate. We will not be extorted from.”

In April, the news broke that DoorDash — one of the many food delivery services of the sort Heisler will not do business with — was applying tips given to its delivery workers to their base wages instead of treating them as what they are: a gratuity. For a company capitalized to the tune of billions of dollars, this was a profoundly petty move. And, of course, it would also appear to constitute wage theft: Supervisor Aaron Peskin took it upon himself to personally file a complaint with the city’s Office of Labor Standards Enforcement.

Heisler noticed this. And she subsequently reached out to Peskin with an intriguing message: Think bigger.

Rather than just reacting to one particularly odious move by one particularly callous company, why not focus on the fundamental issue: that food delivery outfits’ practice of classifying their workers as contractors — and not employees — all but certainly contravenes state law. Their business model would appear to be expressly illegal — and, in fact, is designed to be that way, thereby avoiding regulation and ensuring that a competitive advantage is, pun intended, baked in.

This is not just the opinion of a put-upon pie-maker watching scofflaws slice into her profits and viability, but of legal experts.

Last year, the state Supreme Court handed down what is now known as the “Dynamex” decision. The takeaway from that 82-page ruling: We start with the presumption that workers are employees, not contractors — a presumption akin to “innocent until proven guilty.” On top of that, the onus is on the employer to establish that workers are, indeed, contractors and not employees. This is done through a three-pronged “ABC” test, each category of which must be met:

(A) that the worker is free from the control and direction of the hiring entity in connection with the performance of the work, both under the contract for the performance of the work and in fact; and (B) that the worker performs work that is outside the usual course of the hiring entity’s business; and (C) that the worker is customarily engaged in an independently established trade, occupation, or business of the same nature as the work performed.

This is arcane and complex and grows ever more so when we tumble down the rabbit hole of billion-dollar-app-based services’ surreal claims that their workers are, in reality, their customers — a claim that goes down easier after a few slugs of whiskey or a frying pan to the head. In actuality, these companies claim, they are not people- or food-delivery services but ethereal tech platforms. These are not the droids you’re looking for. Pay no attention to the man behind the curtain!

Let’s leave that madness aside and stress that, whether it’s Lyft/Uber drivers or food delivery workers, it’s nigh-impossible to conceive of a scenario in which the ABC test can be passed. Among many other stumbling blocks, these are some of the most controlled and directed workers in the history of mankind. These workers should all be employees.

“There is no doubt they will need to revamp their worker classifications in light of the Dynamex case,” says Golden Gate University labor law professor Hina Shah. Adds UC Hastings labor law professor Veena Dubal, “Under Dynamex, companies like DoorDash, GrubHub, and Postmates are misclassifying their workers.” And, adds Dubal’s Hastings colleague, Reuel Schiller, that’s nothing new. “This idea of getting competitive advantage through regulatory avoidance — it happens all the time.”

But there’s a difference between government and politics. In addition to spending heavily on (extremely creative) lawyers, app-based outfits lobby heavily, too. They also contribute mightily to individual politicians; Uber, for one, maxed out its givings to Gov. Gavin Newsom, always a friend in need for disruptive tech.

As such, Newsom’s message in the wake of the Dynamex ruling hasn’t been “enforce the law.” It’s been about collaboration and conciliation and creating a blue-ribbon panel to “expand worker opportunity.”

That’s fun. One could argue that the state Supreme Court’s ruling already did just that.

So, local enforcement agencies aren’t exactly incentivized to start kicking down doors and, ahem, enforce the law. Everyone is waiting to see what happens in Sacramento, how various bills clarifying Dynamex fare in the legislature, and how numerous lawsuits are decided.

Pat Mulligan, the head of the local Office of Labor Standards and Enforcement (OLSE), says he has several open cases regarding food delivery outfits. And, soon, he may have one more. Heisler has had conversations with the offices of Supervisors Hillary Ronen and Rafael Mandelman — and Peskin tells your humble narrator that, if he receives a favorable OLSE ruling in l’affaire Door Dash, he’d be amenable to filing a broader complaint of the sort Heisler envisions: “Oh, yes — in a hot second.”

Until then, everyone here at Mission Pie keeps knitting, and drinking coffee, and eating forkfuls of dessert for breakfast. And, outside, we’re in stasis, too: The workers for delivery services don’t benefit from wage or hour laws or have health insurance, and, in the event something goes dreadfully wrong, they’re subsidized by the social safety net (i.e. you).

Establishments like Heisler’s also pay taxes that enable this social safety net, yet find their business being syphoned away by outfits that, expressly, do not.

It’s not clear how tenable this is for the restaurants that make the food — without whom all of this would be impossible.

When you work in the pie business and rogues don’t follow the law, people get hurt. And things wither and die.