fix(valid-detection-benchmark): break sourcing-queue ties on fix-site path and function

Candidates that differed only in fix-site path or function were selected by input order under the queue cap. Both scalars are now part of the request order, so cap selection no longer depends on input order for them.
This commit is contained in:
Marius Ciepluch
2026-11-23 11:40:09 +01:00
parent 9e884e8342
commit 67bc37cac6
2 changed files with 58 additions and 1 deletions
+5 -1
View File
@@ -96,7 +96,9 @@ def _request_order(request: SourcingCandidateRequest) -> tuple[str, ...]:
Task 10.1 review fold-in: distinct candidates tying on the first four keys
used to be ordered by input position, so cap selection was
permutation-sensitive; the advisory, package-manifest, and license digests
make the order a function of content only.
make the order a function of content only. The fix-site path and function
are the non-digest scalars two otherwise identical requests can still
differ on; appending them keeps every existing order intact.
"""
digest = request.model_assistance_digest or ""
return (
@@ -107,6 +109,8 @@ def _request_order(request: SourcingCandidateRequest) -> tuple[str, ...]:
request.family.advisory_digest,
request.package_evidence.manifest.content_digest,
request.license_evidence.source.content_digest,
str(request.case.get("path", "")),
str(request.case.get("function", "")),
)