Files
OmniRoute/tests/unit/release-acceptance-static-adapter.test.ts
Bob.Hou 70e311703e ci(acceptance): emit a shadow release-acceptance report next to release-green (#13701) (#14066)
Adds a shadow release-acceptance report alongside release-green: an inventory/reduce/oracle pipeline under `scripts/quality/release-acceptance/` with a JSON schema, fixtures and a workflow that uploads the report as an artifact.

Contained by design, which is why it merges as-is: it runs only on push to `release/v*` and on manual dispatch (never on pull requests), the step is `continue-on-error`, `permissions: contents: read`, `persist-credentials: false`, and it consumes no secrets. Nothing in the product changes; the report is advisory until we decide to promote it.

Validated as a combined board first (this PR merged with the 11 siblings of the same batch on the release tip): eslint on every changed file with the suppressions file, typecheck:core, check:open-sse-typecheck, complexity, cognitive-complexity, changelog-integrity, i18n new-key coverage, docs-sync, migration-numbering, provider-consistency and a duplicate-identifier audit all green, plus 275 passing / 0 failing focused node:test cases across the 28 test files the batch touches. Then re-validated alone on the fresh tip before this merge: conflicts re-resolved, file sizes rebaselined for this PR's own growth, eslint and this PR's focused tests re-run.

Thanks @HouMinXi!

Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>
2026-09-18 10:21:59 -03:00

34 lines
871 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import { adaptCompiler } from "../../scripts/quality/release-acceptance/staticAdapter.mjs";
test("empty diagnostics with nonempty digest and exit 0 is PASS", () => {
const out = adaptCompiler({
commandId: "tsc",
inputDigest: "a".repeat(64),
exitCode: 0,
diagnostics: [],
});
assert.equal(out.status, "PASS");
});
test("empty digest plus empty diagnostics is INFRA_ERROR", () => {
const out = adaptCompiler({
commandId: "tsc",
inputDigest: "",
exitCode: 0,
diagnostics: [],
});
assert.equal(out.status, "INFRA_ERROR");
});
test("exit 1 with diagnostics is FAIL", () => {
const out = adaptCompiler({
commandId: "tsc",
inputDigest: "a".repeat(64),
exitCode: 1,
diagnostics: ["error TS2304"],
});
assert.equal(out.status, "FAIL");
});