mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-15 09:25:28 +02:00
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:
co-authored by
OpenAI Codex
parent
0cbccc1c6c
commit
a9f9ec5f08
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user