Files
gstack/test/helpers/third-party-actions.ts
Garry TanandOpenAI Codex a9f9ec5f08 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>
2026-09-09 04:11:19 +00:00

20 lines
854 B
TypeScript

/** Inspect lettered consent options, not narration that quotes an unavailable option. */
export function asideDriveOptions(text: string): string[] {
const options: string[] = [];
let current: string | undefined;
for (const line of text.replaceAll('**', '').split('\n')) {
const option = line.match(/^[ \t]*(?:[-*+][ \t]+)?[A-D][).][ \t]+(.*)$/);
if (option) {
if (current !== undefined) options.push(current);
current = option[1];
} else if (current !== undefined && /^[ \t]+\S/.test(line)) {
current += ` ${line.trim()}`;
} else if (current !== undefined) {
options.push(current);
current = undefined;
}
}
if (current !== undefined) options.push(current);
return options.filter(option => /\bAside\b/i.test(option) && /\b(?:drive|driving|browse|browsing|navigate|click)\b/i.test(option));
}