On a gray afternoon in early November, Samantha Miller supervised a handful of people in long white coats while they placed very delicate samples into very expensive machines. Miller spends most of her waking hours inside the peppy, lime-green-accented lab she founded. For five and a half years, she tested every sample that came through its doors herself. Lab workers are advised to avoid handling that much material because they can get repetitive stress injuries, but Samantha Miller loves to test weed. “There isn’t someone more qualified on the planet to be a cannabinoid scientist than me,” she’s told me more than once.

I’d spoken with Miller at length on the phone in July, then again in October, before I met her in Santa Rosa, California. Both times, she’d seemed unflappable: she laughed loudly and often; she’d referred to herself as a unicorn and a renegade. But that day in November, a palpable current of stress pulsed beneath our conversation. When Californians voted to legalize recreational weed, the state government saw an opening to reign in this diffuse, largely unregulated market. Changes are coming by January 1, when legalization goes into effect, but at the time, Miller still didn’t know what those changes would be. We took a seat in her office and closed the door.

“Does the government really expect this to come together in 45 days?”

“Does the government really expect this to come together in 45 days?” she asked me, clasping her hands between her knees and looking me in the eye. Beneath her casual, Northern California exterior — long, center-parted hair, bootcut jeans, matching jewelry — Miller still felt like the mohawked punk kid she was in her teens. Like many legacy people in cannabis, she doesn’t trust that the government had the best interest of independent growers, distributors, manufacturers, and testers in mind. Miller worried that the green rush as she knew it, which had helped prop up the middle class in weed-rich areas like northern California, was coming to an end. She worried that new front-end costs would run people who’d been working in weed for years straight out of the business, making room for VC companies and faceless corporate conglomerates. She worried she wouldn’t get an operating permit in time and she wouldn’t be able to pay her staff.

But mostly, Miller worried because she has no idea what the hell was going to happen and, as of that November, it seemed like neither did anybody else.

Weed has long been a fact, not a sin, in California, which became the first state to legalize medical marijuana in 1996 and has had a thriving underground recreational market for decades. But those who use and sell recreational weed have long been punished in numbers that belie the general population’s sentiment toward the drug; between 2006 and 2015, more than half a million marijuana arrests were made here. Black and Latino Californians have been arrested for marijuana-related crimes at far higher rates than white Californians. Legalizing recreational weed won’t just be a rubber stamp on an already-running industry; it’ll seriously impact the state’s economy, criminal justice system, and the thousands of workers currently involved in the supply chain.

Medical marijuana already brings in an estimated $50 million to $109 million in taxes every year. The Legislative Analyst’s Office predicts California will eventually make more than $1 billion annually from taxing recreational marijuana. Local taxes may also be applied and the seed-to-sale costs are likely to increase as growers, manufacturers, distributors, and testers adhere to the state’s stringent regulations. Some believe that, even after legalization, the black market will continue to thrive because many California consumers will want to continue to pay what they’re used to paying.

On November 16, the state finally released “emergency regulations”

Alaska, Colorado, Oregon, Washington state, and Washington D.C. have already legalized recreational marijuana. In November 2016, California, Massachusetts, Maine, and Nevada voted to join them. But for all the examples available, California has still struggled through its own regulatory process. California is the country’s most populous state and there are only 11 full-time people working to regulate its mammoth marijuana industry.

When Prop. 64 passed in November 2016, the initial language indicated there would be separate regulations for recreational (what the state calls “adult-use”) cannabis and medical cannabis. In April 2017, the medical regulatory agency — then called Bureau of Medical Cannabis Regulation — posted stringent and wide-ranging draft regulations. In late June, the state scrapped its original plan and formed an agency called the Bureau of Cannabis Control (BCC) to regulate both medical and adult-use cannabis under a single licensing system. In September, the state withdrew the earlier draft regulations and the BCC, the Drug and Food Association, and the Department of Public Health went on a listening tour, meeting with stakeholders across California. And on November 16, the state finally released what they were now calling “emergency regulations” to the public.

The current regulations touch every part of the business: growing, manufacturing, testing, distribution, and more. They include surveillance requirements that appear to entail providing video to the bureau upon request without, say, a warrant. The regulations specify, for instance, how much weed can be transferred in a single trip, who can travel from the lab to the distribution center to sample, how much THC edibles can contain, and what level of pesticides will be tolerated.

