fix(bench): gate seeding on repo+index readiness and match read counts semantically
Two benchmark-harness races were being scored as agent failures. A freshly seeded throwaway repo could 404 for an independent reader (the agent, a fresh process) before Gitea made it consistent, and the async issue indexer lagged so `search issues`/`search prs` returned nothing right after seeding — leaving the agent unable to find the target it was asked to act on. seedRepo now blocks until an independent read confirms the repo is reachable, its full seeded issue and pull spread is visible, and a seeded issue and pull are returned by the search index, before releasing the agent. It polls up to 60s and throws a loud harness error on timeout rather than letting a propagation delay become a scored agent failure. Also add an optional `pattern` regex to RequiredFact so a read answer's count is recognised semantically rather than as a fixed phrase: "5 issues are currently open" no longer fails against the literal "5 issues are open", while the alphabetic-only filler run keeps a wrong count beside the right number (e.g. "5 issues ... 3 open") failing.
This commit is contained in:
@@ -92,6 +92,11 @@ function readTasks(): BenchTask[] {
|
||||
{
|
||||
description: "the repository has 5 open issues",
|
||||
anyOf: ["5 open", "five open", "open issues: 5", "open: 5", "5 issues are open"],
|
||||
// "5" followed by "open" across up to four alphabetic filler words, so
|
||||
// natural padding ("5 issues are currently open") is recognised while a
|
||||
// digit between them (a wrong "5 issues, 3 open") is not: the filler run
|
||||
// is alphabetic only, so it cannot span another count.
|
||||
pattern: "\\b5(?: [a-z]+){0,4} open\\b",
|
||||
},
|
||||
]),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user