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
69 lines
3.8 KiB
TypeScript
69 lines
3.8 KiB
TypeScript
import { expect, test } from 'bun:test';
|
|
import { computePaidCaseSelection } from '../scripts/test-paid-shards';
|
|
import { PR_PROFILE_CASE_IDS, selectPrProfile, type PrProfileMaps } from '../scripts/test-pr-profile';
|
|
import { E2E_TIERS, E2E_TOUCHFILES, LLM_JUDGE_TOUCHFILES } from './helpers/touchfiles-data';
|
|
|
|
const sharedInputs = [
|
|
'package.json', 'bun.lock', '.github/docker/Dockerfile.ci',
|
|
'scripts/host-config.ts', 'scripts/discover-skills.ts', 'hosts/index.ts',
|
|
];
|
|
const skipId = 'ship-skipped-queued-finding';
|
|
const gateIds = Object.keys(E2E_TOUCHFILES).filter(id => E2E_TIERS[id] === 'gate').sort();
|
|
const periodicIds = Object.keys(E2E_TOUCHFILES).filter(id => E2E_TIERS[id] === 'periodic').sort();
|
|
const judgeIds = Object.keys(LLM_JUDGE_TOUCHFILES).sort();
|
|
|
|
test.each(sharedInputs)('%s retains the full gate after native dependency registration', file => {
|
|
const result = computePaidCaseSelection({ profile: 'pr', env: {}, changedFiles: [file] });
|
|
expect(result.coverage?.mode).toBe('full-fallback');
|
|
expect(result.selection.e2e).toEqual(gateIds);
|
|
expect(result.selection.judges).toEqual(judgeIds);
|
|
expect(result.coverage?.deferred.map(({ id }) => id).sort()).toEqual(periodicIds);
|
|
expect(result.coverage?.reasons).toContain(`Shared runtime/build inputs restore every gate case and judge: ${file}`);
|
|
expect(result.coverage?.needsFullValidation).toBe(false);
|
|
});
|
|
|
|
test.each(sharedInputs)('%s broad policy is independent of native, judge and global maps', file => {
|
|
for (const registration of ['none', 'broad', 'fast', 'judge', 'global']) {
|
|
const maps: PrProfileMaps = {
|
|
e2eTouchfiles: { fast: [], broad: [], periodic: [] },
|
|
judgeTouchfiles: { quality: [] },
|
|
tiers: { fast: 'gate', broad: 'gate', periodic: 'periodic' },
|
|
globalTouchfiles: [],
|
|
};
|
|
if (registration === 'broad' || registration === 'fast') maps.e2eTouchfiles[registration].push(file);
|
|
if (registration === 'judge') maps.judgeTouchfiles.quality.push(file);
|
|
if (registration === 'global') maps.globalTouchfiles = [file];
|
|
const result = selectPrProfile({ maps, profile: ['fast'], changedFiles: [file.replaceAll('/', '\\')],
|
|
selectedE2E: [], selectedJudges: [] });
|
|
expect(result.mode, registration).toBe('full-fallback');
|
|
expect(result.e2e, registration).toEqual(['broad', 'fast']);
|
|
expect(result.judges, registration).toEqual(['quality']);
|
|
expect(result.deferred.map(({ id }) => id), registration).toEqual(['periodic']);
|
|
expect(result.unknownFiles, registration).toEqual(registration === 'none' ? [file] : []);
|
|
}
|
|
});
|
|
|
|
test.each(['test/helpers/ship-skip-actor.ts', 'test/skill-e2e-ship-skip.test.ts'])
|
|
('%s remains explicitly deferred by the fast profile, not promoted', file => {
|
|
expect(PR_PROFILE_CASE_IDS as readonly string[]).not.toContain(skipId);
|
|
const result = computePaidCaseSelection({ profile: 'pr', env: {}, changedFiles: [file] });
|
|
expect(result.coverage?.mode).toBe('pr');
|
|
expect(result.selection).toEqual({ e2e: [], judges: [] });
|
|
expect(result.coverage?.deferred).toEqual([{
|
|
id: skipId, tier: 'gate', reason: 'Broad gate census/release coverage; outside the fast PR profile',
|
|
}]);
|
|
const full = computePaidCaseSelection({ profile: 'full', env: {}, changedFiles: [file] });
|
|
expect(full.selection).toEqual({ e2e: [skipId], judges: [] });
|
|
});
|
|
|
|
test('cumulative shared, native and prompt edits retain every gate case and judge', () => {
|
|
const result = computePaidCaseSelection({ profile: 'pr', env: {}, changedFiles: [
|
|
...sharedInputs, 'test/helpers/ship-skip-actor.ts', 'qa-only/SKILL.md.tmpl',
|
|
] });
|
|
expect(result.coverage?.mode).toBe('full-fallback');
|
|
expect(result.selection.e2e).toEqual(gateIds);
|
|
expect(result.selection.judges).toEqual(judgeIds);
|
|
expect(result.coverage?.deferred.map(({ id }) => id).sort()).toEqual(periodicIds);
|
|
expect(result.coverage?.needsFullValidation).toBe(false);
|
|
});
|