The company moving into an 8,500-square-foot office above Rock Bottom Brewing in downtown Portland on Sept. 7 is the sort of tech-sector success story Mayor Sam Adams would usually trumpet. 

It's a local startup in the "software cluster" the mayor identified as one of his top four economic priorities in 2009. Adams even went to the company's co-founder, Raven Zachary, for advice on how to create that strategy. 

The startup Zachary and James Keller founded in 2009 created mobile applications for Whole Foods, ZipCar and the Democratic National Committee. And in January, it became one of the few examples of a successful "exit"—a sale to an outside buyer—that didn't result in the programming talent packing their bags for California. Instead, the company has nearly doubled its local head count to 20 and is taking up residence along the MAX tracks.

But Adams hasn't been touting this victory. Because the company moving in is Walmart. 

"My first choice would be for a Portland-based company to take over the world," Adams says. "If one of our companies is going to be bought out by a larger company, keeping it in Portland is my second choice.... I maintain my concerns about Walmart's business practices. I hold those two things simultaneously."

The transformation of Small Society, the company Zachary and Keller started, into the mobile division of WalmartLabs, the Bentonville, Ark., shopping giant's e-commerce division, is an ironic outcome for Adams.

As a city commissioner from 2004 to 2008, Adams hung an anti-Walmart sign in his City Hall window on Southwest 5th Avenue. 

"This is a company that has my enmity," Adams told The Oregonian in 2005. "They treat their employees poorly and the communities they go into with total disdain."

Adams wasn't just posturing. When Walmart tried to open a second Portland retail location in Sellwood in 2005, Adams led the opposition, and the following year he authored a moratorium on all development on Hayden Island when the retailer tried to move there, saying Walmart "fails the basic test of ethical capitalism."

Walmart's supercenter at Southeast 82nd Avenue and Holgate Boulevard remains the retailer's only location within city limits.

(Clarification: Walmart broke ground on a 90,000 square foot supercenter in North Portland on Wednesday, Aug. 29. It will be the second location within city limits.)  

But by purchasing Small Society, Walmart invaded Portland more completely than Adams could ever have imagined: Developers sitting at WalmartLabs, seven blocks from City Hall, will now build the phone apps that guide customers through every Walmart store in the nation. Portland will become a company nerve center.

"Just talk into your phone," says Ravi Jariwala at Walmart Global eCommerce in San Bruno, Calif., "and say, 'I need eggs, milk, peanut butter and M&Ms,' and it will put them on your list."

The Portland-coded Walmart app, launched in May, is more than a digital shopping list. It offers customers the ability to walk into any supercenter, speak their desired items into their phones, and be directed to the aisles with products they're looking for. It also lets people tally local prices before shopping.

"By allowing [shoppers] to see the prices before they walk in the store, it allows them to walk in with confidence that they'll get the most for their money," Keller says.

Keller says she doesn't share Adams' fears that Walmart threatens Portland's values. 

"I have worked with a lot of local brands, like Nike, and this is another one," she says. "At the end of the day, I really believe in Walmart's brand. I feel lucky."

(Disclosure: Keller speaks next week at the WW-sponsored Portland Digital eXperience.)

Neither of the current mayoral candidates echoes Adams' aversion to Walmart. 

"It's not appropriate for the city to conduct an acid test for what kind of mobile work you're doing in your office," says ex-City Commissioner Charlie Hales. "Maybe this is an opportunity to bring a little of the Portland ethic to penetrate Walmart, rather than the other way around."

"It's a tough one," says state Rep. Jefferson Smith (D-East Portland). "I don't think Walmart stores fit within our strategic plan very well. But if a company is making an investment, how much do we sacrifice our ideology? There are times that we say, 'No Chick-Fil-A.' And there are times we say the mayor isn’t supposed to be the morality police.”