verify:browser-all reads a gate's exit 75 as NOT MEASURED, not as a failure

It counted any non-zero exit as FAIL, so a gate that could not measure (no
browser slot, a server mid-build) read as a broken product, the same bug
upg100 found in check:packets-all once the browser guard made gates refuse
outside the slot. Exit 75 is now NOT MEASURED, shown as such, and a run with
no failures but any unmeasured gate exits 75 itself (INCOMPLETE), never green.
This commit is contained in:
Doxa Maps 2026-09-28 08:37:51 +00:00
parent a5eb9f6fa6
commit cdcdd84cf9

View file

@ -203,13 +203,21 @@ for (const g of GATES) {
})
const secs = Math.round((Date.now() - t0) / 1000)
const out = ((r.stdout || '') + (r.stderr || '')).trim()
// THREE outcomes, not two (upg100 found the same bug in check:packets-all): exit 75 is NOT MEASURED —
// no browser slot, a server mid-build — and must never count as a failure or as a pass.
const ok = r.status === 0
results.push({ ...g, ok, secs, tail: out.split('\n').filter(Boolean).slice(-3).join('\n') })
console.log(` ${ok ? '✓' : '✗'} ${g.script.padEnd(24)} ${ok ? 'PASS' : 'FAIL'} (${secs}s)`)
const unmeasured = r.status === 75
results.push({ ...g, ok, unmeasured, secs, tail: out.split('\n').filter(Boolean).slice(-3).join('\n') })
console.log(` ${ok ? '✓' : unmeasured ? '⊘' : '✗'} ${g.script.padEnd(24)} ${ok ? 'PASS' : unmeasured ? 'NOT MEASURED' : 'FAIL'} (${secs}s)`)
}
const failed = results.filter(r => !r.ok)
console.log(`\nBROWSER-ALL: ${results.length - failed.length}/${results.length} gate(s) passed.`)
const failed = results.filter(r => !r.ok && !r.unmeasured)
const notMeasured = results.filter(r => r.unmeasured)
console.log(`\nBROWSER-ALL: ${results.length - failed.length - notMeasured.length}/${results.length} gate(s) passed` +
(notMeasured.length ? `, ${notMeasured.length} NOT MEASURED (${notMeasured.map(r => r.script).join(', ')}).` : '.'))
// An unmeasured gate is not a pass: with no failures but any NOT MEASURED, exit 75 (INCOMPLETE, as
// check:gospel-all does), so a runner buckets it NOT MEASURED instead of green.
if (!failed.length && notMeasured.length) process.exit(75)
if (failed.length) {
console.error('\nFAILED:')