mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-12 16:08:59 +02:00
* fix: default cross-model workflows to frontier models * chore: bump version and changelog (v1.82.1.0) Co-Authored-By: OpenAI Codex <noreply@openai.com> * 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> * fix: resolve workflow gaps exposed by frontier evals Clarify plan-review ordering and fallback modes, preserve deploy readiness gates, honor configured merge methods, correct benchmark and canary contracts, and restore vendored installs on setup failure. Cover recovery with real-shell regressions. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: use agent capture budgets for deploy evals Multi-turn deploy and benchmark sessions were incorrectly limited to the single-call judge timeout. Use the existing capture tier and leave outer-test cleanup headroom, with a free policy regression test. Keep all behavioral assertions and frontier models unchanged. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: clarify retro workflow and evaluate compare instructions Include compare mode in the frontier judge excerpt, define metric sources and snapshot ordering, and preserve the existing prompt-size budget. Co-authored-by: OpenAI Codex <noreply@openai.com> * fix: make documentation release review and publication consistent Review before commit, clarify changelog safeguards and unavailable reviewer modes, and preserve raw PR bodies across separate shell calls. Keep title sync in one shell and add regression coverage. Co-authored-by: OpenAI Codex <noreply@openai.com> --------- Co-authored-by: OpenAI Codex <noreply@openai.com>
92 lines
4.3 KiB
TypeScript
92 lines
4.3 KiB
TypeScript
/**
|
|
* plan-ceo-review carve — static ordering guard (GATE tier, free, deterministic).
|
|
*
|
|
* This is the per-PR mechanical backstop for the v2-plan Phase B carve of
|
|
* plan-ceo-review (Codex outside-voice P2). The periodic real-PTY E2E
|
|
* (skill-e2e-plan-ceo-review-section-loading.test.ts) is the behavioral proof,
|
|
* but it runs weekly and costs money. This file runs on every `bun test` and
|
|
* fails CI the moment the carve's structural invariants break:
|
|
*
|
|
* 1. The skeleton points at the section with a STOP-Read directive, and that
|
|
* directive sits AFTER Step 0 (scope + mode) — so the conversational Step 0
|
|
* stays in the always-loaded skeleton, never stranded in the on-demand file.
|
|
* 2. The heavy review body (Sections 1-11) is NOT in the skeleton — it moved to
|
|
* the section. A regression that inlines it back would re-bloat the skeleton.
|
|
* 3. The review report writer ("GSTACK REVIEW REPORT") lives in the section, and
|
|
* the blocking EXIT PLAN MODE GATE that verifies it lives in the skeleton
|
|
* AFTER the STOP — so the gate fires once the section work returns.
|
|
* 4. Nothing review-governing sits in the skeleton below the STOP (Codex P1):
|
|
* no "Section N", no "## Mode Quick Reference", no "## Formatting Rules".
|
|
*/
|
|
|
|
import { describe, test, expect } from 'bun:test';
|
|
import * as fs from 'fs';
|
|
import * as path from 'path';
|
|
|
|
const ROOT = path.resolve(import.meta.dir, '..');
|
|
const SKELETON = path.join(ROOT, 'plan-ceo-review', 'SKILL.md');
|
|
const SECTION = path.join(ROOT, 'plan-ceo-review', 'sections', 'review-sections.md');
|
|
|
|
describe('plan-ceo-review carve — static ordering', () => {
|
|
const skeleton = fs.readFileSync(SKELETON, 'utf-8');
|
|
const section = fs.readFileSync(SECTION, 'utf-8');
|
|
|
|
// Index into the skeleton, -1 if absent.
|
|
const at = (needle: string): number => skeleton.indexOf(needle);
|
|
|
|
const STEP0 = '## Step 0: Nuclear Scope Challenge + Mode Selection';
|
|
const STOP = 'sections/review-sections.md'; // appears in the index row + STOP directive
|
|
const GATE = 'GSTACK REVIEW REPORT';
|
|
|
|
test('skeleton emits a STOP-Read directive pointing at the section', () => {
|
|
expect(skeleton).toContain('> **STOP.**');
|
|
expect(skeleton).toContain('plan-ceo-review/sections/review-sections.md');
|
|
expect(skeleton).toContain('## Section index — Read each section when its situation applies');
|
|
});
|
|
|
|
test('Step 0 (scope + mode) stays in the skeleton, BEFORE the STOP', () => {
|
|
const step0 = at(STEP0);
|
|
const stop = skeleton.indexOf('> **STOP.**');
|
|
expect(step0).toBeGreaterThan(-1);
|
|
expect(stop).toBeGreaterThan(step0); // STOP fires only after Step 0
|
|
});
|
|
|
|
test('mode selection precedes mode-specific analysis after approach approval', () => {
|
|
const approach = at('### 0C-bis.');
|
|
const mode = at('### 0F. Mode Selection');
|
|
const analysis = at('### 0D. Mode-Specific Analysis');
|
|
expect(approach).toBeGreaterThan(-1);
|
|
expect(mode).toBeGreaterThan(approach);
|
|
expect(analysis).toBeGreaterThan(mode);
|
|
});
|
|
|
|
test('the heavy review body (Sections 1-11) is NOT in the skeleton', () => {
|
|
expect(skeleton).not.toContain('### Section 1: Architecture Review');
|
|
expect(skeleton).not.toContain('### Section 11:');
|
|
// ...it lives in the section instead.
|
|
expect(section).toContain('### Section 1: Architecture Review');
|
|
expect(section).toContain('### Section 11:');
|
|
});
|
|
|
|
test('nothing review-governing sits in the skeleton below the STOP (Codex P1)', () => {
|
|
// Mode Quick Reference + Formatting Rules govern review-time behavior and must
|
|
// travel with the section, not be stranded below the STOP in the skeleton.
|
|
expect(skeleton).not.toContain('## Mode Quick Reference');
|
|
expect(skeleton).not.toContain('## Formatting Rules');
|
|
expect(section).toContain('## Mode Quick Reference');
|
|
});
|
|
|
|
test('review report writer lives in the section; the EXIT PLAN MODE GATE stays in the skeleton AFTER the STOP', () => {
|
|
// The report itself is produced inside the section work...
|
|
expect(section).toContain(GATE);
|
|
// ...and the blocking gate that verifies it is the last thing the skeleton runs.
|
|
const stop = skeleton.indexOf('> **STOP.**');
|
|
const gate = skeleton.lastIndexOf(GATE);
|
|
expect(gate).toBeGreaterThan(stop);
|
|
});
|
|
|
|
test('the section is generated, not hand-edited', () => {
|
|
expect(section.slice(0, 120)).toContain('AUTO-GENERATED');
|
|
});
|
|
});
|