By Dieter Kurtenbach

The (San Jose, Calif.) Mercury News

The San Francisco 49ers entered this past weekend with nothing but good vibes after holding a news conference to announce quarterback Jimmy Garoppolo’s new five-year contract on Friday.

Well, those good vibes are gone. You can thank Reuben Foster for that.

And now 49ers head coach Kyle Shanahan and general manager John Lynch have a big decision to make. One that could contradict or bolster the duo’s “winning the right way” rhetoric.

Foster, the Niners’ prodigiously talented young linebacker out of Alabama, was booked into Santa Clara County jail Sunday on charges of domestic violence. He was also booked on suspicion of possessing an assault rifle.

As an isolated incident, this looks, bad — really bad — for Foster and the 49ers. But it is not an isolated incident.

This is Foster’s second arrest in a month — he was arrested in Alabama on Jan. 12 for marijuana possession — and his third off-field incident since being drafted by the 49ers last April. Add in his diluted drug test and his altercation with a hospital worker that led to him being sent home from last February’s NFL draft combine, and you can fairly say that Foster has exhibited a pattern of behavior well-deserving of serious scrutiny.

It is a pattern of behavior, highlighted by his latest, and most serious incident, that could easily cost Foster his job with the 49ers.

Foster’s latest arrest is the 17th reported 49ers player arrest since 2012 — that is the most arrests for any NFL team over that period of time.

Shanahan and Lynch said they were going to establish a new culture in Santa Clara. In their handling of the Foster situation, they now get a chance to show us if they are up to that task.

The courts and the NFL will afford Foster due process and will punish the linebacker as they deem fit. (The NFL’s standard suspension for domestic violence is six games, which is outrageous, but a conversation for another day.)

You and I will pass our own, meaningless judgments of Foster’s actions, as well. (What the hell were you thinking, Reuben?)

But I am most curious to see how the 49ers handle this situation in the coming days, weeks, and perhaps months.

The 49ers do not have to wait for due process to play out. They can deem Foster to be not worth the trouble — not worthy of representing the 49ers — and cut him right now. That is what the team did last April, when Shanahan and Lynch cut starting cornerback Tremaine Brock one day after he was arrested on domestic violence charges.

Using the Brock precedent, Foster should be out of a job already. But here is the thing: Brock did not have All-Pro potential.

Foster, a first-round pick in the 2017 NFL draft, does.

Both Shanahan and Lynch have said that they want to treat every off-the-field incident as a separate, unique situation when it comes to determining punishment. But we also saw what they did with Brock.

The 49ers’ new leaders, whether they intended or not, drew a line in the sand 10 months ago with Brock.

Are they willing to draw a different line for Foster?

If so, what does that say?

We are one year into Shanahan and Lynch’s tenure — it is fair to say that the duo is still trying to establish a culture in Santa Clara.

And culture is a fickle thing — it takes a long time and a lot of work to establish something worthwhile, but it can take one person a few minutes to undo months or years of hard work.

The 49ers placed a big bet on Foster last April. It is hard to say which red flag was brighter in the pre-draft process — his injury history or his negative off-the-field reputation — but the 49ers bet on both his prodigious talent and his character. This is Shanahan and Lynch’s guy, for better or for worse.

Great play or strong character — the 49ers brass says it wants all of its players to bring both to the table. But when it comes to Foster, it seems as if the 49ers are going to have to decide which of those two things matters more.

— Dieter Kurtenbach is a columnist for the San Jose (Calif.) Mercury News