San Francisco >> Southpaws have presented problems for the Giants all season. None as much as the kid from Cupertino who happened to be wearing road grays with Kansas City across the front Monday night.

Kris Bubic’s career started at Archbishop Mitty, took him to Stanford and, seven years after being drafted 40th overall, he toed the rubber at Oracle Park, where he was so filthy in front of family and friends that it required a retroactive scoring change for the Giants to record their first hit.

Bubic was so dominant that he sent the Giants to their first loss in 10 starts behind Robbie Ray this season.

The two lefties traded zeroes for seven innings before Vinnie Pasquantino took Tyler Rogers deep in the eighth for what proved to be a decisive shot over the right field wall. Pasquantino’s two-run homer was all the Royals would need to send the Giants to a 3-1 loss, snapping a three-game win streak from their sweep of the A’s.“We’ve seen some good pitchers this year,” Giants manager Bob Melvin said. “That was right up there.”

Ray held the Royals scoreless for seven innings, allowing six hits and one walk while striking out seven to lower his ERA to 2.67. The loss went to Rogers, so Ray’s record remains unblemished at 6-0. The Giants hadn’t won a pitcher’s first 10 starts of a season since they won 11 straight behind Bill Swift in 1992.

Bubic entered the game — his third career start at Oracle Park — with the fifth-best ERA in the majors at 1.66 and lowered it to 1.47 with seven shutout innings. While he doesn’t possess overpowering velocity, Bubic’s five-pitch mix and deceptive arm angle from the left side posed a difficult challenge for the Giants, who fell to 4-11 when facing a left-handed starting pitcher.

“He pitches in, he pitches out, he pitches up, he pitches down, had a couple different breaking balls working, threw his changeup to both sides of the plate. He was really good,” Melvin said of Bubic, who grew up just west of the Lawrence Expressway, across the city line from San Jose.

Bubic estimated he had somewhere between 30 or 40 guests in attendance and took his time catching up with them after the game. He owns a 1.47 ERA in three starts at Oracle Park — and earned his first win Monday — and said pitching at the ballpark where he grew up going to games felt like any other start.

“It’s kind of cool to have it all come full circle because I grew up watching Kruk and Kuip and Jon Miller and Dave Flemming — all those guys,” Bubic said. “I’ve probably sat in every area of this ballpark. … I think having pitched here already twice kind of takes away those jittery nerves at the start of the game.”

The Giants broke through for their first hit between the sixth and seventh innings, when an error on second baseman Michael Massey was changed to a hit, and cracked the scoring column for the first time after both teams had gone to the bullpen.

Both starting pitchers departed after the seventh inning with the score tied at zero.

“You don’t really notice (the score), but just coming into the game you realize you’re going up against a great pitcher,” Ray said. “Maybe that factors into it a little bit, but during the game I’m just going out there trying to put up zeroes. … That was probably the best, maybe the sharpest, I felt my stuff has been all year.”

Bubic had allowed two San Francisco batters to reach base — both bases on balls — when Wilmer Flores dribbled a soft grounder between first and second base. Massey ranged to his left, lost his footing and fumbled the ball. Flores reached safely, and Massey was initially charged with an error, keeping Bubic’s bid intact.

The official scorer, Michael Duca, reversed the ruling between innings, potentially making a controversial scoring change the only thing standing between the local kid throwing a no-no in his hometown ballpark. Upon review, he determined that Massey slipping on the grass prevented him from making the play, and a slip or fall does not count as a physical error in the rule book.

“It is what it is,” Bubic said of the decision. “At the end of the day, regardless of base runners, hits, walks, whatever, to be able to keep putting zeroes up there, that’s ultimately what matters.”

The scoring decision proved less consequential when Casey Schmitt, in his first game back from a left oblique strain, ripped a line drive past third base for a double in the seventh. Schmitt’s two-bagger gave the Giants runners at second and third with one out, but they came up empty after Tyler Fitzgerald rocketed a line drive to Bobby Witt Jr., who snagged it and doubled up Willy Adames from third base.

Jung Hoo Lee made sure the Giants wouldn’t waste another scoring chance once the Royals went to the bullpen in the eighth inning. He ripped a double into right-center that drove home Sam Huff. But third base coach Matt Williams put up stop sign for Heliot Ramos at third, and that’s where the would-be tying run was stranded as Matt Chapman popped up to end the inning.