Initial reviews of those many pages are mixed. “They could have legalized cannabis without writing 200 pages of laws,” said Sam David, the founder of Coastal Analytical, a Carlsbad-based cannabis-testing lab. (The full regulations clock in at 276 pages.) His concern reflects that of others in the industry: that the government isn’t so much “legalizing” recreational weed as attempting to reshape the market by over regulation.

“They could have legalized cannabis without writing 200 pages of laws.”

Miller and David’s corner of this billion-dollar world is perhaps the least easily understood by the consumer and the BCC alike. While industry magazine Marijuana Business Daily estimates that 100,000 to 150,000 Americans worked in legal cannabis in 2016 — before California and other states legalized recreational weed — fewer than one percent of those people worked in testing labs. That small number includes administrative staff and low-level technicians, meaning even fewer know how to test for the specific elements the state has now laid out. Lori Glauser, the co-founder and COO of cannabis-testing company EVIO (formerly named Signal Bay), estimates there are 30 people across the United States with the kind of experience California is requiring. The few expert level cannabis-testing labs that do exist here are relatively new; when Miller founded her lab, Pure Analytics, seven years ago, she said it was the third cannabis-testing lab in California and the fourth in the nation. A typical Miller sentence sounds something like “The number one analyte that we find is Myclobutanil, which is a chlorinated fungicide found in a product called Eagle 20.” You can’t wing being an expert lab tech and you can’t learn it in a couple of weeks.

Even though medical marijuana hasn’t been heavily regulated at the state level, many consumers, cities, and companies have already been demanding cleaner and safer weed. Medical marijuana patients often have compromised immune systems; they don’t want to be using cannabis that could have contaminants in it. Other users with stable immune systems might just be discerning about what they’re putting in their bodies. Some cities have already raised their testing standards above the state’s requirements and a few dispensaries, like SPARC SF, have been testing to the most sensitive levels available since their inceptions. “It’s a significant burden, but something we thought was really important to do,” said Josh Hoffman, SPARC’s Director of Product.

To this point, those cities, companies, and clients that have opted-in to stronger regulation have kept expert cannabis testing labs, those official white-lab-coat operations staffed by trained chemists, in business. But now anyone who wants to sell cannabis legally in California will have to go through the labs. Not just the extra credit kids. Everybody.

Testing is an industry built on precision; its leaders operate in a world of excel spreadsheets and contingency planning. But it doesn’t take a scientist to see that there’ll be a lot of new weed going through the system and very few people who have experience testing it.

On the morning of November 16, Miller started refreshing the Bureau of Cannabis Control’s website. She’d heard the day before that the regulations would be available; finally, mid-morning, they appeared. The BCC held a livestreamed advisory board meeting, which she half-watched on her computer while she underlined a printed copy of the document. She felt a sense of relief flood her body. The emergency regulations weren’t perfect, but they were better than she’d expected. Most important, they were done.

Miller is highly competitive — she enjoys what she calls “business as a sport” — and for the past few months, she hadn’t been able to plan her business. She hadn’t known what kind of equipment to order, what paperwork to fill out, if she’d need to institute a new workflow, if she’d have to upgrade her space, or if she’d have to fire or hire staff members.

“There’s no room for failure.”

Miller immediately found clear improvements from the draft regulations. The state relaxed what she perceived as overly onerous restrictions on who could manage or work in a lab. For instance, she wouldn’t have been able to manage the lab she founded under the draft regulations, because she doesn’t have an advanced degree. Now, after some lobbying from various labs, the state would allow for equivalent work experience. There is a transition period of six months, which means dispensaries won’t have to throw out weed harvested this fall; they’ll just have to affix a label that it hasn’t been tested to the state’s current standards. There is now a phased-in testing schedule, where labs need to test for pesticides, residual solvents, and other contaminants at one level on Jan. 1 and a stricter level on July 1.

And, finally, she had some clarity on the licensing process. Miller knew there were always going to be two initial steps to joining the legal market on Jan. 1, She’d need a local permit before she could apply for a state temporary permit. She applied for the local permit in advance of its September deadline. At first, the local permit office thought she was a grower and kicked the application back to her with more questions, but they eventually sorted that out. On Oct. 2, the permit office sent her an email saying she’d be fine and they’d help push her through. But that email was sent a week before more than a dozen wildfires destroyed much of Sonoma County, where Miller’s office is, and seven neighboring counties. Miller hadn’t heard from the permit office — now responsible for regulating the fire recovery process — since. She’d long imagined being stuck on January 1st, unable to apply for a state permit, unable to get a local one. “There’s no room for failure,” she’d thought.

