mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-02 17:40:02 +02:00
* feat: add surface-aware exploratory QA and ship documentation gates * test: preserve delegated QA setup authority after main integration * fix(qa): clarify exploration order and preserve report artifacts * test(qa): follow the shared setup reference directly * refactor(ship): make verification and recovery routes explicit * test(ship): align evidence and review guards with explicit routes * fix(workflows): clarify ship recovery and functional QA evidence * fix(workflows): clarify approval recovery and full QA coverage * refactor(workflows): order review transactions and clarify ship state * fix(ship): clarify final verification and fail closed at publication * fix(evals): attribute native atomic documentation writes * fix(ship): clarify recovery and documentation lifecycle guidance * fix(test): preserve observed native placeholder styling in CI * fix(codex): report watchdog timeouts without a process-exit race * Checkpoint functional QA implementation and workflow validation repairs * Fix documentation and shared-review fixture contracts * docs: clarify judge reuse and evaluation supervision * test: align review evidence and selected case contracts * test: verify append-only documentation checkpoints and recovery * fix: qualify QA workflows and CI validation repairs * fix: launch shared-libs fixture scripts on Windows * fix: qualify QA deadlines, fixture isolation, and shard cleanup * fix: preserve qualified QA and cancellation repairs * fix: enforce functional fixture authority and share strict event decoding * fix: retain free-test evidence and explain recovery * fix: reject malformed native evidence after decoder consolidation * test: use reliable capture for telemetry privacy filters * test: refresh measured quick coverage and document validation costs * Fix native fixture receipts and preserve VM validation evidence * Align negative judge controls with upstream clarity policy * Fix report-only QA preparation and public evidence handling * Clarify QA-only preparation and current-report preservation * Stream Ship quality judgments with an explicit 64k response contract * Validate compact judge reasoning locally with supported wire schema * Align functional QA fixture instructions with evidence acceptance * Bind native browser diagnostics to execution evidence and align review verdicts * Preserve native diagnostic line boundaries * Serialize functional QA evidence from native captures * Keep large QA evidence fixture payload out of Windows argv
53 lines
2.7 KiB
TypeScript
53 lines
2.7 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(path.join(ROOT, 'ship/SKILL.md'), 'utf-8').replace(/\s+/g, ' ');
|
||
const review = fs.readFileSync(path.join(ROOT, 'ship/sections/review-army.md'), 'utf-8').replace(/\s+/g, ' ');
|
||
expect(review).toContain('**Fixes applied below the cap:** Insert Step 5');
|
||
expect(content).toContain('Permitted repairs continue in this invocation without restarting /ship');
|
||
expect(review).toContain('do not run a fourth fixing cycle');
|
||
// The loop re-runs tests AND the review, and only a converged pass continues.
|
||
expect(review).toContain('Step 5, affected Steps 6–8 and all of Step 9 before the pending Step 10');
|
||
expect(review).toContain('Every repeat starts before the checklist read and captures a fresh REVIEW_START');
|
||
expect(review).toContain('**No edits in this pass:** Resolve the required-probe gate below. Only after it clears may you continue to Step 10');
|
||
});
|
||
|
||
test('the non-convergence stop is a blocker report, not a rerun request', () => {
|
||
const content = fs.readFileSync(path.join(ROOT, 'ship/sections/review-army.md'), 'utf-8');
|
||
expect(content).toContain('**Third fixing cycle reached (`CYCLES >= 3`):** STOP and report recurring findings');
|
||
});
|
||
});
|