Fix ship-queue ready tests after the pre-merge check got stricter (GST-2282) (#4271)

* Give the ship-queue ready tests complete pregate records

The notes-push and fresh-base suites wrote a one-check pregate record, which ready refuses as a partial run since #4258. They now write every registered check, as the other queue tests do.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* Add a changelog entry for the ship-queue ready test fix

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-10 02:46:56 +00:00
1 parent ccc3f0fc14
commit b1702eea91
3 files changed
+7 -2

No files matched your search

@@ -9,10 +9,12 @@ import { afterEach, describe, expect, test } from 'bun:test';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { EXIT } from '../../lib/headless-artifacts';
import { CHECK_IDS } from '../../lib/pregate/index';
import { cleanup, runBin } from '../../test/helpers/restamp-fixture';
import { line, openPr, queue, repoKey, trainFixture, type TrainFixture } from '../../test/helpers/ship-queue-train-fixture';
const NOTES = 'refs/notes/gstack-trains';
const FULL_CHECKS = CHECK_IDS.map(id => ({ id, status: 'pass' }));
const fixtures: TrainFixture[] = [];
afterEach(() => { while (fixtures.length) cleanup(fixtures.pop()!.repo); });
@@ -23,7 +25,7 @@ function readyFixture() {
fx.write(d => { d.ci[head] = [{ status: 'completed', conclusion: 'success' }]; });
const tree = runBin(fx.repo, 'gstack-wtree', []).out.trim();
const pregate = path.join(fx.repo.root, 'pregate.json');
fs.writeFileSync(pregate, JSON.stringify({ schema_version: 1, tree, head, verdict: 'pass', checks: [{ id: 'unit', status: 'pass' }] }));
fs.writeFileSync(pregate, JSON.stringify({ schema_version: 1, tree, head, verdict: 'pass', checks: FULL_CHECKS }));
return { fx, head, pregate };
}