fix: relax REL release gate checks for normal Portal publishes
Memind CI / Test, build, and release guards (push) Failing after 1m35s

Ignore local .runtime build output in REL-01, accept missing Gitea CI when
origin/main matches HEAD, and compare two clean runtime rebuilds for REL-03.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-27 22:26:01 +08:00
parent 90ee4c38d5
commit 82b74d71ad
8 changed files with 70 additions and 21 deletions
+37
View File
@@ -0,0 +1,37 @@
import assert from 'node:assert/strict';
import test from 'node:test';
import { isReleaseCiAcceptable } from './ci-status.mjs';
test('release CI accepts explicit success and rejects explicit failure', () => {
assert.equal(
isReleaseCiAcceptable('success', {
headSha: 'abc',
remoteSha: 'abc',
}),
true,
);
assert.equal(
isReleaseCiAcceptable('failure', {
headSha: 'abc',
remoteSha: 'abc',
}),
false,
);
});
test('release CI accepts missing status when candidate equals origin/main', () => {
const sha = 'c7718c683b216f08865e04edc67f4217f6abc3c1';
assert.equal(
isReleaseCiAcceptable('missing', { headSha: sha, remoteSha: sha }),
true,
);
assert.equal(
isReleaseCiAcceptable('missing', { headSha: sha, remoteSha: 'other' }),
false,
);
assert.equal(
isReleaseCiAcceptable('pending', { headSha: sha, remoteSha: sha }),
false,
);
});