Out on patrol with the San Francisco Police Department’s Bayview company, the cop I was riding with and I encountered a construction worker smoking a lunch-time joint near a building site at Hunters Point.

The construction worker eyed our black and white taxi. “It’s lunch time,” the cop joked out the rolled-down window to the construction worker who, caught off-guard, laughed hesitantly. That was it. We drove off without even getting out of the car.

Later, when I asked about the incident, the cop said that doling out marijuana citations — possession of small amounts of weed has been decriminalized in California — was the police-work equivalent of citing a jaywalker.

“What are we really trying to enforce?” he asked. “If you’re citing everyone for jaywalking, you wouldn’t get very far in your police career.” His point was that there is a difference between the spirit of the law and the letter, and citing a working guy for smoking a joint on a lunch break isn’t worth it — on any level.

That attitude is decidedly not shared by law enforcement across the Golden State. Approximately 200 localities across the state have banned medical marijuana, according to the Drug Policy Alliance, and continue to enforce strictly what they can.

Although that might change in the next six months.

The anti-medical marijuana interests in Sacramento, represented by the Police Chief’s Association and the League of California Cities, has long opposed a state-wide legal framework, despite medical marijuana being legal for patients for nearly 20 years.

At the moment, regulating marijuana’s cultivation and sale is left up to each city or county, which has created a motley patchwork of contradictory approaches to dealing with the drug. In many locales, especially smaller jurisdictions with fewer resources than major cities, that has bred mayhem.

“There has been chaos in California,” said state assemblyman Tom Ammiano (D-San Francisco) in an email to VICE News. “We have cities clamping down because they can’t deal with the shady operators and we have patients who don’t know what quality of product they’re getting because there are no rules.”

Ammiano, a long-time advocate for progressive medical marijuana legislation, has recently made a political move that may change the chaotic market.

By dropping his own legislation, opposed by the California Police Chiefs Association, and signing on as co-author of a bill — SB-1262 authored by state senator Lou Correrea (D-Santa Ana) — that is supported by cops, the assemblyman is hoping to bridge the gap between law enforcement and the medical cannabis industry.

“In order to make sure that medical cannabis is safely available to the patients who need it,” Ammiano wrote, “and to protect public safety from the potential for criminal exploitation, we have to set up some rules that will work.”

Ammiano’s influence on the law is clear: it started out with restrictive provisions, for example, requiring physicians to prescribe specific cannabis strains — which is likely unlawful — but now is at a point where the drug policy advocates and the cops are in the same room talking.

But, by aligning himself with the police chiefs and other long-time opponents such as the League of Cities — which SF Weekly reports the public safety committee of the League is staffed by retired police chiefs — Ammiano has alienated some marijuana growers and drug policy advocates.

“If a bill such as this passes [as is], we’ll be put in a worse off position than where we are now,” Amanda Reiman, the Drug Policy Alliance’s policy manager for California, said. “We’ve suggested a lot of amendments.”

DPA’s largest beef: Citizens with prior marijuana-related convictions won’t be eligible to obtain state licensing. That’s a problem, Reiman said, because there are many involved in the industry who have been the target by federal law enforcement during crackdown periods, such as during the recent Bush and Clinton administrations.

“We have a big issue with this,” Reiman said, “as people of color are way more targeted than others, and there are a lot of folks operating with the blessing of local governments [not the federal government. Marijuana is a Schedule I substance].”

They have other concerns too, such as the $8,000 application cost for a dispensary license, and the fact that there is no appeals process if an application is denied.

DPA and other opponents — mostly growers from California’s world-famous Emerald Triangle, which includes Humboldt, Mendocino, and Trinity counties, some of whom have long resisted regulation for fear of it hurting the bottom line — are involved in the negotiations for further changes.

Notably absent from the law as written are clear guidelines on where and how farmers can grow marijuana, which is a sticking point for growers as well.

California’s 18-year path toward establishing a still non-existent state-regulated market for medical marijuana is one reason Washington State’s experience coping with now-legal recreational marijuana consumption is a cautionary tale.

Washington’s difficulties implementing recreational use arose in part because there was no state-regulated medical marijuana system — but there was tolerance — a system that UCLA professor Mark Kleiman called “legal bullshit.”

So in many ways California’s legislators may be trying to avoid a similar debacle. Especially in light of the widely rumored ballot initiative in the works for 2016, aiming to legalize recreational use.

Ammiano says that the bill he is co-authoring is only designed to improve the state’s handling of voter-approved medical marijuana, not pave the way for legalization.

There are short-term legal benefits as well, aside from patient safety. For example, providing those involved in the medical marijuana industry protection, or at least some element of legitimacy, in the wake of the US Attorney General Eric Holder’s guidance. Holder didn’t signal an end to DEA enforcement, but he did make enforcing marijuana laws a “low priority” for those following state-guidance. Guidance which California still does not really have.

At this point California’s SB-1262 — the medical marijuana regulation bill — is far from a done deal. With some opposition from growers and drug policy advocates it could be more of a challenge to pass.

But, with both the Police Chiefs and the League of Cities on board, sources in the capital said that if it makes it onto Governor Jerry Brown’s desk, he would likely sign it.

Back in the SFPD patrol car, I asked the cop whether or not he’d object to state-wide regulation.