mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 00:57:45 +00:00
[CI] Reuse costly test setup and report an explicit full result (#29228)
* ci: publish an explicit result from the PR aggregate * test(codex): preserve review text across OSC terminators * perf(ci): reuse worker fixtures and validated launcher output * fix(test): use typed orchestration database access * fix(ci): exclude test fixtures from focus ratchet
This commit is contained in:
@@ -10,10 +10,19 @@ export function verifyRequiredPrContext(parseYaml) {
|
||||
const workflow = parseYaml(readFileSync(join(directory, file), 'utf8'))
|
||||
return Object.entries(workflow.jobs)
|
||||
.filter(([id, job]) => (job.name ?? id) === 'PR checks passed')
|
||||
.map(([id]) => `${file}:${id}`)
|
||||
.map(([id, job]) => ({ owner: `${file}:${id}`, job }))
|
||||
})
|
||||
if (providers.length !== 1 || providers[0] !== 'pr.yml:verify') {
|
||||
throw new Error(`Required PR context must belong only to pr.yml:verify; found ${providers}`)
|
||||
const owners = providers.map((provider) => provider.owner)
|
||||
if (providers.length !== 1 || owners[0] !== 'pr.yml:verify') {
|
||||
throw new Error(`Required PR context must belong only to pr.yml:verify; found ${owners}`)
|
||||
}
|
||||
const gate = providers[0].job
|
||||
const condition = gate.if?.replace(/^\$\{\{\s*|\s*\}\}$/g, '').trim()
|
||||
if (condition !== '!cancelled()') {
|
||||
throw new Error('Required PR aggregate must run unless the workflow is cancelled.')
|
||||
}
|
||||
if (gate['continue-on-error'] || gate.steps?.some((step) => step['continue-on-error'])) {
|
||||
throw new Error('Required PR aggregate must not ignore failures.')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user