Let a pr-review run target a candidate BCQuality revision - #854
Let a pr-review run target a candidate BCQuality revision#854Wenjie Fan (gggdttt) wants to merge 1 commit into
Conversation
Prepare-BCQualityRoot.ps1 resolved the BCQuality repo and ref solely from the engine's own bcquality.config.yaml, so a run could only ever exercise whatever content the pinned engine happened to point at. Comparing a proposed BCQuality change against that pin was therefore impossible without editing the engine pin itself, which BC-Bench owns for reproducibility reasons and must not move per-run. The script now accepts optional -CandidateRepo and -CandidateRef parameters that redirect the fetch. Omitting both is byte-for-byte the behaviour that exists today. The filter still runs from the engine's configuration rather than the candidate's, so a candidate revision cannot widen enabled-layers or knowledge.allow to smuggle in content the filter would otherwise strip. Verified live against BCQuality PR 152, whose community-layer article was correctly removed as layer-disabled. The script also now reports the baseline coordinates, the coordinates it actually used, and the resolved commit. A ref is mutable, so recording the commit is what makes a baseline run and a candidate run comparable after the fact. The existing root= line is still emitted first and is unchanged, so callers that parse it keep working. Nothing wires the new parameters up yet; the caller change belongs with the experiment-configuration work in PR 851 and lands after it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 7a9dff24-8942-4810-8359-18904eaa4da4
|
Closing this. It is unnecessary, and it works against a design decision this repository has already written down. The capability it adds already exists. More importantly, My reasoning error is worth recording. The two-pin analysis behind this PR was accurate as a description of the mechanism, but I concluded from it that pin 2 needed an override. Pin 2 is already controllable, because the engine checkout that declares it is controllable. I mistook a layered mechanism for a missing switch. The underlying goal is unaffected. What an offline eval gate for BCQuality pull requests actually lacks is orchestration -- deriving the engine branch from a BCQuality PR, running the baseline and candidate arms, and reporting the delta. That belongs in BC-ALAgentsInternal and needs no change here. |
Why
Prepare-BCQualityRoot.ps1resolves the BCQuality repository and ref solely from the pinned engine's ownbcquality.config.yaml. A run can therefore only ever exercise whatever BCQuality content that engine pin happens to point at, which makes it impossible to answer the question the offline eval gate needs answered: does this proposed BCQuality change move the score?There are two independent pins involved, and it is worth being explicit about which one this touches:
The gate needs pin 2. Pin 1 stays exactly where it is: it is the reproducibility anchor and must not move per run. An earlier attempt at this went after pin 1 instead and was withdrawn.
What changed
Prepare-BCQualityRoot.ps1takes two new optional parameters,-CandidateRepoand-CandidateRef, which redirect the fetch. Omitting both reproduces today's behaviour exactly.The script also now reports the baseline coordinates, the coordinates it actually used, and the resolved commit:
A ref is mutable —
refs/pull/N/headmoves on every force-push — so recording the commit is what makes a baseline run and a candidate run comparable after the fact.root=is still emitted first and is unchanged, so the existing caller keeps working.A candidate cannot widen its own filter
The filter still runs from the engine's configuration, not the candidate's:
So a candidate revision cannot edit its own
enabled-layersorknowledge.allowto smuggle in content the filter would otherwise strip. This is a security property of the ordering, not an implementation detail, and it is asserted by a test.Verification
Both modes were run end to end against a real engine checkout.
resolved-*equalsbaseline-*.-CandidateRef refs/pull/152/head)resolved-commit=eaef922a8a1cfbe17fa14d670e089966dc27b2d1matchesgh pr view 152 --json headRefOidexactly.The candidate run also demonstrates the filter property above rather than merely asserting it. BCQuality PR 152 adds an article under
community/knowledge/events/, and the engine baseline enables only themicrosoftlayer — the article was correctly removed withreason=layer-disabled.ruff format,ruff check,ty checkandpytestare all clean (877 passed, 2 skipped). The onetydiagnostic that appears is present on an unmodifiedorigin/mainas well.Scope
Nothing wires the new parameters up yet — this change is inert until a caller passes them. That caller change belongs in
agent.pyalongside the experiment-configuration work in #851 and lands after it, so this PR deliberately touches neitheragent.pynoraction.ymland does not conflict with #851.