But the state said it would now accept “another authorization” which showed the intent to permit. The email should fit this bill. Or, if she submits her application to the state, they’ll write the local permit office and, if that local office doesn’t respond within 10 days, the state will take it as a blessing of intent and authorize a temporary permit.

Miller was less impressed with the annual licensing fees for each lab, which start at $20,000. State licensing fee for non-cannabis testing labs start at $305. This is more than her federal tax bill and Miller doesn’t have enough revenue to take that kind of hit lightly.

But overall, as she underlined, the process struck her as fair and reasonable. Finally.

Back in the spring, California released a document about the contaminants they’d be screening for: pesticides, residual solvents and processing chemicals, microbiological impurities, heavy metals, and foreign material. Some of these contaminants are universally and immediately understood: who wants to buy weed mixed with a bunch of rat hairs (more formally: foreign materials)? Scanning for heavy metals like lead and arsenic seems to make sense, but not every state does it. When it comes to pesticides and some “microbiological impurities,” there’s a more heated debate.

California guidelines identify a potential health and safety hazard from pesticides, but some call that overkill. “It’s not like people are dying from pesticides in cannabis and it’s a very expensive test to operate,” David said. To test for pesticides at the level the state now requires, each lab will need an instrument which can cost around $350,000 new. In Oregon, about 10 percent of marijuana flowers and 26 percent of extracts and concentrates have failed to meet the pesticide requirements since they went into effect. The cost of failures can bankrupt small growers who buy soil that’s already got pesticides in it or who work in areas affected by drift. Should a significant amount of product fails statewide, the cost of weed will go up for consumers, many of whom will still be medical patients. So does the potential harm of inhaling pesticides merit these costly precautions?

“It’s not like people are dying from pesticides in cannabis.”

It’s hard to know, since marijuana is illegal on a federal level. That means the US DEA doesn’t allow institutions receiving federal funding to possess marijuana for research purposes (with the exception of the University of Mississippi). So scientific consensus on the health impacts of marijuana itself — including potential contaminants — is far behind the state-driven legalization movement. Attorney General Jeff Sessions, who met with anti-marijuana activists last week, has signaled his reticence to expand this research. Similarly, the EPA can’t approve any pesticides for use on marijuana, because it doesn’t approve marijuana cultivation in the first place. So states have been left to sort the issue themselves, with very little useful research to tap into.

Tobacco, for instance, seems like it would offer a comparable case study, but doesn’t give us much useful information. The tobacco industry has EPA approval for many different kinds of pesticides. (Then again, Big Tobacco has some of the world’s most persuasive lobbyists.) And nobody’s arguing that tobacco can be used as medicine for cancer patients. An average cigarette contains dozens of carcinogens and hundreds of toxins, including arsenic and glass fibers, and even smoking tobacco in a pipe or a hand-rolled cigarette is known to have detrimental health effects. Isolating pesticides in tobacco research, or even following up on the few pesticide guidelines they have put in place, hasn’t been a priority for the EPA.

A UC Davis study, conducted in a private lab with the department’s funds, found some bacterial and fungal pathogens on marijuana could be deeply harmful, particularly to medical consumers with compromised immune systems. “Inhaling marijuana in any form provides a direct portal of entry deep into the lungs where infection can easily take hold,” Joseph Tuscano, a lead study author, wrote. While edibles avoid this concern, they can also pose health risks. For instance, some are presently made or stored under conditions that could potentially breed the bacteria that leads to botulism. Botulism is exceptionally rare; in 2015, the last year for which data is available, there were 39 foodborne cases in the U.S. of which one was fatal. A botulism case has never been connected to edible consumption. However, as marijuana is a newly regulated industry and is still classified by the DEA as a prohibited schedule 1 drug, alongside heroin and peyote, a single false step or error will reverberate.

While everyone I’ve spoken with in the industry believes the safety of cannabis products is paramount, some believe the BCC guidelines go too far while others feel they are not specific enough. Hoffman, the head of product at SPARC SF, is concerned the state’s guidelines do not adequately discriminate between different kinds of bacteria, meaning that using organic gardening techniques (like spraying “compost tea” on the leaves) could lead to a failed test.

