fix: repair frontier eval budgets and workflow instructions

Preserve frontier models and quality thresholds while fixing truncated judge output, ordered section expansion, consent checks, QA scoring, and ship audit gates. Add regression coverage and refresh generated docs.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
This commit is contained in:
Garry Tan
2026-09-09 04:11:19 +00:00
co-authored by OpenAI Codex
parent 0cbccc1c6c
commit a9f9ec5f08
43 changed files with 916 additions and 518 deletions
+24
View File
@@ -0,0 +1,24 @@
import * as fs from 'fs';
import * as path from 'path';
const ROOT = path.resolve(import.meta.dir, '..', '..');
// Same generated two-line pointer consumed by setup-gbrain-fixture.ts.
const STOP_POINTER =
/^> \*\*STOP\.\*\* Before [^\n]*sections\/([a-z0-9-]+\.md)[^\n]*\n> in full\.[^\n]*/gm;
/** Expand on-demand sections where the agent reads them, then take the requested excerpt. */
export function readWorkflowExcerpt(skillPath: string, startMarker: string, endMarker: string | null): string {
const secDir = path.join(ROOT, path.dirname(skillPath), 'sections');
const content = fs.readFileSync(path.join(ROOT, skillPath), 'utf-8').replace(STOP_POINTER, (_pointer, file: string) => {
const body = fs.readFileSync(path.join(secDir, file), 'utf-8')
.replace(/^<!--[^\n]*-->\n/gm, '').trim();
if (body.length < 200) throw new Error(`${skillPath}: section ${file} is empty/stub`);
return body;
});
const start = content.indexOf(startMarker);
if (start < 0) throw new Error(`Start marker not found in ${skillPath}: "${startMarker}"`);
const end = endMarker ? content.indexOf(endMarker, start) : content.length;
if (end < 0) throw new Error(`End marker not found in ${skillPath}: "${endMarker}"`);
return content.slice(start, end);
}