mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-27 15:11:47 +02:00
* feat: bind shared-code review advice to source and branch * feat: add shared-code extraction audit and scoped review checks * test: recognize complete source reads and explicit coverage legends * chore: bump version and changelog (v1.88.0.0) Co-Authored-By: OpenAI Codex <noreply@openai.com> * test: capture native review questions and retain public evidence Capture the actual first public native question with strict ownership and display matching. Preserve terminal failures and raw evidence, and retain SDK completion checks. * test: recognize verified review evidence and complete fixtures Recognize complete source and diagram evidence, concrete design and developer-experience decisions, and the complete planted scenario contracts. Preserve negative controls and grading thresholds. * fix: preserve decision brief structure in native questions Keep the required pros-and-cons heading and final Net field in native question text. Regenerate host outputs and document the release and evaluation repairs. Co-Authored-By: OpenAI Codex <noreply@openai.com> * docs: update project documentation for v1.88.0.0 Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: correct eval retry accounting and ship workflow gates * fix: capture native eval evidence and stabilize CI fixtures * fix: keep shared-code eval skips read-only Choose explicit no-change answers instead of mixed fix/preservation options. Reuse the bounded revalidation prompt for path fixtures so required review metadata is available without repeated discovery. Preserve source checks, retry limits, and failed native terminal outcomes. Add captured-question and callback regressions, plus evaluation selection coverage for the affected fixtures. --------- Co-authored-by: OpenAI Codex <noreply@openai.com>
50 lines
2.2 KiB
TypeScript
50 lines
2.2 KiB
TypeScript
/**
|
|
* /ship review fix loop stays in one invocation (#2391).
|
|
*
|
|
* The pre-landing review used to commit its fixes, STOP, and tell the user
|
|
* to run /ship again — 5-10 manual invocations on a branch with a few
|
|
* auto-fixable findings, violating the skill's fully-automated contract.
|
|
* The rendered section must instruct a bounded in-invocation loop
|
|
* (re-test, re-review, max 3 fix cycles) and must never terminate an
|
|
* AUTO-FIX result with a rerun request.
|
|
*/
|
|
import { describe, test, expect } from 'bun:test';
|
|
import * as fs from 'fs';
|
|
import * as path from 'path';
|
|
|
|
const ROOT = path.join(import.meta.dir, '..');
|
|
|
|
const RENDERED_SITES = [
|
|
path.join(ROOT, 'ship', 'sections', 'review-army.md'),
|
|
path.join(ROOT, 'test', 'fixtures', 'golden', 'claude-ship-SKILL.md'),
|
|
path.join(ROOT, 'test', 'fixtures', 'golden', 'codex-ship-SKILL.md'),
|
|
path.join(ROOT, 'test', 'fixtures', 'golden', 'factory-ship-SKILL.md'),
|
|
];
|
|
|
|
describe('/ship review fix loop (#2391)', () => {
|
|
test('no rendered ship surface instructs a STOP-and-rerun after fixes', () => {
|
|
// The pre-fix instruction: "then **STOP** and tell the user to run
|
|
// `/ship` again". The fixed text mentions the phrase only inside a
|
|
// NEVER-do-this prohibition, so match the imperative STOP shape.
|
|
const rerunRequest = /\*\*STOP\*\*[^\n]*run `\/ship` again/;
|
|
for (const file of RENDERED_SITES) {
|
|
const content = fs.readFileSync(file, 'utf-8');
|
|
expect(rerunRequest.test(content)).toBe(false);
|
|
}
|
|
});
|
|
|
|
test('rendered section instructs the bounded in-invocation loop', () => {
|
|
const content = fs.readFileSync(RENDERED_SITES[0], 'utf-8');
|
|
expect(content).toContain('stay in this invocation and loop');
|
|
expect(content).toContain('3 fix cycles');
|
|
// The loop re-runs tests AND the review, and only a converged pass continues.
|
|
expect(content).toContain('re-run the test suite (Step 5)');
|
|
expect(content).toContain("re-run the whole Step 9 cycle from a new pass's start-token capture");
|
|
});
|
|
|
|
test('the non-convergence stop is a blocker report, not a rerun request', () => {
|
|
const content = fs.readFileSync(RENDERED_SITES[0], 'utf-8');
|
|
expect(content).toContain('report which findings keep reappearing');
|
|
});
|
|
});
|