The BCC guidelines note the “inherent challenges” of regulating an industry that’s not federally regulated, hasn’t been regulated in other states for very long, and has no generally accepted (or validated) testing methods. “The level of work that the state had to do to come up with legitimate action levels was immense,” said Miller. “They did an excellent job. It may end up being overly conservative, but it’s better to start out overly conservative than expose the general population to harm.”

The BCC’s communications director declined requests for a phone interview with Bureau Chief Lori Ajax, though he furnished The Verge with short responses to written questions. He wrote the phase-in schedule was “developed [to balance] the contaminants most harmful to public health with the current testing abilities of the laboratories in existence today.”

Lori Glauser has been through this regulatory process in five states, including in Oregon, where EVIO has five labs. “The testing part isn’t too different from what we expected,” she said of California’s regulations.

In 2015, before the regulations took effect, there were 40 cannabis-testing labs in Oregon. The majority couldn’t pass all the standards the state required. On the day the regulations went into effect, there were only 12 labs open. That number has been steadily creeping back up.

Glauser took a long view of the regulatory process. It was stressful at first, particularly for growers, some of whom hadn’t paid much attention to the regulation conversation. Many in the industry lost money those first few months. “We spent a tremendous amount of time just educating the market,” Glauser said.

Oregon is a much smaller state with fewer testing regulations. If Oregon is any example though, Glauser said California labs can expect to get flooded with marijuana, see a backup in the labs, experience huge stress in the industry, and, eventually, find an evening out.

Meanwhile, EVIO is on a hiring spree in California, where they’re getting ready to open a handful of new labs in the north and the south. (The Central Valley is a bit of a dead zone for weed testing, both because it doesn’t have comparable population centers and because there’s enough pesticide drift there that Central Valley weed rarely tests clean unless it’s grown indoors.) “There are lots of people who are chemists with experience testing similar substances and using this kind of equipment – maybe they test grapes or pharmaceuticals,” Glauser said. “But I haven’t seen many migrating into cannabis yet.” She hopes to win the best of California’s fruit and pharma testers over to the weed side.

For those in the business, the last two weeks in December are go-time. They’ve weathered a hectic, trying year as the state struggled to form its regulations and they struggled to predict the future. Surprisingly enough, Miller’s beginning to grow concerned the pendulum may have swung too far to the other direction. “It sounds like [the BCC] started out really conservative, then heard all the feedback that they were being too stringent, and have now overcorrected on the phased approach to implementation,” she said. Regulations are a very Goldilocks business; the state’s jumped from one ill-fitting chair to another and has yet, in Miller’s estimation, to find the one that’s just right.

Starting January they’ll be lighter in some areas than she’s used to. Until the regulations will tighten up again in July, Miller said she can’t guarantee that if a product meets the state’s first rounds of less stringent requirements in January that means it will be safe.

Add to these questions a bunch of non-testing changes, like the implementation of a track-and-trace system, super specific transfer protocols, widespread packaging changes, new cannabinoid limits, and 200-plus-pages of other regulations, and January 1st is all but guaranteed to be a shock date for the industry.

“Between now and Christmas is going to be a freaking marathon,” David said. In order to get licensed, he’s moving his lab from Carlsbad to San Diego. “It almost seems intentional,” David said of the short timeline, which he calls “brutal.” But he also concedes that while he’s putting in a ton of work and money on the front end, it’s likely to pay off. “The same people I’m complaining about are the reason labs are going to make money,” he said.

“We feel confident we can do all the tests, but I will say it is a lot to put on labs six weeks before the date,” Glauser said. “If Oregon now has 20 labs, you’ll need more than 100 labs in California to get this to work at the same scale.” EVIO is currently opening a location in Costa Mesa and eyeing a number of others in the Inland Empire, the Emerald Triangle, the Bay Area, and the Sacramento Valley. Glauser opened their first seven labs in a year and a half. “We’ve got the system down,” she said.

Meanwhile, Miller is preparing her lab not to grow or shrink, but to ride the immediate wave of changes. How the market will react to legalization, Miller said, is anybody’s guess.

“My head’s full, calculating all the different permutations,” she said, no longer emphatic or unsettled, simply curious. “I’m getting ready to do it all the different ways.”