R. v. R.K.K., 2022 BCCA 17, January 20, 2022, at paragraphs 4 to 7:
..I would note this is yet another of the many sexual assault appeals this Court has considered in which the trial judge failed to perform the gatekeeper function mandated by s. 276 of the Criminal Code. During cross‑examination of J.K.R., the judge raised s. 276, but was assured by Crown and defence counsel they had discussed the issue and had determined J.K.R.’s sexual history as it pertained to her relationship with R.K.K. was relevant—as part of the narrative to provide context for credibility—and J.K.R. did not object. The judge accepted this position and did not pursue the issue.
The Supreme Court of Canada has addressed the trial judge’s heightened role with respect to s. 276. As gatekeepers, trial judges “play an important role in keeping biases, prejudices, and stereotypes out of the courtroom”: R. v. Barton, 2019 SCC 33 at para. 197. Two such biases, the twin myths of sexual assault, “have no place in a rational and just system of law”: R. v. Seaboyer,  2 S.C.R. 577 at 630, 1991 CanLII 76. Section 276 set out to eradicate these myths in criminal trials, and “[t]he ultimate responsibility for enforcing compliance with the mandatory s. 276 regime lies squarely with the trial judge”: Barton at para. 68.
A situation where evidence is led by agreement or without objection, even by the Crown, does not absolve the trial judge of their gatekeeping role: Barton at paras. 68, 80; R. v. R.V., 2019 SCC 41 at para. 78; R. v. Langan, 2019 BCCA 467 at para. 66; R. v. A.L., 2020 BCCA 18 at para. 150.
The Supreme Court of Canada has mandated there is no room for counsel to agree as they did here. The judge must rule on the admissibility of the evidence relevant to s. 276. As “the ultimate evidentiary gatekeepers”, trial judges “have a duty to vigilantly assess and exclude inadmissible evidence regardless of the positions taken (or not taken) by counsel”: R. v. Goldfinch, 2019 SCC 38 at para. 75; A.L. at para. 150.